Camel Split list<MyObject> in header
apache-camel, java, split
Solution
Yes, you can:
from("direct:start")
.split(simple("header.myHeader"))
.log("Split: ${body}");
Tested with:
final ProducerTemplate template = context.createProducerTemplate();
template.sendBodyAndHeader("direct:start", "World!", "myHeader", Arrays.asList("a", "b", "c"));
Log:
INFO Split: a
INFO Split: b
INFO Split: c
Problem
Can I split list of my object? Like this Camel- Split List<MyObj> and process each java object - XML Config but, for header.