the doc may not be in the correct place, your link if for client side
redelivery.
There are two types of redelivery, client side and server side via the
plugin. Server side kicks in when the client side ends.

Note from one of the tests, to have 'only' the server side plugin do
work, the client side has disabled redelivery.
https://github.com/apache/activemq/blob/main/activemq-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRedeliveryTest.java#L76

the broker redelivery plugin, while configured similar to client side,
has some doc at the end of:
https://activemq.apache.org/message-redelivery-and-dlq-handling.html

On Thu, 11 Nov 2021 at 21:05, J P <jpswe...@gmail.com> wrote:
>
> I have also been fiddling around with the ActiveMQ redeliveryPolicy (again),
> but can NOT get it to work like the documentation says:
>    https://activemq.apache.org/redelivery-policy
>
> My requirement:
>
> If you submit a failing message to the broker,
> I would like it to stay in the queue forever (until it succeeds, or is
> manually deleted)
> and the broker should just try a re-send every 60 secs.
>
> I add
>   schedulerSupport="true"
> in the <broker> tag,
> plus this config:
>
>         <plugins>
>             <redeliveryPlugin fallbackToDeadLetter="false"
>                               sendToDlqIfMaxRetriesExceeded="false">
>                 <redeliveryPolicyMap>
>                     <redeliveryPolicyMap>
>                         <defaultEntry>
>                             <redeliveryPolicy maximumRedeliveries="-1"
>                                               useExponentialBackOff="false"
>                                               redeliveryDelay="60000"
>
> maximumRedeliveryDelay="60000" />
>                         </defaultEntry>
>                     </redeliveryPolicyMap>
>                 </redeliveryPolicyMap>
>             </redeliveryPlugin>
>         </plugins>
>
> With this config, for a "poison-pill" I'm just expecting it to be
> redelivered once every 60 secs forever.
>
> But the actual/observed ActiveMQ behaviour is:
>
> Intitally, re-send the msg once per second, 13 times  (incidentally, this
> is 7+6 if you follow the pattern below)
> Then wait 60 secs.
>
> Then resend once per second, 5 times.
> Wait 60 secs.
>
> Then resend once per second, 4 times.
> Wait 60 secs.
>
> Then resend once per second, 3 times.
> Wait 60 secs.
>
> Then resend once per second, 2 times.
> Wait 60 secs.
>
> After this (4-5 minutes), it will finally follow
> the configured policy, and resend once every 60 secs.
>
> But why does it always start by resending MULTIPLE times once per second,
> seemingly ignoring the config specified?
>
> I have not found any documentation to explain this behaviour.

Reply via email to