You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Quinn Stevenson <qu...@pronoia-solutions.com> on 2016/09/01 22:07:02 UTC
Re: Pulling multiple files in simultaneously
Would something like this work? I’m not sure how far you can push the concurrentConsumers for SEDA though.
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="file:target/data/in?noop=true"/>
<loop>
<constant>1000</constant>
<to uri="seda://write-file" />
</loop>
</route>
<route>
<from uri="seda://write-file?blockWhenFull=true&concurrentConsumers=50"/>
<log message="Writing File ${header[CamelLoopIndex]}" />
<delay>
<constant>1000</constant>
</delay>
<to uri="file://target/data/out?fileName=${date:now:yyyymmddhhmmss}.LOOP.${header.CamelLoopIndex}.txt"/>
</route>
</camelContext>
> On Aug 31, 2016, at 2:57 AM, kikou1984 <hi...@atos.net> wrote:
>
> <camelContext xmlns="http://camel.apache.org/schema/spring <http://camel.apache.org/schema/spring>">
> <route>
> <from uri="file:src/data?noop=true"/>
> <loop>
> <constant>10000</constant>
> <to
> uri="file://src/data/out?fileName=${date:now:yyyymmddhhmmss}.LOOP.${header.CamelLoopIndex}.txt <file://src/data/out?fileName=${date:now:yyyymmddhhmmss}.LOOP.${header.CamelLoopIndex}.txt>"/>
> </loop>
> </route>
> </camelContext>