pardahlman / RawRabbit

A modern .NET framework for communication over RabbitMq
MIT License
747 stars 144 forks source link

In EventingBasicConsumerFactory MessageId are not removed from processedButNotAcked #247

Closed cortex93 closed 7 years ago

cortex93 commented 7 years ago

In the event of an error when ack-ing after processing, the messageId is added to ConcurrentBag processedButNotAcked. In BasicAck, after channel.BasickAck, shouldn't it be tried to be removed if it exists ?

pardahlman commented 7 years ago

Hello @cortex93 - perhaps you are right. Can you point me to the specific line of code you refer to so that I can follow what you mean.

Thanks!

cortex93 commented 7 years ago

https://github.com/pardahlman/RawRabbit/blob/3bc63b1972537092bf2d5378b69c904ba22af86d/src/RawRabbit/Consumer/Eventing/EventingBasicConsumerFactory.cs#L82

In case of an exception, MessageId is added to the concurrentbag. But it is never removed. I think that on line 77, just after the call to channel.BasicAck, you should TryRemove the MessageId.

pardahlman commented 7 years ago

Hello @cortex93 - this will not be addressed. My suggestion is - if at all possible - to migrate to 2.0 of the client (recently released as rc1).