You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by aidatechinc <HF...@AIDATECH.COM> on 2015/01/20 06:16:59 UTC

how to run a consumer route once?

I've used timer,  but time manage not to work with a consumer endpoint. The
header/body end up being empty.


<from:timer?repeatCount=1>
<to:&quot;file://fromDirectory&quot;>
<to:&quot;file://toDirectory&quot;>

that doesn't work  since I am trying to consumer after the timer.

thanks



--
View this message in context: http://camel.465427.n5.nabble.com/how-to-run-a-consumer-route-once-tp5761932.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: how to run a consumer route once?

Posted by aidatechinc <HF...@AIDATECH.COM>.
yep that did it. thank you



--
View this message in context: http://camel.465427.n5.nabble.com/how-to-run-a-consumer-route-once-tp5761932p5762003.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: how to run a consumer route once?

Posted by Jakub Korab <ja...@gmail.com>.
Try using pollEnrich(...) to grab the file from S3.

http://camel.apache.org/content-enricher.html

Jakub

On 20/01/15 15:03, aidatechinc wrote:
> thank you. my example was using a file, I am aware of the polling stratregy
> for a file component.  The problem is I am trying to solve is grab once file
> per user request from AWS-S3 and put it in the system.  I want it to run
> once, without deleting the file on AWS.
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/how-to-run-a-consumer-route-once-tp5761932p5761946.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: how to run a consumer route once?

Posted by aidatechinc <HF...@AIDATECH.COM>.
thank you. my example was using a file, I am aware of the polling stratregy
for a file component.  The problem is I am trying to solve is grab once file
per user request from AWS-S3 and put it in the system.  I want it to run
once, without deleting the file on AWS.





--
View this message in context: http://camel.465427.n5.nabble.com/how-to-run-a-consumer-route-once-tp5761932p5761946.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: how to run a consumer route once?

Posted by Claus Straube <cl...@gmail.com>.
The file component has a build in timer. You don't need the first line.

<from:&quot;file://
fromDirectory&quot;>
<to:&quot;file://toDirectory&quot;>

I'm not sure if you really want to read only once from the file system. If
yes, you should probably think about an other solution...

Best regards - Claus


On Tue, Jan 20, 2015 at 6:16 AM, aidatechinc <HF...@aidatech.com> wrote:

> I've used timer,  but time manage not to work with a consumer endpoint. The
> header/body end up being empty.
>
>
> <from:timer?repeatCount=1>
> <to:&quot;file://fromDirectory&quot;>
> <to:&quot;file://toDirectory&quot;>
>
> that doesn't work  since I am trying to consumer after the timer.
>
> thanks
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/how-to-run-a-consumer-route-once-tp5761932.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>