Skip to content

Fix broker queues API with Redis.#81

Open
adarnimrod wants to merge 1 commit intokodless:masterfrom
adarnimrod:redis-queues-fix
Open

Fix broker queues API with Redis.#81
adarnimrod wants to merge 1 commit intokodless:masterfrom
adarnimrod:redis-queues-fix

Conversation

@adarnimrod
Copy link

With non-AMPQ brokers get_manager_client returns None for the client which obviously doesn't have the is_alive() method. So we need to check if the connection driver type is AMQP otherwise /v1/broker/queues returns 503 with a broker_not_reachable error. Fix the same issue with purge_queue() which I haven't encountered.

I'm not sure where are the tests, but adding a call to /v1/broker/queues with a Redis subscription configured would have caught it. I don't think that there's any need to update the documentation. I can open an issue if it's needed. There aren't any breaking changes with this PR (but a hotfix release would be appreciated).

@adarnimrod
Copy link
Author

CC @kodless (can't add you as a reviewer so I pinged you here).

With non-AMPQ brokers `get_manager_client` returns `None` for the client
which obviously doesn't have the `is_alive()` method. So we need to
check if the connection driver type is AMQP otherwise
`/v1/broker/queues` returns 503 with a `broker_not_reachable` error. Fix
the same issue with `purge_queue()` which I haven't encountered.
@PhilipGarnero
Copy link

Can we merge this ?

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 this pull request may close these issues.

2 participants