[rabbitmq-discuss] opposite of basicAck?

Ben Hood 0x6e6562 at gmail.com
Thu Jul 16 18:27:19 BST 2009


Amit,

On Thu, Jul 16, 2009 at 3:22 PM, amit bhatnagar<brownspice at gmail.com> wrote:
> When you do this by closing the channel, (essentially faking a
> Basic.Reject), the message gets put back on the queue and gets ready
> for consumption by another consumer (or channel from same consumer if
> it had more than one channel).
>
> a) Is the producer registering for an BasicReturn listener the proper
> mechanism to be informed that the message was undeliverable?

The answer to your question might lie in the spec's definition of the
BasicReturn command:

"This method returns an undeliverable message that was published with
the "immediate" flag set, or an unroutable message published with the
"mandatory" flag set. The reply code and text provide information
about the reason that the message was undeliverable."


> b) If a is true, how long would the message sit on the queue waiting
> for a potential consumer to pick it up before the basic.return was
> generated by the broker back for the producer?

See above.

> c) If no such BasicReturn listener was registered, the message gets
> dropped?

The broker will send the rejection back to the client in any case.
Whether this ever lands back in the client application depends on
whether (a) the client library black holes these messages or (b)
whether the client application registers some kind of callback to
handle returns. Both of which are outside of the broker's remit.

Ben




More information about the rabbitmq-discuss mailing list