camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen" <claus.ib...@gmail.com>
Subject Re: Poll a collection of subfolders with a single endpoint
Date Thu, 18 Dec 2008 05:45:09 GMT
And if you mailbox files has a special extension then using the
recursive option and the regexPattern to set the pattern for the file
extensions to include/match.

But we could also add option for
- includedNamePrefix
- includedNamePostfix
But yet again then there might be to many options and too confusing
how to use the file component.

Any feedback on it is highly appreciated. As we would like to get it
improved in Camel 2.0.



On Wed, Dec 17, 2008 at 8:49 PM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
> Hi
>
> a)
> You can use the recursive=true option and Camel will walk all sub
> folders. If that is sufficient
> <endpoint id="mailboxes" uri="file:/mailboxe/?consumer.recurisve=true"/>
>
> b)
> If you need more fine grained control of which folders / files to
> consume there are several options
> - excludedNamePrefix
> - excludedNamePostfix
> - consumer.regexPattern
>
> But they only operates on the java.io.File.getName() so you wont have
> the path to test from.
> I guess that is a limitation sometimes and we could add options for
> the File.getPath() so you have both combos
> - consumer.pathRegexPattern
>
> But yet again the file component has many options now and it can get a
> bit confusing.
>
> c)
> I have been considering supporting the ant path style
> (**/dropOffFolder), that you have in spring resource.
> But I didn't want to write an ant path style parser and camel-core
> should not require spring.
> But that would be cool
>
> d)
> In Camel 2.0 we have support for setting a java.io.FileFilter where
> you can do the test in java code, and thus it would be possible.
>
> e)
> File language is meant for the file producer to set the filename, so
> you can not currently use it for filtering which files/folders should
> be included in the file consumer. But I guess we could do filtering
> using expressions, but we dont have nice support for this in the DSL
> as from is generic.
>
>
> Any thoughts?
>
>
>
> On Wed, Dec 17, 2008 at 7:44 PM, ychawla <premiergeneration@yahoo.com> wrote:
>>
>> Hello All,
>> I have a well defined file structure where I am going to be picking up files
>> from.  It looks like this:
>>
>> Mailboxes (STATIC)
>>      Mailbox1 (dynamic)
>>          dropOffFolder (static)
>>      Mailbox2 (dynamic)
>>          dropOffFolder (static)
>>
>> Currently I have endpoints defined like this:
>> <endpoint id="mailbox1" uri="file:/mailboxes/Mailbox1/dropOffFolder"/>
>> <endpoint id="mailbox1" uri="file:/mailboxes/Mailbox2/dropOffFolder"/>
>>
>> Would it be possible through File Language, simple or another mechanism to
>> have a single endpoint with * being a wilcard:
>>
>> <endpoint id="mailboxes" uri="file:/mailboxes/*/dropOffFolder"/>
>>
>> I checked the documentation and I couldn't find anything.
>>
>> Thanks!
>>
>> Yogesh
>> --
>> View this message in context: http://www.nabble.com/Poll-a-collection-of-subfolders-with-a-single-endpoint-tp21058872s22882p21058872.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
>
> /Claus Ibsen
> Apache Camel Committer
> Blog: http://davsclaus.blogspot.com/
>



-- 

/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/

Mime
View raw message