Hi

There is this FAQ which may help
http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html


On Tue, Mar 25, 2014 at 6:12 PM, doug5791 <tobed...@uwgb.edu> wrote:
> I am trying to see if I can increase the performance of my route by adding a
> cache prior to a database write. I will describe the flow of the route I
> would like below:
>
> if( cacheSize != MAXCACHESIZE)
> {
>      //Add the Exchange to the data structure but* do not* continue with the
> write
>      //cacheSize++
> }
> else
> {
>      //Flush the cache allowing the stored Exchanges to* continue* on the
> route
> }
>
> Looking at the above pseudo-code, what I am trying to do is store routes
> until a max has be reached and then write all of the stored Exchanges to the
> DB while starting to collect the next batch.
>
> I have looked into creating a bean to handle this as well as defining my own
> processor, but neither has been successful. Using Camel-Cache and
> Camel-streamCaching are not options for me.
>
> Any ideas on how to halt the route while the cache is not full and continue
> when flushing the cache?
>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-How-to-stop-a-route-temporarily-tp5749351.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Reply via email to