[rabbitmq-discuss] detecting publish failure across restart
Jesse Myers
jesse at wavemarket.com
Sat May 29 17:31:49 BST 2010
Hi Sylvain -
Thanks for your response.
In my case, I am publishing the messages with the mandatory flag set to
true and I am registering a ReturnListener with the channel. However, I
do not see any messages being returned. For what it's worth, I do see
messages returned if I set the immediate flag to true and do not have a
consumer running, but that's a different scenario.
Jesse
On 5/29/10 1:12 AM, Sylvain Hellegouarch wrote:
> 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 case.
>
> --
> - Sylvain
> http://www.defuze.org <http://www.defuze.org/>
>
> [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/18db6636/attachment.htm
More information about the rabbitmq-discuss
mailing list