Ok I would like at generate a new message containing the good ones and a a message for the bad ones. You can see here for how to generate a new message. http://camel.apache.org/how-do-i-write-a-custom-processor-which-sends-multiple-messages.html
Essentially you would have to create a list of good objects and set the exchange body to that list and route it depending on the good or bad. You can set the destination in a header. Then in the next step have the .toD(<someheader>). On Wed, Nov 30, 2016 at 7:31 PM, spurcell [via Camel] < ml-node+s465427n5790831...@n5.nabble.com> wrote: > Tried coding a dynamicRouter, but not understanding how to set the > exchange for each different route. > > Let me step back. > I have a list of Objects some good, some bad in my current exchange. So > body would be akin to the following: > A-GOOD > B-GOOD > C-GOOD > ... > F-BAD > H-BAD > I-BAD > ... > > I want to take the good, create a new exchange, take the bad and create > another exchange and route the good and bad to different routes. > > I do not want to use a splitter and have to reaggregate, and was hoping > there was a workaround for this scenario. > > Googling has not found anything that would work. Dynamic routing > documentation is a bit confusing, and I don't know how to create 2 > exchanges with it. > > > > Thanks, > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://camel.465427.n5.nabble.com/Route-to-two-paths- > tp5790803p5790831.html > To start a new topic under Camel - Users, email > ml-node+s465427n465428...@n5.nabble.com > To unsubscribe from Camel - Users, click here > <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=> > . > NAML > <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://camel.465427.n5.nabble.com/Route-to-two-paths-tp5790803p5790835.html Sent from the Camel - Users mailing list archive at Nabble.com.