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: Assigning File names to exchanges generated from split
Date Fri, 06 Jul 2012 13:00:28 GMT
Hi

You can call a bean in the setHeader so the result of the bean is the
header value.


On Fri, Jul 6, 2012 at 11:55 AM, somnath <somnath.b4@gmail.com> wrote:
> Hi,
>
> My Camel route looks like below
>                 from("file:/camel/inbox?noop=true&delay=480000")
>                 .autoStartup(true)
>
> .aggregate(simple(ANY_LITERAL),(OMAggregationStrategy)context.getBean("om-aggregation-strategy")).completionFromBatchConsumer()
>                 .beanRef("om-processor", "process")
>                 .split(body()).parallelProcessing()
> *               .setHeader(Exchange.FILE_NAME).simple("${exchangeId}.csv")*
>                 .to("file:/camel/outbox?flatten=true");
>
> I want to be able to generate more meaningful names to the files rather than
> the one assigned through the setHeader line which basically is the exchange
> ID. The processor can spit out the various components of the name which I
> can assign to a bean in the processor bean. Is there a way I can access this
> bean in the setHeader section?
>
> -Somnath
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Assigning-File-names-to-exchanges-generated-from-split-tp5715603.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message