[rabbitmq-discuss] Message acknowledgment scenarios

Emile Joubert emile at rabbitmq.com
Tue Jul 3 10:50:45 BST 2012


Hi,

On 02/07/12 16:40, Wiessler, Wolfgang wrote:
> The basic question is: Is it possible to acknowledge a message that was
> received on one IModel instance using a different IModel instance? I did
> a brief test and that did not work. It seems as if a message’s delivery
> tag is specific to an IModel.

Acknowledgements and deliveries are channel-scoped, so it is not
possible to send an acknowledgement on a different channel from the one
that the delivery was made on.

> What happens to an unacknowledged message if the server dies/is not
> reachable? Is it automatically re-queued since the server lost its
> connection to the receiver? Or could a receiver send an acknowledgment
> once the server is reachable again? E.g. by waiting in a loop for a
> successful connection to the server.

When a channel closes, all unacknowledged messages are requeued. There
is no way to re-establish the state of a closed channel, so client
cannot acknowledge messages from a channel that has closed. The client
will need to establish a new subscription, have the messages delivered
again and acknowledge the redelivery. You will notice that such messages
will have their "redelivery" flag set to indicate that they have been
delivered before.


-Emile




More information about the rabbitmq-discuss mailing list