Set camel route based on timer or a count variable
<p>I want to invoke another camel route based on a counter value or after certain time has passed whichever happens first. For example, if count has reached N before timer is invoked, I want to reset the timer and invoke the route. Similarly, if timer is invoked, reset the count and invoke the route.
I looked at this post -<a href="https://stackoverflow.com/questions/39631153/camel-routing-based-on-object-value">Camel routing based on object value</a> 
But, how would I deal with Timer part?</p>

<p>I can do it in Java using ScheduledThreadPoolExecutor to cancel the task if count is reached and then invoke route in java. But, I was wondering if there is an easy way to do it with camel. I am new to Camel, so not aware about advanced functionality it can provide.</p>