camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "valerian.merkling" <>
Subject TransactionnalDeadLetterChannel ?
Date Thu, 07 Mar 2013 10:10:19 GMT

My route read a file, parse the xml stuff inside, valid and transform it to
finally write it somewhere else.

My goal is : on any unhandled error, rollback and redeliver up to X times,
every Y seconds and finally send the original file on another queue.

Right now, i've defined a deadLetterChannel, which does almost all the job,
except the message sent on the dead end queue is not the original file, but
the one just before the unhandled error.

I guess I've to deal with some transactionnal stuff, i've seen some example
about transaction on JMS endpoint, but nothings on file so i'm not sure
about the right way to follow...

Here is the code :

    <bean name="transform-xxx-yyy"
class="TEST.esb.transform.XXXtoYYYTransform" />
    <bean id="myDeadLetterErrorHandler"
        <property name="deadLetterUri" value="activemq:queue:toretry"/>
        <property name="redeliveryPolicy" ref="myRedeliveryPolicyConfig"/>
    <bean id="myRedeliveryPolicyConfig"
        <property name="maximumRedeliveries" value="6"/>
        <property name="redeliveryDelay" value="10000"/>

    <camelContext id="central-cr-colisage"
xmlns="" >
        <propertyPlaceholder id="properties"
location="file:D:/TEST/" />
        <route id="xxx-to-yyy">
            <from uri="file://{{esb.colisage.root}}in//?delete=true" />
                <convertBodyTo type="java.lang.String"/>
                <to uri="validator:file:D://TEST//xsd//XXX.xsd"/>
                <to uri="file://{{esb.colisage.root}}save//" />
                <to uri="transform-xxx-yyy"/>
                <to uri="validator:file:D://TEST//xsd//YYY.xsd"/>
                <to uri="file://F:/{{esb.colisage.output.folder}}" />
		<route id="error-to-retry-route">
            <from uri="activemq:queue:toretry"/>
            <log message="Parking ${in.headers.camelFileName}"
            <to uri="file://{{esb.colisage.root}}retry//" />

I don't know if i have to use the TransactionnalClient or if there's a way
to give a transactionnal aspect to the deadLetterChannel. Any help is
welcome !



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

View raw message