Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CallbackException not raised for AsyncEventingBasicConsumer #1038

Closed
ashish-g-lahane opened this issue Apr 21, 2021 · 4 comments · Fixed by #1585
Closed

CallbackException not raised for AsyncEventingBasicConsumer #1038

ashish-g-lahane opened this issue Apr 21, 2021 · 4 comments · Fixed by #1585
Assignees
Milestone

Comments

@ashish-g-lahane
Copy link

ashish-g-lahane commented Apr 21, 2021

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"

@michaelklishin
Copy link
Member

@ashish-g-lahane you are welcome to submit a PR (against master and the 6.x branch) with a test case. Thanks.

@shikow
Copy link

shikow commented Jul 8, 2021

@michaelklishin I have the same issue. Can I submit a PR to main and 6x branch?

@michaelklishin
Copy link
Member

@shikow of course. Thanks.

@lukebakken lukebakken self-assigned this May 31, 2024
@lukebakken lukebakken added this to the 7.0.0 milestone May 31, 2024
lukebakken added a commit that referenced this issue May 31, 2024
@lukebakken
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants