camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Calvert, Zach (Zach)** CTR **" <zcalv...@motive.com>
Subject RE: Dead Letter Delivers Twice!?
Date Wed, 07 Nov 2012 18:35:31 GMT
Yikes, nevermind.  PEBKAC error.

-----Original Message-----
From: Calvert, Zach (Zach)** CTR ** [mailto:zcalvert@motive.com] 
Sent: Wednesday, November 07, 2012 11:09 AM
To: users@camel.apache.org
Subject: Dead Letter Delivers Twice!?

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"/>
    </bean>

    <!-- 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 "/>
    </bean>


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"/>

        </camel:route>

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

    </camel:camelContext>

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?


Thanks,
Zach Calvert


Mime
View raw message