Ask Your Question
3

How can I exclude a topic with patterns from the individualDeadLetterStrategy in Activemq 5.17.4?

asked 2022-03-29 11:00:00 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-03-15 10:00:00 +0000

ladyg gravatar image

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.

edit flag offensive delete link more

Your Answer

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

Add Answer


Question Tools

Stats

Asked: 2022-03-29 11:00:00 +0000

Seen: 7 times

Last updated: Mar 15 '23