如何找出哪个消费者选择了请求(在ActiveMQ Artemis中实现了多个消费者概念)

问题描述 投票:0回答:1

我们有 3 个生产者和 3 个消费者。当生产者向队列发送消息时,消息由其中一位消费者处理。我们正在尝试确定哪些生产者正在发送消息,但我们无法确定哪些消费者正在处理它们。

帮助我找出哪些消费者采取了采取的行动,并处理如何从 ActiveMQ Artemis Web 控制台检查这些内容。

activemq-artemis consumer
1个回答
0
投票

代理不保留有关哪个消息被哪个消费者确认的历史数据。但是,您可以启用日志记录,这将实时为您提供这些详细信息。

首先,在

LoggingActiveMQServerPlugin
中配置
broker.xml
,如下:

      <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>

其次,在

DEBUG
中启用
org.apache.activemq.artemis.core.server.plugin.impl
记录
log4j2.properties
,例如:

logger.artemis_utils.name=org.apache.activemq.artemis.core.server.plugin.impl
logger.artemis_utils.level=DEBUG
© www.soinside.com 2019 - 2024. All rights reserved.