camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From contactreji <>
Subject Camel Exception and Velocity - Blank Values
Date Fri, 21 Nov 2014 07:42:01 GMT

I have a route as follows which consumes from a vm: endpoint. Data comes to
this endpoint from an exception handler in another module. 

I am trying to send alert mails for this exception using camel velocity.

I used both {in.headers.CAMEL_EXCEPTION} was well as ${exception} in the
camel veloctity template to populate the exception string. Both yeilds BLANK

Can someone give me a clue.

Also looks like *<setHeader headerName="CAMEL_EXCEPTION ">
			</setHeader>* too doesnt work since I am trying to print header but again
no value :-(

Below is my route file!

	*	<route id="UTILITY_Multicasting">

			<from uri="vm:Q_EXCEPTIONSTRATEGY" />
			<setExchangePattern pattern="InOnly" />

			<log message="Message from Exception Handler Module - Details :
				loggingLevel="WARN" logName="ExceptionHandlerModule" />

			<setHeader headerName="CAMEL_EXCEPTION ">

				message="CAMEL_EXCEPTION Header populated as 
				loggingLevel="WARN" logName="ExceptionDetails" />

			<multicast stopOnException="true">
				<to uri="seda:EmailAlert" />
				<to uri="seda:DBUpdate" />

		<route id="UTILITY_AlertMails">

			<from uri="seda:EmailAlert" />
			<setExchangePattern pattern="InOnly" />

			<log logName="ExceptionHandling" loggingLevel="INFO"
				message="Exception received for TXN_NO ${in.header.TXN_ID}. Preparing
the Email Alert" />

			<setHeader headerName="to">
			<setHeader headerName="CC">
			<setHeader headerName="from">
			<setHeader headerName="subject">
				<simple>{{alertMailSubject}} - ${in.header.INTERFACE_ID} : TXN
			<setHeader headerName="contentType">
			<setHeader headerName="archivePath">
			<to uri="bean:AddAttachmentProcessor" />
			<to uri="smtp://{{smtpServerUrl}}?mapMailMessage=true" />

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

View raw message