camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Use EventNotifierSupport record time is not exactly
Date Tue, 01 Mar 2011 09:11:42 GMT
Hi

The ExchangSentEvent is fired every time a producer sends a message
somewhere (eg in every .to in the route).

If you need the total time then check out Charles blog post on this matter
http://cmoulliard.blogspot.com/2011/02/measure-elapsed-time-with-camel.html


On Tue, Mar 1, 2011 at 10:04 AM, Bill <chenfeng.foss@gmail.com> wrote:
> Hi,
> I want to record the time costs per route. and extends EventNotifierSupport
> :
> ------------------------notify()----------------------
> ExchangeSentEvent sent = (ExchangeSentEvent) event;
> sent.getTimeTaken()
> -----------------------------------------------------
>
> but it seems just record the last Endpoint time costs;
>
>
> -------------------MyRoute-------------------
>                <camel:route>
>                        <camel:from uri="jms:queue1" />
>                        <camel:transacted />
>                        <camel:bean beanType="com.bean.BeanA"></camel:bean>
>                        <camel:to uri="jms:queue2" />
>                </camel:route>
> ------------------------------------------------
> in BeanA.java , I use Thread.sleep(5000);
> but the print is like:
>             Endpoint[jms://queue2] costs 14 ms.
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Use-EventNotifierSupport-record-time-is-not-exactly-tp3404610p3404610.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
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/

Mime
View raw message