camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Best way for ScheduledBatchPollingConsumer to signal failure
Date Fri, 17 May 2013 12:54:49 GMT

You can use the bridge error handler option

Then an empty exchange with the caused exception is routed, and your
error handler can detect and handle it, as if the error occurred
during routing.

On Fri, May 17, 2013 at 8:03 AM, Preben.Asmussen <> wrote:
> Hi
> I have worked on a consumer component that extends the
> ScheduledBatchPollingConsumer, and want to signal when an error occurs
> during connect to a remote resource (basic http). Atm any connect error will
> be logged, but I want it to surface in jmx attribute like the
> ExchangesFailed and LastExchangeFaliure..... attributes. This way monitoring
> can pick up any failures and report it.
> The problem is that to expose this as a jmx attribute it requires a
> exchange, and since the error occurs while  connecting to the remote
> resource (to poll and create exchanges) it is not possible.
> Is there any examples to handle such feature ? eg. catch the exception and
> create a 'failed exchange' manually, or ??
> /Preben
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
----------------- The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Twitter: davsclaus
Author of Camel in Action:

View raw message