Is your feature request related to a problem? Please describe.
TL;DR: Detecting blocked connections can be quite tricky when you don't have access to the broker
- In the project I'm currently on we are using the
rabbitmq-jms client (not my choice but we cannot change this in the forseeable future)
- For reasons beyond our control the RabbitMQ broker blocked our clients again and again (Ops is working to resolve this properly)
- We found it quite hard to get to the bottom of this, specifically:
- We found no (supported?) way to add a
BlockedListener using the rabbitmq-jms apis (as far as I remember access to com.rabbitmq.client.Connection is hidden behind the ConnectionFactory but that's a deliberate decision I suppose and a different discussion)
- To the best of our research no default (e.g. logging) happens upon blocking
MetricsCollector does not record blocked connections
Describe the solution you'd like
- Track/Record blocked connections in
MetricsCollector - I've drafted a proposal and would be happy to file a PR for this to get your opinion
- Optionally: Consider adding a default
BlockedListener to AMQConnection that at the very least logs a warning upon blocking
Describe alternatives you've considered
Additional context
Is your feature request related to a problem? Please describe.
TL;DR: Detecting blocked connections can be quite tricky when you don't have access to the broker
rabbitmq-jmsclient (not my choice but we cannot change this in the forseeable future)BlockedListenerusing therabbitmq-jmsapis (as far as I remember access tocom.rabbitmq.client.Connectionis hidden behind theConnectionFactorybut that's a deliberate decision I suppose and a different discussion)MetricsCollectordoes not record blocked connectionsDescribe the solution you'd like
MetricsCollector- I've drafted a proposal and would be happy to file a PR for this to get your opinionBlockedListenertoAMQConnectionthat at the very least logs a warning upon blockingDescribe alternatives you've considered
Additional context