I guess you could return a List of pairs (fieldcount,byte[]), then split & then use the CBR to look at the field count & dispatch accordingly.
A simpler approach would be to do what the MySplitterBean example does in http://camel.apache.org/splitter.html. In your case return the byte[] in each of the message bodies & set the field count in the header. On 6 August 2014 15:06, dermoritz <tantea...@hotmail.com> wrote: > process() is a void method but do you mean instead of a byte[] i just > List<byte[]> into "exchange.getOut().setBody(returnVal)? > > The split would then automatically split into 2 byte[]? but how to know the > number of fields in each one? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-to-relay-different-parts-of-message-to-different-endpoints-tp5754836p5754862.html > Sent from the Camel - Users mailing list archive at Nabble.com. >