0
我只是试图使用ActiveMQ队列机制,而不是主题。下面的activemq.xml配置是否强制任何客户端使用主题而不是队列?我可以忽略policyEntry topic=">"
?我看到有多个消费者有时(很小的比例)拿起相同的消息并处理它的问题。在管理控制台中显示我有一个队列。我确实看到默认的activemq.xml包含主题和队列的policyEntry。有点奇怪,如果这种配置对于基于队列的方法确实无效,那么并非所有的消息都被多个消费者线程使用。ActiveMQ主题policyEntry
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}" persistent="false">
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">" >
<!-- The constantPendingMessageLimitStrategy is used to prevent
slow topic consumers to block producers and affect other consumers
by limiting the number of messages that are retained
For more information, see:
http://activemq.apache.org/slow-consumer-handling.html
-->
<pendingMessageLimitStrategy>
<constantPendingMessageLimitStrategy limit="1000"/>
</pendingMessageLimitStrategy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>