You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by spam trap <no...@spamgourmet.com> on 2013/03/06 11:54:25 UTC

Message redelivery to multiple consumers

We need to allow message redelivery to multiple consumers of the same
queue.  The consumers stop and restart/recover the session when they
need.  Unacknowledged messages need to be consumed by any consumer. We
have set the broker up according to the instructions in the page
http://activemq.apache.org/message-redelivery-and-dlq-handling.html

Here is an excerpt from the actual config file:

        <plugins>
          <redeliveryPlugin fallbackToDeadLetter="false"
sendToDlqIfMaxRetriesExceeded="true">
              <redeliveryPolicyMap>
              <redeliveryPolicyMap>
                      <redeliveryPolicyEntries>
                          <!-- a destination specific policy -->
                          <redeliveryPolicy queue="Queue"
maximumRedeliveries="3" redeliveryDelay="10000" />
                      </redeliveryPolicyEntries>
                      <!-- the fallback policy for all other
destinations -->
                      <defaultEntry>
                          <redeliveryPolicy maximumRedeliveries="-1"
initialRedeliveryDelay="5000" redeliveryDelay="10000" />
                      </defaultEntry>
              </redeliveryPolicyMap>
              </redeliveryPolicyMap>
          </redeliveryPlugin>
        </plugins>

We can see it working, in that the messages now are delivered to two
consumers currently running but the messages always end up on the Dead
Letter Queue after a few retries.  What we want is to ensure that the
messages stay on the queue forever until they are consumed and
acknowledged.  Can anyone tell me how to do this, thanks?


Re: Message redelivery to multiple consumers

Posted by Gary Tully <ga...@gmail.com>.
https://issues.apache.org/jira/browse/AMQ-4362 which would allow a
maximumRedeliveries="-1"
to indicate no limit is what you want I think.
A short term solution is to use a very large int like MAX int as the value
for maximumRedeliveries so that poison ack messages (nearly )always get
redelivered.


On 6 March 2013 10:54, spam trap <no...@spamgourmet.com>wrote:

> We need to allow message redelivery to multiple consumers of the same
> queue.  The consumers stop and restart/recover the session when they
> need.  Unacknowledged messages need to be consumed by any consumer. We
> have set the broker up according to the instructions in the page
> http://activemq.apache.org/message-redelivery-and-dlq-handling.html
>
> Here is an excerpt from the actual config file:
>
>         <plugins>
>           <redeliveryPlugin fallbackToDeadLetter="false"
> sendToDlqIfMaxRetriesExceeded="true">
>               <redeliveryPolicyMap>
>               <redeliveryPolicyMap>
>                       <redeliveryPolicyEntries>
>                           <!-- a destination specific policy -->
>                           <redeliveryPolicy queue="Queue"
> maximumRedeliveries="3" redeliveryDelay="10000" />
>                       </redeliveryPolicyEntries>
>                       <!-- the fallback policy for all other
> destinations -->
>                       <defaultEntry>
>                           <redeliveryPolicy maximumRedeliveries="-1"
> initialRedeliveryDelay="5000" redeliveryDelay="10000" />
>                       </defaultEntry>
>               </redeliveryPolicyMap>
>               </redeliveryPolicyMap>
>           </redeliveryPlugin>
>         </plugins>
>
> We can see it working, in that the messages now are delivered to two
> consumers currently running but the messages always end up on the Dead
> Letter Queue after a few retries.  What we want is to ensure that the
> messages stay on the queue forever until they are consumed and
> acknowledged.  Can anyone tell me how to do this, thanks?
>
>


-- 
http://redhat.com
http://blog.garytully.com