[rabbitmq-discuss] Acknowledging messages using the EventingBasicConsumer

Emile Joubert emile at rabbitmq.com
Thu Aug 2 15:19:50 BST 2012

Hi Toby,

On 02/08/12 12:05, Toby Riley wrote:
> I have a question I could not find a proper answer to anywhere, and
> it is to do with the Acknowledging messages using the
> EventingBasicConsumer, I’m using   _channel.BasicAck(e.DeliveryTag,
> false); but there is one for o.Model. BasicAck(e.DeliveryTag, false)
> but the sender object (o) is null.
> What is the proper way to Acknowledge message from the Received event
> when using the EventingBasicConsumer when you inside the delegate?

You should first make sure that it is correct to acknowledge the
message. If there were any asynchronous events that could fail and that
were triggered as a result of the message then you might as well use
automatic acknowledgements.

I'm not sure why the event sender is null in your example. That may well
be a bug in EventingBasicConsumer, which is classed as experimental.
Using the sender would be the preferable approach. I will file a bug to
investigate why the value is null. Thanks for reporting this.


More information about the rabbitmq-discuss mailing list