1

I am using rabbitmq-c lib in linux. I want to so basic request and response. I have used amqp_basic_publish with mandatory field as true, I just want to know is that message is delivered any queue. i want basic c example for that.

pinepain
  • 12,453
  • 3
  • 60
  • 65

1 Answers1

0

Just handle AMQP_BASIC_RETURN_METHOD response, for example look into amqps_consumer.c example that comes with rabbitmq-c library.

pinepain
  • 12,453
  • 3
  • 60
  • 65
  • Thanks... but what happens if i published multiple msgs. Is there anything which going to say this acknowledgement for that publish? – SayedMomeen Jan 08 '15 at 11:44
  • It's not a problem, see how confirms mechanism works (3rd paragraph from https://www.rabbitmq.com/confirms.html): Once a channel is in confirm mode, both the broker and the client count messages (counting starts at 1 on the first confirm.select). The broker then confirms messages as it handles them by sending a basic.ack on the same channel. The delivery-tag field contains the sequence number of the confirmed message. The broker may also set the multiple field in basic.ack to indicate that all messages up to and including the one with the sequence number have been handled. – pinepain Jan 08 '15 at 21:30