On Fri, Jan 8, 2010 at 10:37 AM, marcin80 <mtros...@gmail.com> wrote: > > Hi > > I would like to know how to create quartz jobs dynamically? My case is > following: > I have a message consumer witch consume messages from queue and each message > should be proces at specific time defined in message property. So I would > like use somethig like this: > > <route> > <from uri="activemq:queue:test"/> > <!-- here I would like to create quartz jobs for each message triggering > message processing in specific time but I don't know how to do it (maybe it > is impossible?)--> > > </route> > > Can I do it? >
How long time in the future should those tasks be executed? It will assume its better to keep the messages in the JMS Broker until the time is due before they are visible for the consumers. JMS have such a feature. Cant remember exact details about it. Anyway you can use regular Quartz to schedule tasks. So just route to a bean or Processor and do the code in Java to schedule it with Quartz. To continue routing the message from that task you can use ProducerTemplate to send it back to Camel. We do however have a ticket about being able to send a message to camel-quartz endpoint and have it schedule the tasks for the future and which destination to send to https://issues.apache.org/activemq/browse/CAMEL-1185 Use the JIRA voting system to let us know which tickets is important for the community. And as always we love contributions so if anyone is up for it then try make that feature and submit patches to back to Apache. > Cheers, > Marcin > -- > View this message in context: > http://old.nabble.com/camel-quartz-tp27073449p27073449.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus