What it is
A splitter takes a single message containing multiple elements and produces one message per element. An order with many line items becomes one message per line item.
How it works
- The splitter reads a composite message.
- It iterates over its child elements.
- It emits a separate message for each, often tagged with a shared correlation id.
Why it matters
- Lets each element be processed independently and in parallel.
- Simplifies downstream handlers that work on one item at a time.
- Pairs with an aggregator to recombine results later.
A good splitter attaches information so the pieces can be reassembled: a correlation id, a sequence number, and a total count. Without these, an aggregator cannot tell when all parts arrived. Splitting also multiplies message volume, so high fan out can pressure the broker and downstream consumers.
Key idea
A splitter turns one composite message into many element messages, tagging them so they can be processed and later recombined.