[ https://issues.apache.org/activemq/browse/AMQ-370?page=all ]
     
Hiram Chirino resolved AMQ-370:
-------------------------------

    Fix Version: 4.0
     Resolution: Fixed

Exponential redeliveries are now implemented on the client side correctly in 
activemq 4.0.  I would recommend you upgrade to 4.0.

> Sleeping time between redeliveries
> ----------------------------------
>
>          Key: AMQ-370
>          URL: https://issues.apache.org/activemq/browse/AMQ-370
>      Project: ActiveMQ
>         Type: Improvement

>     Reporter: Daniel Aioanei
>      Fix For: 4.0

>
>
> The method org.activemq.service.impl.SubscriptionImpl.getMessagesToDispatch 
> seems to wait synchronously until the next redelivery is due for each message 
> to be retried. This means that for each message that needs be redelivered 
> let's say the next day, there will be a thread that's going to be sleeping 
> for a whole day. I think there is a lot of space for improvement here, but 
> please correct me if I didn't understand the code correctly.
>                             if (redeliveryPolicy.isBackOffMode()
>                                     && msg.getDeliveryCount() < 
> redeliveryPolicy.getMaximumRetryCount()) {
>                                 long sleepTime = 
> redeliveryPolicy.getInitialRedeliveryTimeout();
>                                 sleepTime *= (msg.getDeliveryCount() * 
> redeliveryPolicy.getBackOffIncreaseRate());
>                                 try {
>                                     Thread.sleep(sleepTime);
>                                 }
>                                 catch (InterruptedException e) {
>                                 }
>                             }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to