rabbitmq-dotnet-client
rabbitmq-dotnet-client copied to clipboard
CallbackException not raised for AsyncEventingBasicConsumer
RabbitMq_CallbackExceptionBug.zip
PFA the sample. When using AsyncEventingBasicConsumer, CallbackException event never fires. But when using EventingBasicConsumer (plz uncomment the code at the bottom of the Program.cs), it does.
I think the issue is in the class AsyncConsumerWorkService at line 93. The task is not awaited always. If the task finishes earlier or synchronously, then task.IsCompleted will be true resulting in never awaiting on the task.
"RabbitMQ.Client" Version="6.2.1"
@ashish-g-lahane you are welcome to submit a PR (against master and the 6.x
branch) with a test case. Thanks.
@michaelklishin I have the same issue. Can I submit a PR to main and 6x branch?
@shikow of course. Thanks.
@ashish-g-lahane thanks for providing code. I turned it into a test in PR #1585, which demonstrates that this issue will be fixed in version 7 of this library.