camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mta38 <>
Subject Exception, ErrorHandler and redelivery
Date Wed, 27 May 2009 14:32:20 GMT

Hi all,

I play with Exception, ErrorHandler and redelivery (Camel 2.0-M1) and there
are some things  that I can't understand :confused:.

snippet code

<bean id="globalDeadLetterChannel"
         <property name="defaultDeadLetterEndpointUri"
    <property name="onRedelivery" ref="routeRedelivery"/> 
          <property name="redeliveryPolicy"> 
    	 	<bean id="redeliveryPolicyConfig"
    	 		 <property name="maximumRedeliveries" value="1"/>

<camelContext  id="camelContext"  errorHandlerRef="globalDeadLetterChannel"
		<onException >
			<to uri="direct:response" />

… other routes …


routeRedelivery bean is a processor which make some trace  in a log file.

When I raise a runtimeException, the process method of routeRedelivery bean
is not called. I can't understand why, since onRedelivery property is
defined for my global dead letter channel.

If I modify onException element like following:

<onException onRedeliveryRef="routeRedelivery">
	<redeliveryPolicy maximumRedeliveries="1"/>	
	<to uri="direct:response" />

And I raised a RuntimeException, I have some trace in my log file that
proves that process method of routeRedelivery bean is called.

Is someone can explain me why onRedelivery processor is not called when it's
defined in global scope will be appreciated.
Best regards,

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message