[jira] Created: (CAMEL-683) Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (CAMEL-683) Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.

JIRA jira@apache.org
Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.
----------------------------------------------------------------------------------------

                 Key: CAMEL-683
                 URL: https://issues.apache.org/activemq/browse/CAMEL-683
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-jms
    Affects Versions: 1.3.0
         Environment: Linux, ActiveMQ 5.1, Spring 2.5.x with transacted DefaultMessageListenerContainer
            Reporter: Veit Guna


Hi.

I'm using ActiveMQ 5.1 together with Spring's DefaultMessageListenerContainer to enable MDPs. I'm using the redeliveryPolicy to enable redelivery on failures during consumption of a message. ActiveMQ configuration looks like this:

    <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">

        <route errorHandlerRef="deadLetterErrorHandler">
                <from uri="activemq:NEW" />
        </route>
    </camelContext>


<bean id="deadLetterErrorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder">
    <property name="redeliveryPolicy" ref="redeliveryPolicyConfig"/>
</bean>

<bean id="redeliveryPolicyConfig" class="org.apache.camel.processor.RedeliveryPolicy">
    <property name="maximumRedeliveries" value="4"/>
    <property name="initialRedeliveryDelay" value="30000"/>
    <property name="useExponentialBackOff" value="true"/>
    <property name="backOffMultiplier" value="2" />
</bean>


Now if a failure occurs, the configured delay isn't used on the first redelivery attempt. Instead redelivery takes place immediately after the failure occured. This sounds odd to me, since the property is even called initialRedeliveryDelay :). I know that maybe this was caused due to the following issue:

https://issues.apache.org/activemq/browse/AMQ-1032

In my opinion immediately redelivery isn't very useful in most cases. If a failure occurs, it won't be fixed some ms later :). So my suggestion is (in respect to AMQ-1032) to have two options:

initialRedeliveryDelay
redeliveryDelay

So both configurations would be possible. For AMQ-1032 just configure initialRedeliveryDelay to 0. Otherwise just take the redeliveryDelay as initialRedeliveryDelay to get what I want :).

Does this make sense?


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-683) Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.

JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-683:
------------------------------

    Affects Version/s: 1.4.0

> Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-683
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-683
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jms
>    Affects Versions: 1.3.0, 1.4.0
>         Environment: Linux, ActiveMQ 5.1, Spring 2.5.x with transacted DefaultMessageListenerContainer
>            Reporter: Veit Guna
>
> Hi.
> I'm using ActiveMQ 5.1 together with Spring's DefaultMessageListenerContainer to enable MDPs. I'm using the redeliveryPolicy to enable redelivery on failures during consumption of a message. ActiveMQ configuration looks like this:
>     <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
>         <route errorHandlerRef="deadLetterErrorHandler">
>                 <from uri="activemq:NEW" />
>         </route>
>     </camelContext>
> <bean id="deadLetterErrorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder">
>     <property name="redeliveryPolicy" ref="redeliveryPolicyConfig"/>
> </bean>
> <bean id="redeliveryPolicyConfig" class="org.apache.camel.processor.RedeliveryPolicy">
>     <property name="maximumRedeliveries" value="4"/>
>     <property name="initialRedeliveryDelay" value="30000"/>
>     <property name="useExponentialBackOff" value="true"/>
>     <property name="backOffMultiplier" value="2" />
> </bean>
> Now if a failure occurs, the configured delay isn't used on the first redelivery attempt. Instead redelivery takes place immediately after the failure occured. This sounds odd to me, since the property is even called initialRedeliveryDelay :). I know that maybe this was caused due to the following issue:
> https://issues.apache.org/activemq/browse/AMQ-1032
> In my opinion immediately redelivery isn't very useful in most cases. If a failure occurs, it won't be fixed some ms later :). So my suggestion is (in respect to AMQ-1032) to have two options:
> initialRedeliveryDelay
> redeliveryDelay
> So both configurations would be possible. For AMQ-1032 just configure initialRedeliveryDelay to 0. Otherwise just take the redeliveryDelay as initialRedeliveryDelay to get what I want :).
> Does this make sense?

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-683) Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-683:
------------------------------

        Fix Version/s: 1.4.0
                       1.5.0
    Affects Version/s:     (was: 1.3.0)

> Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-683
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-683
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jms
>    Affects Versions: 1.4.0
>         Environment: Linux, ActiveMQ 5.1, Spring 2.5.x with transacted DefaultMessageListenerContainer
>            Reporter: Veit Guna
>             Fix For: 1.4.0, 1.5.0
>
>
> Hi.
> I'm using ActiveMQ 5.1 together with Spring's DefaultMessageListenerContainer to enable MDPs. I'm using the redeliveryPolicy to enable redelivery on failures during consumption of a message. ActiveMQ configuration looks like this:
>     <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
>         <route errorHandlerRef="deadLetterErrorHandler">
>                 <from uri="activemq:NEW" />
>         </route>
>     </camelContext>
> <bean id="deadLetterErrorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder">
>     <property name="redeliveryPolicy" ref="redeliveryPolicyConfig"/>
> </bean>
> <bean id="redeliveryPolicyConfig" class="org.apache.camel.processor.RedeliveryPolicy">
>     <property name="maximumRedeliveries" value="4"/>
>     <property name="initialRedeliveryDelay" value="30000"/>
>     <property name="useExponentialBackOff" value="true"/>
>     <property name="backOffMultiplier" value="2" />
> </bean>
> Now if a failure occurs, the configured delay isn't used on the first redelivery attempt. Instead redelivery takes place immediately after the failure occured. This sounds odd to me, since the property is even called initialRedeliveryDelay :). I know that maybe this was caused due to the following issue:
> https://issues.apache.org/activemq/browse/AMQ-1032
> In my opinion immediately redelivery isn't very useful in most cases. If a failure occurs, it won't be fixed some ms later :). So my suggestion is (in respect to AMQ-1032) to have two options:
> initialRedeliveryDelay
> redeliveryDelay
> So both configurations would be possible. For AMQ-1032 just configure initialRedeliveryDelay to 0. Otherwise just take the redeliveryDelay as initialRedeliveryDelay to get what I want :).
> Does this make sense?

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-683) Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44084#action_44084 ]

Claus Ibsen commented on CAMEL-683:
-----------------------------------

I have just tried an unit test and it sleeps for 30 seconds.
[                          main] RedeliveryPolicy               DEBUG Sleeping for: 30000 millis until attempting redelivery

And then on the 2nd
[                          main] RedeliveryPolicy               DEBUG Sleeping for: 60000 millis until attempting redelivery

Your route doesn't do anything with the received message from activemq:NEW. How do you actually trigger the failure and the redelivery?

> Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-683
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-683
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jms
>    Affects Versions: 1.4.0
>         Environment: Linux, ActiveMQ 5.1, Spring 2.5.x with transacted DefaultMessageListenerContainer
>            Reporter: Veit Guna
>             Fix For: 1.4.0, 1.5.0
>
>
> Hi.
> I'm using ActiveMQ 5.1 together with Spring's DefaultMessageListenerContainer to enable MDPs. I'm using the redeliveryPolicy to enable redelivery on failures during consumption of a message. ActiveMQ configuration looks like this:
>     <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
>         <route errorHandlerRef="deadLetterErrorHandler">
>                 <from uri="activemq:NEW" />
>         </route>
>     </camelContext>
> <bean id="deadLetterErrorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder">
>     <property name="redeliveryPolicy" ref="redeliveryPolicyConfig"/>
> </bean>
> <bean id="redeliveryPolicyConfig" class="org.apache.camel.processor.RedeliveryPolicy">
>     <property name="maximumRedeliveries" value="4"/>
>     <property name="initialRedeliveryDelay" value="30000"/>
>     <property name="useExponentialBackOff" value="true"/>
>     <property name="backOffMultiplier" value="2" />
> </bean>
> Now if a failure occurs, the configured delay isn't used on the first redelivery attempt. Instead redelivery takes place immediately after the failure occured. This sounds odd to me, since the property is even called initialRedeliveryDelay :). I know that maybe this was caused due to the following issue:
> https://issues.apache.org/activemq/browse/AMQ-1032
> In my opinion immediately redelivery isn't very useful in most cases. If a failure occurs, it won't be fixed some ms later :). So my suggestion is (in respect to AMQ-1032) to have two options:
> initialRedeliveryDelay
> redeliveryDelay
> So both configurations would be possible. For AMQ-1032 just configure initialRedeliveryDelay to 0. Otherwise just take the redeliveryDelay as initialRedeliveryDelay to get what I want :).
> Does this make sense?

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-683) Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44085#action_44085 ]

Claus Ibsen commented on CAMEL-683:
-----------------------------------

I have tried with a jms example and it works in the unit tests in the source code.

Are you sure you have Camel 1.4-SNAPSHOT in ActiveMQ where you run your project?

> Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-683
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-683
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jms
>    Affects Versions: 1.4.0
>         Environment: Linux, ActiveMQ 5.1, Spring 2.5.x with transacted DefaultMessageListenerContainer
>            Reporter: Veit Guna
>             Fix For: 1.4.0, 1.5.0
>
>
> Hi.
> I'm using ActiveMQ 5.1 together with Spring's DefaultMessageListenerContainer to enable MDPs. I'm using the redeliveryPolicy to enable redelivery on failures during consumption of a message. ActiveMQ configuration looks like this:
>     <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
>         <route errorHandlerRef="deadLetterErrorHandler">
>                 <from uri="activemq:NEW" />
>         </route>
>     </camelContext>
> <bean id="deadLetterErrorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder">
>     <property name="redeliveryPolicy" ref="redeliveryPolicyConfig"/>
> </bean>
> <bean id="redeliveryPolicyConfig" class="org.apache.camel.processor.RedeliveryPolicy">
>     <property name="maximumRedeliveries" value="4"/>
>     <property name="initialRedeliveryDelay" value="30000"/>
>     <property name="useExponentialBackOff" value="true"/>
>     <property name="backOffMultiplier" value="2" />
> </bean>
> Now if a failure occurs, the configured delay isn't used on the first redelivery attempt. Instead redelivery takes place immediately after the failure occured. This sounds odd to me, since the property is even called initialRedeliveryDelay :). I know that maybe this was caused due to the following issue:
> https://issues.apache.org/activemq/browse/AMQ-1032
> In my opinion immediately redelivery isn't very useful in most cases. If a failure occurs, it won't be fixed some ms later :). So my suggestion is (in respect to AMQ-1032) to have two options:
> initialRedeliveryDelay
> redeliveryDelay
> So both configurations would be possible. For AMQ-1032 just configure initialRedeliveryDelay to 0. Otherwise just take the redeliveryDelay as initialRedeliveryDelay to get what I want :).
> Does this make sense?

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (CAMEL-683) Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-683:
---------------------------------

    Assignee: Claus Ibsen

> Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-683
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-683
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jms
>    Affects Versions: 1.4.0
>         Environment: Linux, ActiveMQ 5.1, Spring 2.5.x with transacted DefaultMessageListenerContainer
>            Reporter: Veit Guna
>            Assignee: Claus Ibsen
>             Fix For: 1.4.0, 1.5.0
>
>
> Hi.
> I'm using ActiveMQ 5.1 together with Spring's DefaultMessageListenerContainer to enable MDPs. I'm using the redeliveryPolicy to enable redelivery on failures during consumption of a message. ActiveMQ configuration looks like this:
>     <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
>         <route errorHandlerRef="deadLetterErrorHandler">
>                 <from uri="activemq:NEW" />
>         </route>
>     </camelContext>
> <bean id="deadLetterErrorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder">
>     <property name="redeliveryPolicy" ref="redeliveryPolicyConfig"/>
> </bean>
> <bean id="redeliveryPolicyConfig" class="org.apache.camel.processor.RedeliveryPolicy">
>     <property name="maximumRedeliveries" value="4"/>
>     <property name="initialRedeliveryDelay" value="30000"/>
>     <property name="useExponentialBackOff" value="true"/>
>     <property name="backOffMultiplier" value="2" />
> </bean>
> Now if a failure occurs, the configured delay isn't used on the first redelivery attempt. Instead redelivery takes place immediately after the failure occured. This sounds odd to me, since the property is even called initialRedeliveryDelay :). I know that maybe this was caused due to the following issue:
> https://issues.apache.org/activemq/browse/AMQ-1032
> In my opinion immediately redelivery isn't very useful in most cases. If a failure occurs, it won't be fixed some ms later :). So my suggestion is (in respect to AMQ-1032) to have two options:
> initialRedeliveryDelay
> redeliveryDelay
> So both configurations would be possible. For AMQ-1032 just configure initialRedeliveryDelay to 0. Otherwise just take the redeliveryDelay as initialRedeliveryDelay to get what I want :).
> Does this make sense?

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (CAMEL-683) Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-683.
-------------------------------

    Fix Version/s:     (was: 1.5.0)
       Resolution: Won't Fix

Hi Claus.

Meanwhile I've realized that the problem is a misunderstanding on my side what camel is supposed to do.
I thought I can configure the redelivery behavior of ActiveMQ within the camelContext as part of the acivemq.xml configuration on a per destination basis. What I haven't mentioned is, that my listener/consumer for the queue isn't configured within camel or activemq but in a separate spring baked application. What I now have realized is, that I have to consume a message via camel to get it's routing/mediation support (including redelivery
features) - now it's crystal clear to me (or not?). So I configured redeliveryPolicy on a ActiveMQConnectionFactory on my spring baked application and the settings are working fine now.

