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

amqp_queue_declare() hangs if called when the broker is in connection.blocked state #836

Open
salcock opened this issue Jul 1, 2024 · 0 comments

Comments

@salcock
Copy link

salcock commented Jul 1, 2024

System details

librabbitmq-c version: 0.10.0
rabbitmq-server version: 3.9.13
OS: Ubuntu 22.04
I'm using the standard Ubuntu packages for librabbitmq-dev and rabbitmq-server.

Description

If the broker is in a connection.blocked state (as described here, calls to amqp_queue_declare() will cause the calling program to hang indefinitely.

I think that the call to amqp_queue_declare() should instead return and set a suitable RPC reply type that would allow the caller to see that the declaration failed due to the broker being blocked.

I've tried calling amqp_simple_wait_frame_noblock() before attempting to declare the queue to try and catch the AMQP_CONNECTION_BLOCKED_METHOD method in the hope that would be an indication that the broker is blocked, but amqp_simple_wait_frame_noblock() only returns AMQP_STATUS_TIMEOUT. I'm assuming that this means AMQP_CONNECTION_BLOCKED_METHOD is only going to be generated in response to a publish attempt?

Is there any other way that I could try to detect that the connection is blocked before calling amqp_queue_declare() ?

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