camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manav Kher <icech...@gmail.com>
Subject Re: Call a route on Delivery failure
Date Thu, 03 Jul 2014 18:43:57 GMT
So something like this should work?


        from("amq:inbound:queue")

                .errorHandler(deadLetterChannel("direct:failed:queue")
                        .maximumRedeliveries(5)
                        .redeliveryDelay(1000))

                 .to("http://server.url")
                .end();


//log and send to DLQ
        from("direct:failed:queue")
                .wireTap("vm:dbLogDeliveryFailure")
                .to("amq:dead:queue")
                .end();


-Thanks

On Wed, Jul 2, 2014 at 9:35 PM, Willem Jiang <willem.jiang@gmail.com> wrote:

> Do you mean you want camel to call the WireTap processor before sending
> the message to DeadLetterChannle?
>
> DeadLetterChannel is supposed to send the exchange to a message queue, but
> you can setup a route which start point is “direct:start”. Then you can
> define another router to handle the exchange and you can add the WireTap in
> the new router.
>
>
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> Web: http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (English)
> http://jnn.iteye.com (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
> On July 3, 2014 at 6:19:57 AM, Manav Kher (icechunk@gmail.com) wrote:
> > I have configured a RedeiveryPolicy on the error handler. Is there a way
> I
> > can call the WireTap processor once all delivery attempts have been made
> > the message is about to be sent to the DLC?
> >
> > from("vm:sentToDestination")
> > .errorHandler(deadLetterChannel("{{dlc.queue}}")
> > .retriesExhaustedLogLevel(LoggingLevel.DEBUG)
> > .logRetryStackTrace(false).asyncDelayedRedelivery()
> > .maximumRedeliveries(retryMaxCount)
> > .redeliveryDelay(retryDelay))
> >
> > .to("http://someURL")
> >
> >
> > --
> > -M Kher
> >
>
>


-- 
-M Kher

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