Sorry for mixing things up.

Thanks for you help.

Regards,
Veit


> Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-683
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-683
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jms
>    Affects Versions: 1.4.0
>         Environment: Linux, ActiveMQ 5.1, Spring 2.5.x with transacted DefaultMessageListenerContainer
>            Reporter: Veit Guna
>            Assignee: Claus Ibsen
>             Fix For: 1.4.0
>
>
> Hi.
> I'm using ActiveMQ 5.1 together with Spring's DefaultMessageListenerContainer to enable MDPs. I'm using the redeliveryPolicy to enable redelivery on failures during consumption of a message. ActiveMQ configuration looks like this:
>     <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
>         <route errorHandlerRef="deadLetterErrorHandler">
>                 <from uri="activemq:NEW" />
>         </route>
>     </camelContext>
> <bean id="deadLetterErrorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder">
>     <property name="redeliveryPolicy" ref="redeliveryPolicyConfig"/>
> </bean>
> <bean id="redeliveryPolicyConfig" class="org.apache.camel.processor.RedeliveryPolicy">
>     <property name="maximumRedeliveries" value="4"/>
>     <property name="initialRedeliveryDelay" value="30000"/>
>     <property name="useExponentialBackOff" value="true"/>
>     <property name="backOffMultiplier" value="2" />
> </bean>
> Now if a failure occurs, the configured delay isn't used on the first redelivery attempt. Instead redelivery takes place immediately after the failure occured. This sounds odd to me, since the property is even called initialRedeliveryDelay :). I know that maybe this was caused due to the following issue:
> https://issues.apache.org/activemq/browse/AMQ-1032
> In my opinion immediately redelivery isn't very useful in most cases. If a failure occurs, it won't be fixed some ms later :). So my suggestion is (in respect to AMQ-1032) to have two options:
> initialRedeliveryDelay
> redeliveryDelay
> So both configurations would be possible. For AMQ-1032 just configure initialRedeliveryDelay to 0. Otherwise just take the redeliveryDelay as initialRedeliveryDelay to get what I want :).
> Does this make sense?

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Reopened: (CAMEL-683) Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Veit Guna reopened CAMEL-683:
-----------------------------


Hi.

Sorry for reopening but the redeliveryDelay problem still exists. But it seems no camel problem then because I'm not using camel anymore, instead the redeliveryPolicy on the AQConnectionFactory.

So, should that be moved to the AQM project then? There I'm using AMQ 5.1.0 (Camel 1.3).


> Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-683
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-683
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jms
>    Affects Versions: 1.4.0
>         Environment: Linux, ActiveMQ 5.1, Spring 2.5.x with transacted DefaultMessageListenerContainer
>            Reporter: Veit Guna
>            Assignee: Claus Ibsen
>             Fix For: 1.4.0
>
>
> Hi.
> I'm using ActiveMQ 5.1 together with Spring's DefaultMessageListenerContainer to enable MDPs. I'm using the redeliveryPolicy to enable redelivery on failures during consumption of a message. ActiveMQ configuration looks like this:
>     <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
>         <route errorHandlerRef="deadLetterErrorHandler">
>                 <from uri="activemq:NEW" />
>         </route>
>     </camelContext>
> <bean id="deadLetterErrorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder">
>     <property name="redeliveryPolicy" ref="redeliveryPolicyConfig"/>
> </bean>
> <bean id="redeliveryPolicyConfig" class="org.apache.camel.processor.RedeliveryPolicy">
>     <property name="maximumRedeliveries" value="4"/>
>     <property name="initialRedeliveryDelay" value="30000"/>
>     <property name="useExponentialBackOff" value="true"/>
>     <property name="backOffMultiplier" value="2" />
> </bean>
> Now if a failure occurs, the configured delay isn't used on the first redelivery attempt. Instead redelivery takes place immediately after the failure occured. This sounds odd to me, since the property is even called initialRedeliveryDelay :). I know that maybe this was caused due to the following issue:
> https://issues.apache.org/activemq/browse/AMQ-1032
> In my opinion immediately redelivery isn't very useful in most cases. If a failure occurs, it won't be fixed some ms later :). So my suggestion is (in respect to AMQ-1032) to have two options:
> initialRedeliveryDelay
> redeliveryDelay
> So both configurations would be possible. For AMQ-1032 just configure initialRedeliveryDelay to 0. Otherwise just take the redeliveryDelay as initialRedeliveryDelay to get what I want :).
> Does this make sense?

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-683) Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44091#action_44091 ]

