camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vguna <gr...@gmx.de>
Subject RE: spring DeadLetterChannel redelivery config
Date Mon, 07 Jul 2008 10:01:17 GMT

Hi Claus.

Sure: https://issues.apache.org/activemq/browse/CAMEL-683

Regards,
Veit




Claus Ibsen wrote:
> 
> Hi
> 
> Thanks a lot for sharing this. Handy for others as well.
> There could be an issue with the initial delay vs. repated delay.
> 
> Do you mind creating a JIRA ticket for this - then its not forgotten.
> Would be nice with a special delay for the first redelivery and then
> another setting for the repeated delay. 
> 
> 
> Med venlig hilsen
>  
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
> 
> -----Original Message-----
> From: vguna [mailto:grave@gmx.de] 
> Sent: 7. juli 2008 11:17
> To: camel-user@activemq.apache.org
> Subject: Re: spring DeadLetterChannel redelivery config
> 
> 
> Hi James.
> 
> Thanks for the reply. It seems to work now. For all, who asking themselves
> how a xml configuration for this will look like, here's an example:
> 
>     <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"/>
> </bean>
> 
> 
> Still one problem left. When an error occurs, a redelivery is executed
> immediately - without the specified delay. After
> that, the redeliveryDelay is used correctly.Is this by design? Would be
> nice, if one could configure a "redeliveryDelay" and a
> "initialRedliveryDelay". Or just simply use the delay on the first
> redelivery attempt, too.
> 
> Regards,
> Veit
> 
> 
> 
> 
> 
> James.Strachan wrote:
>> 
>> I've recently fixed this...
>> 
>> https://issues.apache.org/activemq/browse/CAMEL-662
>> 
>> so you can now specify an errorHandlerRef on a <camelContext> a
>> <route> or <pipeline> element to refer to a spring bean which could be
>> a DeadLetterChannelBuilder or a TransactionalErrorHandlerBuilder etc.
>> 
>> i.e. you can define the errror handler as a normal spring bean now
>> 
>> 2008/3/7 Marc Giger <gigerstyle@gmx.ch>:
>>> Hi,
>>>
>>> I'm trying to configure the DeadLetterChannel with spring.
>>> Unfortunately without success. No matter where I declare the
>>> <onException>, camel tries to redeliver the message 5 times in the case
>>> of an exception.
>>>
>>> How must the following configuration be modified so that camel just
>>> tries to deliver once?
>>>
>>> <camelContext id="camel"
>>> xmlns="http://activemq.apache.org/camel/schema/spring">
>>> <route>
>>>            <from uri="cxf:bean:routerEndpoint"/>
>>>            <onException> <!-- no effect -->
>>>                <redeliveryPolicy>
>>>                    <maximumRedeliveries>0</maximumRedeliveries>
>>>                </redeliveryPolicy>
>>>            </onException>
>>>            <process ref="decryptProcessor">
>>>                <onException> <!-- no effect -->
>>>                    <redeliveryPolicy>
>>>                        <maximumRedeliveries>0</maximumRedeliveries>
>>>                    </redeliveryPolicy>
>>>                </onException>
>>>            </process>
>>>            <choice>
>>>                <when>
>>>                    <methodCall bean="endpointSelector"
>>> method="matches"/> <to
>>> uri="cxf:bean:serviceEndpoint?dataFormat=MESSAGE"/> </when>
>>>                <otherwise>
>>>                    <to
>>> uri="cxf:bean:localEndpoint"/> </otherwise>
>>>            </choice>
>>>        </route>
>>>    </camelContext>
>>>
>>> Thanks a lot!
>>>
>>> Cheers,
>>>
>>> Marc
>>>
>> 
>> 
>> 
>> -- 
>> James
>> -------
>> http://macstrac.blogspot.com/
>> 
>> Open Source Integration
>> http://open.iona.com
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/spring-DeadLetterChannel-redelivery-config-tp15906561s22882p18312842.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/spring-DeadLetterChannel-redelivery-config-tp15906561s22882p18313436.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message