camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Kettelerij <richardkettele...@gmail.com>
Subject Re: File Exists
Date Thu, 30 Jan 2014 07:51:04 GMT
Hi Jakob,

Perhaps you can do a poll using an generic filename filter that matches
both files and combine this with an aggregator (
http://camel.apache.org/aggregator2.html)?
So you have the aggregator wait until both files are polled, this can
probably be done by using a completionPredicate on the aggregator.

Kind regards,
Richard

On Thu, Jan 30, 2014 at 4:49 AM, JKemp <kemp.jacob@gmail.com> wrote:

> Hey guys,
>
> I'm trying to write a Camel route that will only kick off once two files
> are
> present on the server, but I can't seem to figure out an easy way to do
> this.  I was hoping there'd be a Simple command for this or some feature in
> the File component, but I haven't found anything that looks promising.
>
> I was thinking I could start my route with a file endpoint, then do a poll
> enrich on the second file and kick out an error if the second file doesn't
> exist, but this seems a little kludgy.  Is there a better way to accomplish
> this?
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/File-Exists-tp5746608.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

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