Claus Ibsen commented on CAMEL-683:
-----------------------------------

Hi Veit

Yes please open a ticket on the ActiveMQ project if its solely an ActiveMQ problem.
http://issues.apache.org/activemq/browse/AMQ

> Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-683
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-683
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jms
>    Affects Versions: 1.4.0
>         Environment: Linux, ActiveMQ 5.1, Spring 2.5.x with transacted DefaultMessageListenerContainer
>            Reporter: Veit Guna
>            Assignee: Claus Ibsen
>             Fix For: 1.4.0
>
>
> Hi.
> I'm using ActiveMQ 5.1 together with Spring's DefaultMessageListenerContainer to enable MDPs. I'm using the redeliveryPolicy to enable redelivery on failures during consumption of a message. ActiveMQ configuration looks like this:
>     <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
>         <route errorHandlerRef="deadLetterErrorHandler">
>                 <from uri="activemq:NEW" />
>         </route>
>     </camelContext>
> <bean id="deadLetterErrorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder">
>     <property name="redeliveryPolicy" ref="redeliveryPolicyConfig"/>
> </bean>
> <bean id="redeliveryPolicyConfig" class="org.apache.camel.processor.RedeliveryPolicy">
>     <property name="maximumRedeliveries" value="4"/>
>     <property name="initialRedeliveryDelay" value="30000"/>
>     <property name="useExponentialBackOff" value="true"/>
>     <property name="backOffMultiplier" value="2" />
> </bean>
> Now if a failure occurs, the configured delay isn't used on the first redelivery attempt. Instead redelivery takes place immediately after the failure occured. This sounds odd to me, since the property is even called initialRedeliveryDelay :). I know that maybe this was caused due to the following issue:
> https://issues.apache.org/activemq/browse/AMQ-1032
> In my opinion immediately redelivery isn't very useful in most cases. If a failure occurs, it won't be fixed some ms later :). So my suggestion is (in respect to AMQ-1032) to have two options:
> initialRedeliveryDelay
> redeliveryDelay
> So both configurations would be possible. For AMQ-1032 just configure initialRedeliveryDelay to 0. Otherwise just take the redeliveryDelay as initialRedeliveryDelay to get what I want :).
> Does this make sense?

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (CAMEL-683) Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-683.
-------------------------------

    Resolution: Fixed

> Redelivery on a failure doesn't respect the initialRedeliveryDelay on the first attempt.
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-683
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-683
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jms
>    Affects Versions: 1.4.0
>         Environment: Linux, ActiveMQ 5.1, Spring 2.5.x with transacted DefaultMessageListenerContainer
>            Reporter: Veit Guna
>            Assignee: Claus Ibsen
>             Fix For: 1.4.0
>
>
> Hi.
> I'm using ActiveMQ 5.1 together with Spring's DefaultMessageListenerContainer to enable MDPs. I'm using the redeliveryPolicy to enable redelivery on failures during consumption of a message. ActiveMQ configuration looks like this:
>     <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
>         <route errorHandlerRef="deadLetterErrorHandler">
>                 <from uri="activemq:NEW" />
>         </route>
>     </camelContext>
> <bean id="deadLetterErrorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder">
>     <property name="redeliveryPolicy" ref="redeliveryPolicyConfig"/>
> </bean>
> <bean id="redeliveryPolicyConfig" class="org.apache.camel.processor.RedeliveryPolicy">
>     <property name="maximumRedeliveries" value="4"/>
>     <property name="initialRedeliveryDelay" value="30000"/>
>     <property name="useExponentialBackOff" value="true"/>
>     <property name="backOffMultiplier" value="2" />
> </bean>
> Now if a failure occurs, the configured delay isn't used on the first redelivery attempt. Instead redelivery takes place immediately after the failure occured. This sounds odd to me, since the property is even called initialRedeliveryDelay :). I know that maybe this was caused due to the following issue:
> https://issues.apache.org/activemq/browse/AMQ-1032
> In my opinion immediately redelivery isn't very useful in most cases. If a failure occurs, it won't be fixed some ms later :). So my suggestion is (in respect to AMQ-1032) to have two options:
> initialRedeliveryDelay
> redeliveryDelay
> So both configurations would be possible. For AMQ-1032 just configure initialRedeliveryDelay to 0. Otherwise just take the redeliveryDelay as initialRedeliveryDelay to get what I want :).
> Does this make sense?

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.