AmazonMQ/ActiveMQ Message RedeliveryPolicy MaximumRedeliveries Ignored

381 views Asked by At

I have configured ActiveMQ redelivery plugin as follows (with max 4 redeliveries)

  <redeliveryPlugin fallbackToDeadLetter="true" sendToDlqIfMaxRetriesExceeded="true">
  <redeliveryPolicyMap>
    <redeliveryPolicyMap>
      <defaultEntry>
        <redeliveryPolicy initialRedeliveryDelay="5000" maximumRedeliveries="4" redeliveryDelay="10000"/>
      </defaultEntry>
    </redeliveryPolicyMap>
  </redeliveryPolicyMap>
</redeliveryPlugin>

If a client fails to send ACK the message is redelivered. So far so good... However, the max redeliveries are completely ignored by the broker and it keeps redelivering the messages "infinitely" many times. Also the message is never moved to DLQ.

I also tried using: ?jms.redeliveryPolicy.maximumRedeliveries=4 on the connection URI (STOMP Connector), but also with no luck.

Any help is most appreciated!

1

There are 1 answers

2
Tim Bish On

For a STOMP client I would assume that the broker will not consider the message as being delivered unless the client either ACKs it or NACKs it otherwise it must assume that it never made it to a client and therefore treats it as always having a delivery count of zero. The broker redelivery plugin keys off the message's delivery count so if the message is treated as not having been delivered which in this case it likely is then it will take no action on the message.