[rabbitmq-discuss] Can a Publish be acknowledged.
Tim Yen
tim.yen at gmail.com
Tue Oct 4 08:10:27 BST 2011
Alexandru Scvorţov <alexandru at ...> writes:
>
> > I'd effectively like an acknowledgment to say "this message was put on to at
> > least one queue".
> To get the acknowledgement you want, you need to publish both with
> mandatory set and to a confirm channel. If you get a basic.return and
> an acknowledgement, that means the message was not delivered to any
> queues; if you get just an acknowledgement, that means the broker has
> handled the message somehow; if you get a nack, that means the message
> was probably lost in some way, so you need to resend it or something.
> The broker guarantees that it will eventually acknowledge or nack all
> messages published to confirm channels.
>
> Alternatively, if you're feeling lazy, you can use the new (introduced
> in 2.6.0) IModel.WaitForConfirms. The function waits for all messages
>
> Hope this helps.
>
> Cheers,
> Alex
>
Thanks Alex,
After enabling confirm select how can I know which message is being confirmed or
nacked by the various callbacks assuming that its all asynchronous?
The BasicAckEvent and Nack event handlers have the DeliveryTag but how do i get
this number on BasicPublish?
Also the BasicReturnEventArgs has no DeliveryTag. Can I just ignore the
BasicReturn and rely on only the Ack and Nack event handlers?
As I dont need the performance WaitForConfirms seems to be the go but it doesn't
appear to be implemented in the .net code. It seems to
be Java only. Maybe its hidden somewhere anybody know?
Maybe someone can post the Java for the WaitForConfirms and I can morph it to c#
More information about the rabbitmq-discuss
mailing list