[rabbitmq-discuss] Consumer's confirm

Steve Powell steve at rabbitmq.com
Thu Jul 19 11:38:45 BST 2012


The definitive guide to Publish-confirms is in the extensions
documentation [1], where it says:

> By confirming a message the broker assumes responsibility for it and
> indicates that it has done something it deems reasonable with it.
> Unroutable mandatory or immediate messages are confirmed right after
> thebasic.return. Transient messages are confirmed as soon as they arrive
> on all the queues they were routed to. Persistent messages are confirmed
> when all queues have either delivered the message and received an
> acknowledgement (if required), or persisted the message.

Notice that a confirmation does not necessarily mean that a consumer has
received and acknowledged the message; in general it means that RabbitMQ
has successfully 'processed' the message, which might mean 'persisted' it, if
it is persistent, or returned it, if it was unroutable (and marked
mandatory), etc.

You may wish to investigate the 'immediate' and 'mandatory' flags. Be
aware that you cannot use 'publisher confirms' on a transactional

[1] http://www.rabbitmq.com/extensions.html#confirms

Steve Powell
steve at rabbitmq.com
[wrk: +44-2380-111-528] [mob: +44-7815-838-558]

On 19 Jul 2012, at 10:25, Mohsen Lotfizad wrote:

> Hi
> I have a project that producers want to assure their message are delivered to consumers.
> I make a Google search and find rabbitMQ transaction and confirm from (http://www.rabbitmq.com/blog/2011/02/10/introducing-publisher-confirms/) . I download discussed examples and run them. But I comment the consumer part. with my surprise producer gives ack, even if I uncomment  consumer part and send NACK instead of ack!
> what should I do to route consumers ack to producer?
> ps: does com.rabbitmq.client.Channel#addReturnListener helps me?
> -- 
> Sincerely 
> ML
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

More information about the rabbitmq-discuss mailing list