camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Context Monitoring
Date Thu, 28 Apr 2011 15:51:51 GMT

There are many unit tests in camel-core in the package that shows how to grab stats using

You can also use a custom EventNotifier to gather the stats.

If you got the Camel book, then chapter 13 covers some of this in more details.

On Thu, Apr 28, 2011 at 11:15 AM, Xavier Coulon <> wrote:
> Hello,
> We are building a data integration solution (kinda ETL) with Camel, and we
> need to monitor the whole processing. Especially, some custom metrics such
> as the total number of items to process, the number of items that were
> already processed with a distinction between success and errors. The first
> metric is already computed by some process (in fact, we use the File
> component headers), the other ones could be known by querying the number of
> completed exchanges.
> I know that using JConsole, it is possible to retrieve the managed beans
> attributes, but as we need to store those metrics in a database/log
> files/web console, I was tempted to create a camel route to retrieve the
> counters, with a quartz expression to trigger the metrics retrieval.
> From the documentation, it appears that the JMX Component only supports JMX
> event notifications, which is not my use case.
> Until now, I tried to programmatically retrieve the route counters that are
> exposed by JMX, but with no success. Is it possible ? The
> exchange.getContext().getRoute("route.monitoring.metrics.phase1").getRouteContext().getManagedInterceptStrategy()
> is of type but
> does not provide a getter on the inner registeredCounters variable
> Or should I just use JMX to connect to the local JVM ? Could this be an
> extension to the JMX Component ?
> Thank you in advance
> Regards,
> --
> Xavier

Claus Ibsen
CamelOne 2011:
Twitter: davsclaus
Author of Camel in Action:

View raw message