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

Exception at amqp_consume_message() while closing consumer connection #838

Open
Purushoth24051999 opened this issue Jul 10, 2024 · 0 comments

Comments

@Purushoth24051999
Copy link

Purushoth24051999 commented Jul 10, 2024

When a consumer connection is closed, I get an exception near amqp_consume_message().

In my program, a thread parallelly executes amqp_consume_message() in a loop. When I'm terminating a connection since a thread is listening in amqp_consume_message() it throws an exception. Is there any way to make this thread exit amqp_consume_message() before terminating a consumer connection

image

I have tried a workaround which is working, what I did was to set my canStart variable to false and publish a dummy message which made this thread to execute lines next to amqp_consume_message() function. After that while loop once again checks the condition since canStart which is set to be false now the loop exits which in turn results in thread exit. This prevented the exception.

But Is there any way for me to avoid this workaround

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

No branches or pull requests

1 participant