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.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-03-29 11:00:00 +0000
Seen: 7 times
Last updated: Mar 15 '23