Logging the execution time over multiple routes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Logging the execution time over multiple routes

rajith
We have the following scenario. The aggregate has a timeout.
Route1
JMS/REST ---> transform --> aggregate --> Queue.

Route2
Queue --> transform-to-xml ---> SAP.

We want to find out the total time it took to send a payload into SAP. The
start time should be when the first payload in the batch was received.
Using that we can calculate the total time as the last step on the second
route.

Is there a reliable way to propagate the start time of the payload across
the routes? I was thinking about using a header as it gets preserved over
JMS.

Any suggestions ?

Regards,

Rajith Muditha Attapattu <http://rajith.2rlabs.com/>
Reply | Threaded
Open this post in threaded view
|

Re: Logging the execution time over multiple routes

Claus Ibsen-2
Hi

Maybe in the custom AggregationStrategy which you can set on the
aggregator, you will have the data for the time of the 1st exchange,
and then you can store that on the exchange that gets built as the
output of the aggregator, and then you can add a step after SAP where
you then calculate the taken time.
On Thu, Nov 8, 2018 at 6:50 PM Rajith Muditha Attapattu
<[hidden email]> wrote:

>
> We have the following scenario. The aggregate has a timeout.
> Route1
> JMS/REST ---> transform --> aggregate --> Queue.
>
> Route2
> Queue --> transform-to-xml ---> SAP.
>
> We want to find out the total time it took to send a payload into SAP. The
> start time should be when the first payload in the batch was received.
> Using that we can calculate the total time as the last step on the second
> route.
>
> Is there a reliable way to propagate the start time of the payload across
> the routes? I was thinking about using a header as it gets preserved over
> JMS.
>
> Any suggestions ?
>
> Regards,
>
> Rajith Muditha Attapattu <http://rajith.2rlabs.com/>



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2