Assuming we have the following route in Java:
This route will log each individual item produced as a result of splitting the incoming message with the given token and to implement the same in YAML, you need something like:
Which is fine but a a little bit verbose and convoluted if compared to the Java counterpart.
We could improve the dsl by introducing an option to enable chaining processors based on if they support outputs or not so the same route can be rewritten in YAML like:
In this case, as the split processor does not have any defined step, we can wire the log processor to split's output.