camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Calvert, Zach (Zach)** CTR **" <>
Subject Dead Letter Delivers Twice!?
Date Wed, 07 Nov 2012 17:09:05 GMT
I have a camel route that trips up an error in it.  We have set up:
    <!-- This defines the redelivery policy -->
    <bean id="deliveryPolicyConfig" class="org.apache.camel.processor.RedeliveryPolicy">
        <property name="maximumRedeliveries" value="10"/>
        <property name="redeliveryDelay" value="3000"/>

    <!-- This trigger redelivery or DLQ for a thrown exception -->
    <bean id="deliveryErrorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder">
        <property name="deadLetterUri" value="activeMQ:queue: deadletter"/>
        <property name="redeliveryPolicy" ref=" deliveryPolicyConfig "/>

And then our route is defined:

    <camel:camelContext trace="true">
        <camel:route errorHandlerRef="deliveryErrorHandler">
            <camel:from uri="activeMQ:queue:deliveryqueue" />
            <camel:to uri="bean:messageDeliver?method=throwException"/>


        <!-- This route consume messages from DeadLetterQueue and log them  -->
            <camel:from uri="activeMQ:queue:deadletter"/>
            <camel:inOnly uri="activeMQ:queue:stat" /> <!-- THIS GETS MESSAGED TWICE


Now when I call it one time, triggering one initial run of the "activeMQ:queue:deliveryqueue"
I get sent the same message twice to "activeMQ:queue:stat".  I can't seem to find a bug against
the DeadLetterChannelBuilder or anything else that would indicate a failure message is sent
more than once on purpose.  Is there a configuration piece I'm missing which will allow me
to get the deadletter message only once?

Zach Calvert

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message