camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: FileConsumer->MyProducer1->MyProducer2?
Date Tue, 09 Aug 2011 14:07:54 GMT
Hi Michael,

by careful, in your route, you define bean and not processor.

To define processor, you should use:

<route>
    <from uri="file://C:/fileDir" />
    <process ref="myProducer1" />

Regards
JB

On 08/09/2011 03:53 PM, Michael Mertins wrote:
>
> Hi all,
>
> I am implementing my own camel components:
> -MyProducer1 should get files from the FileConsumer and wrag them together with another
object
> -MyProducer2 should get the two objects from MyProducer1 and is supposed to do something
with both of em
>
> Is it enough for MyProducer1 to implement the processor method in the Producer class
like this:
> Take exchange-message-body ; create wrapped-up-object ; replace message-body with wrapped-up-object;
?
> Or do I need to implement more stuff in order to make this work?
>
> Actually MyProducer1 should simply be a processor, but iirc producers basically are processors,
so this should work, right?
>
> My Route looks like this (I use blueprint for karaf):
>
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
>
>      <camelContext xmlns="http://camel.apache.org/schema/blueprint">
>          <route>
>              <from uri="file://C:/fileDir" />
>              <to uri="myProducer1:foo" />
>              <to uri="myProducer2:bar" />
>          </route>
>      </camelContext>
>
> </blueprint>
>
>
> I'm implementing based on the maven archetype:
>
> mvn archetype:generate                   \
>    -DarchetypeGroupId=org.apache.camel.archetypes  \
>    -DarchetypeArtifactId=camel-archetype-component \
>    -DarchetypeVersion=2.8.0  \ etc...
> Would be great to hear whether this should work or where my mistakes lie, as I
>
> Michael
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message