Azure / azure-uamqp-c

AMQP library for C
Other
60 stars 63 forks source link

Unable to run message_receiver_sample #409

Closed alseambusher closed 3 years ago

alseambusher commented 3 years ago

Hi folks!

Thanks for creating this library. I am new to azure and new to this library. We want to use azure service bus for one of our applications and was trying the samples provided here.

I was able to successfully send messages to the service bus using the message_sender_sample but was unable to receive the same back while using the message_receiver_sample. I get the following error:

azure-uamqp-c/src/link.c Func:link_frame_received Line:333 Cannot get initial delivery count

I tracked it down to this method: attach_get_initial_delivery_count https://github.com/Azure/azure-uamqp-c/blob/master/src/amqp_definitions.c#L4830 and it looks like amqpvalue_get_type(item_value) == AMQP_TYPE_NULL

Can you please help me here?

Thanks!

alseambusher commented 3 years ago

Hi folks, any idea how to go about this? Perhaps @ewertons ?

alseambusher commented 3 years ago

Nevermind, changing the line from:

source = messaging_create_source("amqps://" EH_HOST "/" EH_NAME "/ConsumerGroups/$Default/Partitions/0");

to

source = messaging_create_source("amqps://" EH_HOST "/" EH_NAME);

made it work