You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Bengt Rodehav <be...@rodehav.com> on 2010/11/24 16:41:14 UTC

Retrieving the exchange's processing time in onCompletion

I'm implementing a message history store. As suggested in Camel in Action,
 I plan to use the onCompletion interceptor to extract the information I
need from the exchange and store it in a database.

I would like to store the processing time of the exchange. I've seen that
information in the JMX interface where the min, max and mean processing time
is available. However, I can't see that information on the exchange (which
is what is available in the onCompletion callback). Can I get the processing
time from somewhere else?

/Bengt

Re: Retrieving the exchange's processing time in onCompletion

Posted by Bengt Rodehav <be...@rodehav.com>.
Thanks for your reply Claus,

I actually use the JMX interface already to get hold of the statistics and
show them in the user interface. Yes, it's a bit painful but doable.

However, I don't think it's possible to get exchange specific information
via JMX - is it? I can only get information regarding the route as a whole -
like the statistics. In my case I would like to retrieve the processing time
for this specific exchange.

Actually, it sounds like the ticket you referred to is exactly what I would
like (CAMEL-3302 I assume). If the exchange kept its creation time stamp it
would fit my bill very nice. It says that the fix version is 2.6.0 - that
would suit me very well.

/Bengt

2010/11/24 Claus Ibsen <cl...@gmail.com>

> On Wed, Nov 24, 2010 at 4:41 PM, Bengt Rodehav <be...@rodehav.com> wrote:
> > I'm implementing a message history store. As suggested in Camel in
> Action,
> >  I plan to use the onCompletion interceptor to extract the information I
> > need from the exchange and store it in a database.
> >
> > I would like to store the processing time of the exchange. I've seen that
> > information in the JMX interface where the min, max and mean processing
> time
> > is available. However, I can't see that information on the exchange
> (which
> > is what is available in the onCompletion callback). Can I get the
> processing
> > time from somewhere else?
> >
>
> You can grab that data using regular JMX API (yes its a bit painful).
>
> We do have a ticket to add a property on the Exchange with the
> timestamp when it was created.
> Then in the future you can use that to compute the processing time.
>
> However for all the stats like mean/min/max etc. those are in JMX on
> the ManagedRoute mbean.
>
> We should most likely offer an easy to use API to access those mbeans
> without the pain of the JMX API.
> There is a ticket in JIRA to offer REST based API for statistics. That
> work is scheduled for Camel 3.x.
>
>
>
> > /Bengt
> >
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Re: Retrieving the exchange's processing time in onCompletion

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Nov 24, 2010 at 4:41 PM, Bengt Rodehav <be...@rodehav.com> wrote:
> I'm implementing a message history store. As suggested in Camel in Action,
>  I plan to use the onCompletion interceptor to extract the information I
> need from the exchange and store it in a database.
>
> I would like to store the processing time of the exchange. I've seen that
> information in the JMX interface where the min, max and mean processing time
> is available. However, I can't see that information on the exchange (which
> is what is available in the onCompletion callback). Can I get the processing
> time from somewhere else?
>

You can grab that data using regular JMX API (yes its a bit painful).

We do have a ticket to add a property on the Exchange with the
timestamp when it was created.
Then in the future you can use that to compute the processing time.

However for all the stats like mean/min/max etc. those are in JMX on
the ManagedRoute mbean.

We should most likely offer an easy to use API to access those mbeans
without the pain of the JMX API.
There is a ticket in JIRA to offer REST based API for statistics. That
work is scheduled for Camel 3.x.



> /Bengt
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/