[rabbitmq-discuss] Duplicate Messages received after basicRecoveryAsync() is called.

John Mann jmann at versatile.com
Wed Mar 3 11:42:31 GMT 2010


Thanks for all of the help.  I got it working!

I had no luck with calling basicCancel() and then waiting for the handleCancelOK() method to be called.  I realized after stepping through the source with a debugger that a Channel disassociates the Consumer when basicCancel() is called:

ChannelN.java: line 645:

                Consumer callback = _consumers.remove(consumerTag);

The only way that I knew I could reestablish this association was by calling Channel.basicConsume().  Unfortunately this didn't work.  Messages after that point were never delivered.  

I finally used the close and re-open the Channel approach.  This worked as expected.

If anyone would like to see my solution code, let me know.

Thanks.

-John

On Feb 26, 2010, at 7:50 PM, Tony Garnock-Jones wrote:

> Matthias Radestock wrote:
>> 1) send basic.cancel
>> 2) wait for basic.cancel-ok
>> The hook for step 2 is provided by overriding the handleCancelOk method 
>> on the consumer class.
> 
> Note also that basicCancel() doesn't return to the caller until the
> basic.cancel-ok has been received and completely processed by the client
> library and the Consumer object.
> 
> Regards,
>  Tony

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100303/0bc15a77/attachment.htm 


More information about the rabbitmq-discuss mailing list