This version is still in development and is not considered stable yet. For the latest stable version, please use Spring AMQP 3.2.1!

Micrometer Integration

This section documents the integration with Micrometer. For integration with Micrometer Observation, see Micrometer Observation.

Starting with version 2.2, the listener containers will automatically create and update Micrometer Timer s for the listener, if Micrometer is detected on the class path, and a single MeterRegistry is present in the application context (or exactly one is annotated @Primary, such as when using Spring Boot). The timers can be disabled by setting the container property micrometerEnabled to false.

Two timers are maintained - one for successful calls to the listener and one for failures. With a simple MessageListener, there is a pair of timers for each configured queue.

The timers are named spring.rabbitmq.listener and have the following tags:

  • listenerId : (listener id or container bean name)

  • queue : (the queue name for a simple listener or list of configured queue names when consumerBatchEnabled is true - because a batch may contain messages from multiple queues)

  • result : success or failure

  • exception : none or ListenerExecutionFailedException

You can add additional tags using the micrometerTags container property.