简体   繁体   中英

ActiveMQ Redelivery - send invalid message to the back of the Q

Upon Redelivery how can I send the message to the back of the Q? Currently, it sends the message to the front of the Q, consequently the other messages are stuck

In case of exhaustion of redelivery, don't put the message back to the original queue, instead make use of the DLQ (deadletter queue) mechanism.

Example broker config:

<destinationPolicy>
  <policyMap>
    <policyEntries>
      <!-- Set the following policy on all queues using the '>' wildcard -->
      <policyEntry queue=">">
        <deadLetterStrategy>
            <!--
              Use the prefix 'DLQ.' for the destination name, and make
              the DLQ a queue rather than a topic
            -->
          <individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true"/>
        </deadLetterStrategy>
      </policyEntry>
    </policyEntries>
  </policyMap>
</destinationPolicy>

For more details see the ActiveMQ documentation .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM