[rabbitmq-discuss] How to check the ack for a particular message that's sent using Pika?

Brian Jing brian.newsgroup at gmail.com
Wed Jan 18 06:53:05 GMT 2012


Hi there,

I'd like to be able to check whether I've received an ack for a particular
message when using publisher delivery confirm mode. Was wondering if it's
possible to do this using Pika.

Reason why I'd like to do this: my RabbitMQ client receives messages from a
local daemon (using rpc) and sends those messages asynchronously to a
RabbitMQ server. Since the messages received from the daemon are stored in
memory, if the client crashes, it will lose them. Hence I'd like to improve
robustness of the client by making the client store messages to disk. If
the client fails to receive an ack for a message, it resends the message,
otherwise it removes the message from the local disk store.

So basically how it works is:
1. daemon sends a message to local client
2. client stores the message to disk
3. client sends the message to server
4. client resends the message periodically until it receives the ack, then
it removes the message from the disk.

By doing it this way, I will have to know whether I've received an ack.
However, from some experiments done by a colleague recently, it appears
that the server may send an ack for multiple messages (if it's correct).
I've looked around and only saw a Java example trying to retrieve sequence
number for a message from a frame. I would like to know whether it's
possible to check whether I've got an ack for a particular message using
Pika, and the way how to do it.

Cheers,

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120118/3797eb2c/attachment.htm>


More information about the rabbitmq-discuss mailing list