You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Manav Kher <ic...@gmail.com> on 2014/07/03 00:19:28 UTC
Call a route on Delivery failure
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
Re: Call a route on Delivery failure
Posted by Manav Kher <ic...@gmail.com>.
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 <wi...@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
Re: Call a route on Delivery failure
Posted by Willem Jiang <wi...@gmail.com>.
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
>