Search code examples
activemq-artemisconsumer

How to find out which consumer picking the request (Implemented multiple consumer concept in the ActiveMQ Artemis)


We have 3 producers and 3 consumers. While producers are sending messages to the queue the messages are processed by one of the consumers. We are trying to identify which producers are sending the messages, but we couldn't determine which consumers are processing them.

Help me the find out which consumers taken the taken and processing how to check this things from the ActiveMQ Artemis web console.


Solution

  • The broker doesn't hold on to historical data about which message was acknowledged by which consumer. However, you can enable logging which will give you these details in real time.

    First, configure the LoggingActiveMQServerPlugin in broker.xml as follow:

          <broker-plugins>
             <broker-plugin class-name="org.apache.activemq.artemis.core.server.plugin.impl.LoggingActiveMQServerPlugin">
                <property key="LOG_DELIVERING_EVENTS" value="true"/>
             </broker-plugin>
          </broker-plugins>
    

    Second, enabled DEBUG logging for org.apache.activemq.artemis.core.server.plugin.impl in log4j2.properties, e.g.:

    logger.artemis_utils.name=org.apache.activemq.artemis.core.server.plugin.impl
    logger.artemis_utils.level=DEBUG