1
votes

I'm only trying to use ActiveMQ queue mechanism and not topic. Does the below activemq.xml configuration force any clients to use a topic instead of a queue of can I ignore the policyEntry topic=">"? I'm seeing issues where multiple consumers sometimes (very small percentage) pick up the same message and process it. In the admin console it shows I have a queue. I do see that the default activemq.xml contains a policyEntry for both topic and queue. Its a bit odd that not all messages are consumed by multiple consumer threads if this config is indeed invalid for a queue based approach.

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

1 Answers

3
votes

The line you pointed out only means that policy is defined for all topics,

In activemq '>' does the same thing as '*' does in other languages i.e it is default handler for all types.

You can remove that configuartion if you have doubts.

As your pending message stratergy is defined in the policyEntry it will be applicable to all topics,not queues.