camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From praveenbillampati <praveenbillamp...@gmail.com>
Subject Camel onException configuration resulting to infinite loop of retries
Date Tue, 17 Jul 2012 13:52:09 GMT
Hi,

I am facing a problem with camel onException configuration. When
*AdapterException*(sub type of Exception class) is thrown from application
*bean:processRequestBean*, camel context is making *infinite retires without
honoring the retry configuration* made in the route. Please find the below
route for configuration I have added. 

Please let me know where I am missing the dot.

Thanks
Praveen

<route id="processResponseRoute">
<from
uri="mqjms:java:comp/env/jms/mq/sample/serviceResponseQ?concurrentConsumers=5"
/>
<filter>
<method bean="validationBean" method="processDecision" />
	<to uri="bean:ServiceBean?method=processAsyncServiceResponse" />

	<onException redeliveryPolicyRef="asyncExceptionRedelivery"
useOriginalMessage="true">
	<exception>com.local.common.async.exception.DataAccessException</exception>
	<redeliveryPolicy redeliveryDelay="10000" retryAttemptedLogLevel="ERROR"
maximumRedeliveries="2" />
	<handled>
	<constant>true</constant>
	</handled>
	<to uri="mqjms:java:comp/env/jms/mq/sample/responseErrorQ" />
	</onException>

	<onException useOriginalMessage="true">

<exception>com.local.common.async.exception.InvalidAsyncServiceRequestException</exception>

<exception>com.local.common.entity.statemanagement.exception.InvalidEntityStateException</exception>
	*<exception>com.local.common.service.adapter.AdapterException</exception>* 
	*<redeliveryPolicy redeliveryDelay="10000" retryAttemptedLogLevel="ERROR"
maximumRedeliveries="2" />*
	<handled>
	<constant>true</constant>
	</handled>
	<to uri="mqjms:java:comp/env/jms/mq/sample/responseErrorQ" />
	</onException>

	<choice>
	   <when>
		<method bean="statusValidationBean" method="processCamelDecision" /> 
		<filter>
		<method bean="checkEnableFlagBean" method="processCamelDecision" /> 
		<multicast parallelProcessing="true">
			<pipeline>
				<filter>
				<method bean="checkDuplicateCall" method="processCamelDecision" />
				*<to uri="bean:processRequestBean?method=processCamelExchange" />*
				</filter>
			</pipeline>
		</multicast>
		</filter>
	   </when>
	   <otherwise>
		<to uri="mqjms:java:comp/env/jms/mq/sample/responseErrorQ" />
	   </otherwise>
	</choice>
</filter>
</route>

--
View this message in context: http://camel.465427.n5.nabble.com/Camel-onException-configuration-resulting-to-infinite-loop-of-retries-tp5716158.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message