You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ed Welch <ed...@edjusted.com> on 2016/05/31 14:14:06 UTC
How to stop camel from logging Failed Delivery Error
Hopefully this is an easy question, I have an exception handler:
onException(UnknownTnException.class)
.useOriginalMessage()
.handled(true)
.logStackTrace(false)
.log(LoggingLevel.WARN, log, "Unknown TN: ${exception.message}");
Which is almost working exactly as I would like, I can catch exceptions and it logs the message at WARN level.
However, it also logs this at ERROR level every time:
Failed delivery for (MessageId: ID-esb-uat1-eus-elnk-net-51221-1462478239909-0-312 on ExchangeId: ID-esb-uat1-eus-elnk-net-51221-1462478239909-0-311). Exhausted after delivery attempt: 1 caught: UnknownTnException: No TN was found in VENDOR_ID_MAP with requestID: 31133719. Processed by failure processor: FatalFallbackErrorHandler[Channel[Log()[Unknown TN: ${exception.message}]]]
Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId ProcessorId Processor Elapsed (ms)
[AsyncResponseRoute] [AsyncResponseRoute] [activemq://soa.vendor.async.in ] [ 75]
[AsyncResponseRoute] [setProperty1 ] [setProperty[rawXml] ] [ 0]
[AsyncResponseRoute] [unmarshal12 ] [unmarshal[org.apache.camel.model.DataFormatDefinition@12c10a52] ] [ 1]
[AsyncResponseRoute] [process31 ] [Processor@0x447c7468 ] [ 74]
[ ] [log24 ] [log ] [ 0]
How can I keep this error log from showing up?? looking at the camel exception page, all the examples seem to end with a producer of some kind that sends the message on to another destination.
I don't need to send it anywhere, i just want to log my message at WARN level and that's it.
Anyone have any suggestions?
Thanks,
Ed
Re: How to stop camel from logging Failed Delivery Error
Posted by Ed Welch <ed...@edjusted.com>.
Ah, I searched and found https://issues.apache.org/jira/browse/CAMEL-9558 which is likely the issue you are referring to, which would affect me (2.16.1), I will try upgrading to 2.16.3.
Thanks!
On Tue, 31 May 2016 16:22:28 +0200, Claus Ibsen <cl...@gmail.com> wrote:
> What version of Camel do you use?
>
> There was a bug recently that causes Camel to log handled exceptions.
> So try to upgrade.
>
> On Tue, May 31, 2016 at 4:14 PM, Ed Welch <ed...@edjusted.com> wrote:
> > Hopefully this is an easy question, I have an exception handler:
> >
> > onException(UnknownTnException.class)
> > .useOriginalMessage()
> > .handled(true)
> > .logStackTrace(false)
> > .log(LoggingLevel.WARN, log, "Unknown TN: ${exception.message}");
> >
> >
> > Which is almost working exactly as I would like, I can catch exceptions and it logs the message at WARN level.
> >
> > However, it also logs this at ERROR level every time:
> >
> > Failed delivery for (MessageId: ID-esb-uat1-eus-elnk-net-51221-1462478239909-0-312 on ExchangeId: ID-esb-uat1-eus-elnk-net-51221-1462478239909-0-311). Exhausted after delivery attempt: 1 caught: UnknownTnException: No TN was found in VENDOR_ID_MAP with requestID: 31133719. Processed by failure processor: FatalFallbackErrorHandler[Channel[Log()[Unknown TN: ${exception.message}]]]
> >
> > Message History
> > ---------------------------------------------------------------------------------------------------------------------------------------
> > RouteId ProcessorId Processor Elapsed (ms)
> > [AsyncResponseRoute] [AsyncResponseRoute] [activemq://soa.vendor.async.in ] [ 75]
> > [AsyncResponseRoute] [setProperty1 ] [setProperty[rawXml] ] [ 0]
> > [AsyncResponseRoute] [unmarshal12 ] [unmarshal[org.apache.camel.model.DataFormatDefinition@12c10a52] ] [ 1]
> > [AsyncResponseRoute] [process31 ] [Processor@0x447c7468 ] [ 74]
> > [ ] [log24 ] [log ] [ 0]
> >
> >
> > How can I keep this error log from showing up?? looking at the camel exception page, all the examples seem to end with a producer of some kind that sends the message on to another destination.
> >
> > I don't need to send it anywhere, i just want to log my message at WARN level and that's it.
> >
> > Anyone have any suggestions?
> >
> > Thanks,
> > Ed
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
Re: How to stop camel from logging Failed Delivery Error
Posted by Claus Ibsen <cl...@gmail.com>.
What version of Camel do you use?
There was a bug recently that causes Camel to log handled exceptions.
So try to upgrade.
On Tue, May 31, 2016 at 4:14 PM, Ed Welch <ed...@edjusted.com> wrote:
> Hopefully this is an easy question, I have an exception handler:
>
> onException(UnknownTnException.class)
> .useOriginalMessage()
> .handled(true)
> .logStackTrace(false)
> .log(LoggingLevel.WARN, log, "Unknown TN: ${exception.message}");
>
>
> Which is almost working exactly as I would like, I can catch exceptions and it logs the message at WARN level.
>
> However, it also logs this at ERROR level every time:
>
> Failed delivery for (MessageId: ID-esb-uat1-eus-elnk-net-51221-1462478239909-0-312 on ExchangeId: ID-esb-uat1-eus-elnk-net-51221-1462478239909-0-311). Exhausted after delivery attempt: 1 caught: UnknownTnException: No TN was found in VENDOR_ID_MAP with requestID: 31133719. Processed by failure processor: FatalFallbackErrorHandler[Channel[Log()[Unknown TN: ${exception.message}]]]
>
> Message History
> ---------------------------------------------------------------------------------------------------------------------------------------
> RouteId ProcessorId Processor Elapsed (ms)
> [AsyncResponseRoute] [AsyncResponseRoute] [activemq://soa.vendor.async.in ] [ 75]
> [AsyncResponseRoute] [setProperty1 ] [setProperty[rawXml] ] [ 0]
> [AsyncResponseRoute] [unmarshal12 ] [unmarshal[org.apache.camel.model.DataFormatDefinition@12c10a52] ] [ 1]
> [AsyncResponseRoute] [process31 ] [Processor@0x447c7468 ] [ 74]
> [ ] [log24 ] [log ] [ 0]
>
>
> How can I keep this error log from showing up?? looking at the camel exception page, all the examples seem to end with a producer of some kind that sends the message on to another destination.
>
> I don't need to send it anywhere, i just want to log my message at WARN level and that's it.
>
> Anyone have any suggestions?
>
> Thanks,
> Ed
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2