On Sun, Oct 28, 2012 at 5:26 PM, bung_ho <bung...@hotmail.com> wrote: > Thanks for the reply. The message queue is a good idea but obviously it will > take a little more work on the scheduler side to implement, not sure if I > can get the help from that side in order to do it. I will consider this as > the "proper" approach to be implemented in the future :) > > But also, many of the jobs are file based to begin with, and I was thinking > I would just use the "doneFileName" attribute on my "from". The scheduler > would place the the doneFile and only then would the route begin to consume > the input file (it's an ETL kind of thing). >
Yeah if its all just file based then that may be easier. There is a done file support out of the box with Camel. http://camel.apache.org/file2 > In a related question, if my "from" were to read from a message queue but > the job itself needs to consume a file, how do I actually read an arbitrary > file in the middle of the route? I've managed to do this using <pollEnrich > uri="file: ..."/> before, is this the correct way to do this? > This is more tricky as pollEnrich requires you to either know the name to pickup, or it will pick the 1st message. And it only pickup 1 file. Its IMHO better with the done filename. Or an alternative to use a route policy to control on|off of the route http://camel.apache.org/routepolicy http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html > > > Larry Meadors wrote >> That sounds like a perfect case for a message queue, so I'm assuming >> that's not an option or you'd do that instead. >> >> I've used http to trigger events from the outside for things that >> can't do JMS easily - if your scheduler can do that, it's a nice >> option. >> >> Files always feel kind of messy, but might make sense if your task >> takes some time to complete and you want the two ends to communicate >> asynchronously. >> >> Larry > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/external-scheduler-integration-tp5721668p5721670.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen