Thanks, Claus. We are still on Camel 2.3 at the moment with this project. Are there any alternatives?
Martin. ----- Original message ----- From: "Claus Ibsen" <claus.ib...@gmail.com> To: users@camel.apache.org Date: Fri, 7 Jan 2011 12:46:48 +0100 Subject: Re: Consuming messages based on a predicate On Fri, Jan 7, 2011 at 12:20 PM, Martin Gilday <martin.li...@imap.cc> wrote: > Hi, > > I am building a Camel route which consumes from a JMS queue, does JSON > to XML conversion and then calls a web service to send requests to a > third party. This third party only wants to receive the messages during > their opening hours. This made me immediately think to use the Quartz > component to consume during certain hours. However their opening hours > change frequently, and we have a database table which stores the current > schedule. There is a nice service with a method isOpen() which can > determine whether they are open currently. If I take the message off > the queue and then check the predicate it could be looping the messages > around for hours or days at a time until they are open. > > Is there a nice way to create a route to do this? > Something similar to http://camel.apache.org/scheduledroutepolicy.html But instead just implement your own "scheduling" logic. For example have a background thread invoke once a minute or something and determine if its open. And then suspend/resume the route accordingly. > Thanks, > Martin > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/