0

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!

StefanN
  • 527
  • 1
  • 4
  • 12

1 Answers1

0

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.

Tim Bish
  • 17,475
  • 4
  • 32
  • 42
  • Thanks for your answer! I noticed, in ActiveMQ admin console that the messages are being marked as redelivered=true and also that JMSdeliverycount keeps increasing (for example each time I reconnect the client) and goes far beyond 4 or the default 6 redeliveries limit. – StefanN Oct 23 '20 at 20:36
  • Any other ideas maybe? – StefanN Oct 29 '20 at 16:55