You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by southtechie <so...@gmail.com> on 2011/11/21 08:57:59 UTC
Camel running continuously
I wrote a came route in beans.xml file to transfer files from one folder to
another.
<camel:route id="files.routing">
<camel:from uri="file:///c:/tmp/source/" />
<camel:to uri="file:///c:/tmp/target/" />
</camel:route>
When I run file transfer happens but the camel does not stop. The funny
thing is whatever files I paste in source folder is transferred to the
target again and again. How to stop the camel running once the transfer is
over?
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-running-continuously-tp5009748p5009748.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel running continuously
Posted by Johm Mac <mc...@gmail.com>.
On 21/11/2011 10:33, Ioannis Canellos wrote:
>> When I run file transfer happens but the camel does not stop. The funny
>> thing is whatever files I paste in source folder is transferred to the
>> target again and again. How to stop the camel running once the transfer is
>> over?
>>
> If I understand the question correctly you want to execute the route once
> and then stop it?
> If this is the case you can use something like this:
> http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html
>
>
or do you want the route to remain in operation but just not re-process
the same file again?
If this is the case then you need to set the attribute idempotent=true
Re: Camel running continuously
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Around the same topic, I blogged about how to use Camel to implement
batches (run once and stop, with another route to control the first one):
http://blog.nanthrax.net/2011/08/use-camel-cxf-and-karaf-to-implement-batches/
Regards
JB
On 11/21/2011 11:33 AM, Ioannis Canellos wrote:
>> When I run file transfer happens but the camel does not stop. The funny
>> thing is whatever files I paste in source folder is transferred to the
>> target again and again. How to stop the camel running once the transfer is
>> over?
>>
>
> If I understand the question correctly you want to execute the route once
> and then stop it?
> If this is the case you can use something like this:
> http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html
>
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Camel running continuously
Posted by Ioannis Canellos <io...@gmail.com>.
> When I run file transfer happens but the camel does not stop. The funny
> thing is whatever files I paste in source folder is transferred to the
> target again and again. How to stop the camel running once the transfer is
> over?
>
If I understand the question correctly you want to execute the route once
and then stop it?
If this is the case you can use something like this:
http://camel.apache.org/how-can-i-stop-a-route-from-a-route.html
--
*Ioannis Canellos*
*
FuseSource <http://fusesource.com>
**
Blog: http://iocanel.blogspot.com
**
Apache Karaf <http://karaf.apache.org/> Committer & PMC
Apache Camel <http://camel.apache.org/> Committer
Apache ServiceMix <http://servicemix.apache.org/> Committer
Apache Gora <http://incubator.apache.org/gora/> Committer
Apache DirectMemory <http://incubator.apache.org/directmemory/> Committer
*
Re: Camel running continuously
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
Do you mean file consumer consume same file over and over again? If
so, you just need add noop=true to from uri, which can avoid consuming
the same files over and over again. You may need take a look at [1] to
get more details how to configure file component.
[1]http://camel.apache.org/file2.html
Freeman
On 2011-11-21, at 下午3:57, southtechie wrote:
> I wrote a came route in beans.xml file to transfer files from one
> folder to
> another.
>
> <camel:route id="files.routing">
> <camel:from uri="file:///c:/tmp/source/" />
> <camel:to uri="file:///c:/tmp/target/" />
>
> </camel:route>
>
> When I run file transfer happens but the camel does not stop. The
> funny
> thing is whatever files I paste in source folder is transferred to the
> target again and again. How to stop the camel running once the
> transfer is
> over?
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-running-continuously-tp5009748p5009748.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Re: Camel running continuously
Posted by southtechie <so...@gmail.com>.
Hi Freeman-2,
Thanks for your reply.
I tried your suggestion but it does not transfer any file instead camlelock
file is created.
Actually I want to stop Camel once the transfer of existing files in the
source folder is done.
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-running-continuously-tp5009748p5012472.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel running continuously
Posted by southtechie <so...@gmail.com>.
Thanks a lot Bilgin Ibryam.
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-running-continuously-tp5009748p5012463.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel running continuously
Posted by Bilgin Ibryam <bi...@gmail.com>.
There are similar questions and answers on the user mailing list where
you can find the answer, here is one:
http://camel.465427.n5.nabble.com/How-to-make-camel-stop-automaticaly-td465989.html
Bilgin
On Mon, Nov 21, 2011 at 7:57 AM, southtechie <so...@gmail.com> wrote:
> I wrote a came route in beans.xml file to transfer files from one folder to
> another.
>
> <camel:route id="files.routing">
> <camel:from uri="file:///c:/tmp/source/" />
> <camel:to uri="file:///c:/tmp/target/" />
>
> </camel:route>
>
> When I run file transfer happens but the camel does not stop. The funny
> thing is whatever files I paste in source folder is transferred to the
> target again and again. How to stop the camel running once the transfer is
> over?
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-running-continuously-tp5009748p5009748.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>