Hello.

That's something that you may extract from your JMS queue itself.

That beeing said, if you have burst of data you can use the log component
to tell what's happening. For instance you can use
<to uri="log:activity?groupInterval=10000" />
It will tell you in the log, the number of exchange processed during the
last 10 seconds. When it reaches zero then you have read everything.

Hope this helps

Antoine

2016-07-19 10:00 GMT+02:00 fxthomas <[email protected]>:

> Hello,
>
> I want to know if there is a simple way in camel to measure the time taken
> by route to read all messages present in the queue. Example My queue get
> populated on some time intervals , so i want to know how time it took just
> for the JMS component to read from the queue and not the full time cycle of
> the exchange.
> MY route as below
>
> <route routePolicyRef="routeQueuePolicy"
> shutdownRunningTask="CompleteCurrentTaskOnly"  id="ProcessQueue"
> autoStartup="true">
>     <from uri="wmq:queue:TESTQ2?acknowledgementMode=2"/>
>         <doTry>
>                  <to
>
> uri="bean:routeQueueBean?method=parseQueueMessage(${body},'databasebean')"/>
>                   <doCatch>
>                         <exception>java.lang.Exception</exception>
>                        <handled><constant>false</constant></handled>
>                        <process ref="stopRouteProcessor"/>
>                   </doCatch>
>                  <aggregate strategyRef="queueBatchStrategy"
> completionTimeout="3000" completionSize="100" completeAllOnStop="false">
>                                 <correlationExpression>
>                                         <constant>true</constant>
>                                 </correlationExpression>
>                     <to
> uri="bean:routeQueueBean?method=processQueueMessage('databasebean')"/>
>                  </aggregate>
>        </doTry>
>   </route>
>
> I want only the time taken by the route to read the all the messages in the
> queue present at the time. Like a batch total time .
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Time-taken-to-read-messages-from-queue-tp5785225.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to