Hi You can use the bridge error handler option http://camel.apache.org/why-does-my-file-consumer-not-pick-up-the-file-and-how-do-i-let-the-file-consumer-use-the-camel-error-handler.html
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 <p...@dr.dk> 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: > http://camel.465427.n5.nabble.com/Best-way-for-ScheduledBatchPollingConsumer-to-signal-failure-tp5732703.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- www.camelone.org: The open source integration conference. Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen