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: Bug with 'addEventNotifier' - fires two 'exchange sent' events for each Exchange sent.
Date Mon, 12 Aug 2013 12:15:29 GMT
Well timings for individual endpoints you would need to send the
exchange to an endpoint in your route - which yo do NOT do, as you use
a processor instead.

The event notifier only emits event for exchanges being sending/sent
to endpoints, not for processors etc.

If you want fine grained metrics, then thats already there with the JMX.



On Mon, Aug 12, 2013 at 12:36 PM, pmcb55 <mcbennettp@dnb.com> wrote:
> Hi Claus,
>
> Ok, great. But you seem to be implying that this is 'correct' behaviour -
> which I don't quite understand. What is the value of the events fired from
> the ProducerTemplate when the underlying code fires the same events anyway?
> I guess maybe I'm still missing something here...
>
> So how would I 'fix' my very simple, and intuitive test code above?? In
> other words, how would I record only 1 event per Exchange sent to my
> endpoint? i.e. how do I filter out the pesky ProducerTemplate events so that
> I just get 'real' timings (and invocation counts) for endpoint invocations?
>
> I've tried with '*ExchangeCompletedEvent*'  and using the property
> '*Exchange.CREATED_TIMESTAMP*' too (as explained here:
> http://cmoulliard.blogspot.ie/2011/02/measure-elapsed-time-with-camel.html),
> but that just gives me a timing for the entire route - it won't give me
> timings for individual endpoints in a route with multiple '.to()' parts.
>
> Thanks,
>
> Pat.
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Bug-with-addEventNotifier-fires-two-exchange-sent-events-for-each-Exchange-sent-tp5737086p5737138.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message