[rabbitmq-discuss] How to receive STOMP receipt only after the consumer has acknowledged the message?

Emile Joubert emile at rabbitmq.com
Thu Aug 15 11:31:53 BST 2013


On 15/08/13 09:03, joshua__lim wrote:

> What I've noticed from my tests is that the receipt sent is to the producer
> right after the broker captures the message.  This receipt is not adequate
> for reliable delivery since the message hasn't been sent to the consumer
> yet.

Messages can be transferred reliably from publishers to the broker.
(using transactions or confirms). Messages can also be transferred
reliably from the broker to consumers. (using acknowledgements)
Taken together this provides reliable transfer from publishers to consumers.

> I'm trying to figure out if it is possible for the receipt to be sent by the
> broker only after the recipient has acknowledged the message?

No. STOMP receipts are issued once the broker successfully takes
responsibility for a message. That does not translate to a guarantee
that it was acknowledged by the consumer.

If you want an end-to-end proof of delivery from the consumer then you
must set up an independent line of communication between the consumer
and the producer and send a proof-of-delivery token back along that route.

Depending on your needs you may wish to make consumer acknowledgements
synchronous by acknowledging in a transaction before sending the

> "The broker will confirm messages once:....
> ... b) has been consumed and, if necessary, acknowledged."

That is a semantically irrelevant optimisation which cannot be used to
obtain a guarantee that the message was acknowledged by a consumer.
(That statement has since been remove from the website. The optimisation
remains in place though.)


More information about the rabbitmq-discuss mailing list