[rabbitmq-discuss] detecting publish failure across restart

Sylvain Hellegouarch sh at defuze.org
Sat May 29 09:12:39 BST 2010

Hi Jesse,

I understand that publishing a message is asynchronous, but surely there
> must be a way to discover that message was not successfully published. What
> am I missing?

The protocol (I assume 0-8 here) suggests that you set the "mandatory" flag
to 1 for each message. If a message cannot be routed from an exchange to at
least one queue, it'll be returned to the publisher with a "312 unroutable"
error code. You must define a handler for those errors on the publisher side
[1] and decide what to do with the returned message. Personally I just keep
trying publishing it with after a small period of time. This means my
publisher becomes responsible for not losing messages in that specific use

- Sylvain

[1] http://www.rabbitmq.com/api-guide.html#returning
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100529/1c6f4cb6/attachment.htm 

More information about the rabbitmq-discuss mailing list