camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raul Kripalani <r...@evosent.com>
Subject Re: external scheduler integration
Date Wed, 31 Oct 2012 01:43:00 GMT
Another possibility is to use the camel-stream component to tail a file
that serves as the "common interface", to which the scheduler writes to in
order to trigger an execution.

It can write the filename it wants to process, and that would be fed into
your route. It's kind of like running a tail -f, where new lines only
appear when the file is fully ready to get picked up.

Beware I haven't tested this myself, but it could reduce the complexity of
your route as well as possible points of failure.

Regards.

Sent from a mobile device
On 28 Oct 2012 16:27, "bung_ho" <bung_ho@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).
>
> 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?
>
>
>
> 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.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message