You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by deepak_a <an...@gmail.com> on 2013/08/19 15:34:11 UTC

Using Camel File component to Poll a directory (but not read the files)

Hi,

is it possible to use file component to poll for files in directories but
NOT actually read the file?
<the file size is quite big - so I don't want to read the file> - but I need
a notification message (with the file name)

Is there a way to achieve this using File component? or any other component
that will help me achieve this?

regards
D



--
View this message in context: http://camel.465427.n5.nabble.com/Using-Camel-File-component-to-Poll-a-directory-but-not-read-the-files-tp5737510.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Using Camel File component to Poll a directory (but not read the files)

Posted by Dale King <da...@gmail.com>.
I think from looking at the code that the file content is not read at the
time of polling. The content will not actually be read until you examine
the body. So if you followed the file consumer with a setBody to change the
body to something else, the content will never be read.


On Mon, Aug 19, 2013 at 9:34 AM, deepak_a <an...@gmail.com> wrote:

> Hi,
>
> is it possible to use file component to poll for files in directories but
> NOT actually read the file?
> <the file size is quite big - so I don't want to read the file> - but I
> need
> a notification message (with the file name)
>
> Is there a way to achieve this using File component? or any other component
> that will help me achieve this?
>
> regards
> D
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Using-Camel-File-component-to-Poll-a-directory-but-not-read-the-files-tp5737510.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Dale King

Re: Using Camel File component to Poll a directory (but not read the files)

Posted by Claus Ibsen <cl...@gmail.com>.
You can use noop=true, the message body is just java.io.File so the
data wont be loaded in memory out of the box.

On Mon, Aug 19, 2013 at 3:34 PM, deepak_a <an...@gmail.com> wrote:
> Hi,
>
> is it possible to use file component to poll for files in directories but
> NOT actually read the file?
> <the file size is quite big - so I don't want to read the file> - but I need
> a notification message (with the file name)
>
> Is there a way to achieve this using File component? or any other component
> that will help me achieve this?
>
> regards
> D
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Using-Camel-File-component-to-Poll-a-directory-but-not-read-the-files-tp5737510.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
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