camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhaumikananda <bhaumikana...@gmail.com>
Subject My camel route not able to handle exception.
Date Sat, 14 Sep 2013 18:19:30 GMT
	<routeContext id="fitOptsRoutesCtx"
xmlns="http://camel.apache.org/schema/spring">
		<route id="fitOptInMsgRoute">
			<from ref="fitOptInMsgQueue"/>
			<transacted ref="PROPAGATION_REQUIRED_FIT_OPTION"/>
			<setProperty propertyName="jmsxDeliveryCount">
        		<constant>{{mySystem.route.jmsx.delivery.count}}</constant>
      		</setProperty>
      		<choice>
				<when>
					<simple>${in.header.JMSXDeliveryCount} != null and
${property.jmsxDeliveryCount} > ${in.header.JMSXDeliveryCount} </simple>
						<process ref="fitOptStpIdValidator"/>
						<process ref="fitOptExchangeHelper"/>
						<doTry>
							<bean ref="rawMsgSqlInputBuilder" method="populateFITOptParam"/>
							<to uri="{{raw.message.insertSql.uri}}"/>
							<doCatch>
								<exception>org.springframework.dao.DuplicateKeyException</exception>
								<log message="Duplicate Raw trade message..." loggingLevel="INFO"
logName="com.bbb.sbrs.mySystem.util.FITOptInLogger"/>
							</doCatch>
						</doTry>
						<process ref="revertExchangeProcessor"/>
						<log message="Raw FIT Trade Message persisted and processing..."
loggingLevel="INFO" logName="com.bbb.sbrs.mySystem.util.FITOptInLogger"/>
						<split parallelProcessing="true" stopOnException="false"
strategyRef="fitOptAggregator">
							<xpath>/insertDeal/request/dealData/trade/trade</xpath>
							<log message="Processing message after split" loggingLevel="INFO"
logName="com.bbb.sbrs.mySystem.util.FITOptInLogger" />
							<setProperty propertyName="SID">
				        		<simple>SOME_SID</simple>
				      		</setProperty>
				      		<to uri ="direct:sendFITOptTrdToSBR"/>
						</split>
					</when>
					<otherwise>
						<log message="This message has been exceed number of retry. Exhausting
it now with body.${body}."
							loggingLevel="ERROR"
logName="com.bbb.sbrs.mySystem.util.FITOptInLogger" />
					</otherwise>
				</choice>
		</route>

		<route id="sendFITOptTrdToSBR">
			<from uri="direct:sendFITOptTrdToSBR" />
			<onException useOriginalMessage="true">
				<exception>java.lang.Exception</exception>
				<handled><constant>true</constant></handled>
				<process ref="aggregateExcepHelper" />
				<bean ref="excepLogInputPopulator" method="populateFITOptExcepParam"/>
				<to uri="direct:exceptionHandler" />
			</onException>
			<process ref="fitOptTradeMsgFilter"/>
			<process ref="fitOptMessageValidator"/>
			<process ref="tradeMsgInfoPopulator"/>
			
			<to uri="direct:trdMsgPersistence"/>
			<process ref="fitOptXsltProcHelper"/>
			<choice>
				<when>
					<xpath>@somExpression</xpath>
					<log message="Applying transformation logic for xyz ."
loggingLevel="INFO"
						logName="com.bbb.www.sbrs.mySystem.util.InLogger"/>
					<to uri="xslt:xsl/mapping1.xsl" />
				</when>
				<when>
					<xpath>@someExpression</xpath>
					<log message="Applying transformation logic for abc."
loggingLevel="INFO"
						logName="com.bbb.www.sbrs.mySystem.util.InLogger"/>
					<to uri="xslt:xsl/mapping2.xsl" />
				</when>
				<when>
					<xpath>@someExpression</xpath>
					<log message="Applying transformation logic for pqr."
loggingLevel="INFO"
						logName="com.bbb.www.sbrs.mySystem.util.InLogger"/>
					<to uri="xslt:xsl/mapping3.xsl" />
				</when>
				<when>
					<xpath>@someExpression</xpath>
					<log message="Applying transformation logic for wxy."
loggingLevel="INFO"
						logName="com.bbb.www.sbrs.mySystem.util.InLogger"/>
					<to uri="xslt:xsl/option/mapping4.xsl" />
				</when>
				<when>
					<xpath>@someExpression and @someExpression1</xpath>
					<log message="Applying transformation logic for hedge."
loggingLevel="INFO"
						logName="com.bbb.www.sbrs.mySystem.util.InLogger"/>
					<to uri="xslt:xsl/cash/mapping5.xsl" />
				</when>
			</choice>
			<to uri="xslt:xsl/util/RemoveNameSpace.xsl"/>
			<log message="Message trnsformed.${body}" loggingLevel="WARN"
				logName="com.bbb.sbrs.mySystem.util.FITOptInLogger" />
			<doTry>
				<process ref="updateTransformedTradeSqlBuilder" />
				<to uri="{{trade.message.updateTransformedSql.uri}}" />
				<doCatch>
					<exception>java.lang.Exception</exception>
					<log message="Error occurred while updating transformed sbrs out
message in DB."
						loggingLevel="ERROR"
logName="com.bbb.sbrs.mySystem.util.FITOptInLogger" />
					<bean ref="excepLogInputPopulator" method="populateFITOptExcepParam"/>
					<to uri="direct:exceptionHandler" />
				</doCatch>
			</doTry>
			<process ref="idempUtilSBR"/>
			<idempotentConsumer eager="false"
messageIdRepositoryRef="reportingMsgIdRepo">
				<header>messageId</header>
				<process ref="sbrsOutProcessor"/>
				<to ref="sbrsOutMsgQueue" />
			</idempotentConsumer>
			<doTry>
				<process ref="updateSBRSentStatSqlBuilder" />
				<to uri="{{trade.message.updateSBRSentStatusSql.uri}}" />
				<doCatch>
					<exception>org.springframework.dao.DataAccessException</exception>
					<log message="Error occurred while updating sent to sbrs status in DB."
						loggingLevel="ERROR"
logName="com.bbb.sbrs.mySystem.util.FITSBROutLogger" />
					<bean ref="excepLogInputPopulator" method="populateFITOptExcepParam"/>
					<to uri="direct:exceptionHandler" />
				</doCatch>
			</doTry>
		</route>
	</routeContext>




--
View this message in context: http://camel.465427.n5.nabble.com/My-camel-route-not-able-to-handle-exception-tp5739379.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message