1 | initial version |
You can exclude a topic with patterns from the individualDeadLetterStrategy in Apache ActiveMQ 5.17.4 by modifying the "deadLetterStrategy" configuration in the "destinationPolicy" section of the broker XML configuration file. Here is an example:
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry queue=">" topic=">" nackOnRollback="true">
<deadLetterStrategy>
<individualDeadLetterStrategy
processExpired="false"
useQueueForQueueMessages="true"
deadLetterQueuePrefix="DLQ."
processNonPersistent="true"
excludedDestinations="myTopicPattern"
/>
</deadLetterStrategy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
In the above example, the "excludedDestinations" property is set to "myTopicPattern", which is a regular expression that matches any topic destination that you want to exclude from the individualDeadLetterStrategy. You can replace "myTopicPattern" with your own regular expression that matches the topic destinations you want to exclude.