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: Enrich/poolEnrich how to work with for file component ?
Date Wed, 11 Feb 2015 08:53:26 GMT
Hi

Enrich/PollEnrich cannot use the header.

See the box about _data from current exchange .._ at
http://camel.apache.org/content-enricher.html

Instead to read a file just see the body to a java.io.File

<setBody><simple type="java.io.File">/somewhere</simple></setBody>

On Tue, Feb 10, 2015 at 6:16 PM, fliot33 <francois.liot@poplidays.com> wrote:
> This kind or routes don't work as expected :
>
> <route>
>    <from uri="activemq:in"/>
>    <setHeader
> headerName="CamelFileName"><simple>some-known-file.xml</simple></setHeader>
>    <enrich uri="file:/tmp/some/place?noop=true"
> strategyRef="XmlAggregatorStrategy"/>
>    <to uri="activemq:out"/>
> </route>
>
> (XmlAggregtorStrategy bean is working pretty fine, working as a charm with
> http2 component for example)
>
> Firing some message into activemq:in
> It modify me the content of /tmp/some/place/some-known-file.xml
> Instead of only enriching me my message...
>
> It must consider file component as producer instead of as consummer,
> Any idea how to reach my goal (without writing code, but only xml/spring
> routes) ?
>
> Thanks in advance
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Enrich-poolEnrich-how-to-work-with-for-file-component-tp5762573.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
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message