You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Larry Meadors <la...@gmail.com> on 2012/04/29 14:41:42 UTC

File consumer behavior when no files waiting

I have a file consumer that uploads files to a server. It acts like a
batch consumer, and uploads all the files an exits.

That part is perfect.

The only problem I have is that if it gets run and there are NO files,
it doesn't exit.

I'm guessing there is an option that I'm missing.

This is my source definition:
 - file:\\\\mac-server\\images\\stagefullscanthumbnails\\?initialDelay=0&delete=true

Larry

Re: File consumer behavior when no files waiting

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You can use the option sendEmptyMessageWhenIdle and then detect the
empty message in the route, and then stop the app.

It has been discussed on this mailing list before, can you google a
bit. There should be recent talks about this from this year as well.
There is several solutions for this.



On Sun, Apr 29, 2012 at 2:41 PM, Larry Meadors <la...@gmail.com> wrote:
> I have a file consumer that uploads files to a server. It acts like a
> batch consumer, and uploads all the files an exits.
>
> That part is perfect.
>
> The only problem I have is that if it gets run and there are NO files,
> it doesn't exit.
>
> I'm guessing there is an option that I'm missing.
>
> This is my source definition:
>  - file:\\\\mac-server\\images\\stagefullscanthumbnails\\?initialDelay=0&delete=true
>
> Larry



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/