Hi Jens, Thanks for the reply. Using a queue for writing/reading some flags is already in my mind. But wanted to check with the community if there is a way thru the Camel APIs. I got your points and that makes sense.
Thanks, Kranti On Mon, Jan 26, 2015 at 10:21 PM, mailingl...@j-b-s.de <mailingl...@j-b-s.de > wrote: > Hi Kranti, > > from our experience relying solely on the inflight repo won't work, > because even it's empty you may have pending messages in other components > eg aggregator or sequencer or queues. Afaik there is no central camel > service existing to check if all work is entirely finished so it depends on > the components you use in your route(s) to find an answer for "how many > unprocessed messeges are still caught in the system"... > > But maybe you can use a lock (externally as file, or if you only use one > VM use java synchronization methods)? > > Or you can use a queue where both routes add their message to thus forcing > a serialized processing? > > Jens > > > Von meinem iPhone gesendet > > > Am 27.01.2015 um 02:18 schrieb Kranti Parisa <kranti.par...@gmail.com>: > > > > Hi, > > > > Is there a way to identify if a given route is currently processing any > > messages or not? > > > > I want to run 2 routes which are independent in terms of the incoming > data > > sources but I want to execute each of them only if the other is not > > processing anything as they both update the same end point (output) > > If there an alternative approach than checking the in-flight message > count? > > And I think it would be helpful to add isProcessing flag to > > the ServiceStatus, thoughts? > > > > > > Thanks, > > Kranti >