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

Reply via email to