[rabbitmq-discuss] Causing publisher confirmations nacks for testing?
ty at sarna.org
Thu Jun 20 15:44:53 BST 2013
On Jun 20, 2013, at 5:14 AM, Emile Joubert <emile at rabbitmq.com> wrote:
> On 19/06/13 19:30, Ty Sarna wrote:
>> I'm working with publisher confirmations, and I'd like to verify that my
>> nack-handling logic is correct. Is there some way I can make RabbitMQ
>> nack on demand, for testing purposes?
> No, I don't think there is a simple way of prompting the broker to send
> a basic.nack. But there is very little value in handling basic.nack
> specially because the integrity of a broker that ever did send a
> basic.nack would probably be compromised.
As I understand it, in the publisher confirmations case the broker nacks with basic.return+basic.ack rather than basic.nack. And, I do need *some* special handling for that case, otherwise there's no point in using confirmations at all.
If the broker only fails to ack in cases where it's completely hosed the handling can be as simple as considering the connection dead, disconnecting, and retrying this and all subsequent messages when/if we reconnect. Even so, it would be nice to test that logic.
More information about the rabbitmq-discuss