camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chirag Dewan <chirag.dewa...@yahoo.in>
Subject Re: pollEnrich all the files in a directory
Date Sun, 04 May 2014 08:22:15 GMT
Hi Claus,

Thanks for the quick reply.

I have to consume all the files upon a command,and then stop the route from continuously polling
the files untill the next command comes. So,can I also stop the control bus once all my files
are consumed? Maybe from within the route?

BR,

Chirag Dewan



________________________________
 From: Claus Ibsen <claus.ibsen@gmail.com>
To: "users@camel.apache.org" <users@camel.apache.org> 
Sent: Sunday, 4 May 2014 1:23 PM
Subject: Re: pollEnrich all the files in a directory
 

On Sun, May 4, 2014 at 9:38 AM, Chirag Dewan <chirag.dewan22@yahoo.in> wrote:
> Hi,
>
> Can I consume all the files in a directory,using poll enrich?
>
> My route would be something like :
>
> from("seda:abc").pollEnrich("file:/path/of/directory?delete=true).to("file:/path/of/output);
>
> And I send requests to the route with null body or blank body.
>
> context.createProducerTemplate().sendBody("seda:abc",null/"");
>
> BR,
>
> Chirag Dewan


Hi

No pollEnrich polls one file at a time.

You may try to use the control bus instead, to start a route that
moves the files.

route id = foo
from file dir
  to file outdir

And then use controlbus to send a message to start route with id = foo

http://camel.apache.org/controlbus





-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message