Hi
On Thu, Jan 14, 2010 at 4:03 PM, Drone42 <[email protected]> wrote: > > I would like a route where I receive a message (rawframe), process it and > split it into multiple new message (different types; Frame, Packet, > Parameter), and thereafter route these to different endpoints. > > Something like; > > <route> > <from uri="activemq:topic:rawframe" /> > <to uri="bean:marshaller" /> > <choice> > <when> > <xpath>$class.type = 'frame'</xpath> > <to uri="activemq:topic:Frame"/> > </when> > <when> > <xpath>$class.type = 'packet'</xpath> > <to uri="activemq:topic:Packet"/> > </when> > <otherwise> > <xpath>$class.type = 'parameter'</xpath> > <to uri="activemq:topic:Parameter"/> > </otherwise> > </choice> > </route> > > My questions are; > - Can a processor in a route split one input message into multiple messages > like this? Check out using a POJO for splitter at http://camel.apache.org/splitter.html > - How can I route the output messages from my processor based on the class > type? In the example I wrote '$class.type' as pseudo code. > See about xpath here http://camel.apache.org/xpath I assume class type is something in the XML document <class><type>foo</type></class> etc. > Thanks, > Villemos. > -- > View this message in context: > http://old.nabble.com/Using-the-splitter-based-on-POJO-class-type-tp27162674p27162674.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
