camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gilday" <martin.li...@imap.cc>
Subject Consuming messages based on a predicate
Date Fri, 07 Jan 2011 11:20:14 GMT
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?

Thanks,
Martin

Mime
View raw message