[rabbitmq-discuss] Publisher confirms and lost messages
matthias at rabbitmq.com
Sat Jan 12 12:09:59 GMT 2013
On 11/01/13 14:56, Chris Duncan wrote:
> I have a Ruby publisher script that simply publishes 100 messages via a
> channel that is in confirmation mode. It does not close the AMQP
> connection and channels before it finishes. Every time that the
> Wireshark trace shows a final TCP frame that contains a large number of
> AMQP basic.publish framesets then a variable number of messages do not
> arrive on the queue.
> However, I never lose any messages when I include a close method at the
> end of the script. I've run this test many times now and the results are
> always the same.
> It doesn't look as though Bunny is doing anything peculiar. The messages
> do seem to be getting sent to the broker correctly.
If you didn't receive a confirm for a message then there is no guarantee
that the message has made to and been processed by the broker. That's
the whole point of having confirms.
A correct AMQP connection closure handshake, which apps/clients should
always perform, ensures that the messages have made it to the broker,
but not that they have been processed. Under normal circumstances little
can go wrong once the messages have been received by the broker, so a
proper connection closure provides a pretty good guarantee. But the
guarantee offered by confirms is stronger.
More information about the rabbitmq-discuss