Skip to content

Make it easier to detect blocked connections #1412

@jjank

Description

@jjank

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

  1. 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
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions