You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
The text was updated successfully, but these errors were encountered:
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
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
The text was updated successfully, but these errors were encountered: