Splitter Pattern By David Boyne

Splitter Pattern By David Boyne

Splitter Pattern

The Splitter Pattern from Enterprise integration patterns, takes an event/message and splits it into many for downstream consumers.

Splitting Messages

  • If you have a large message/event you can use a splitter to split it into many messages/events for downstream consumers.
  • Using a queue an example could be the splitter takes a message from a queue, splits it and puts it back onto a new queue/channel.
  • This pattern can be helpful if you want to process large messages or events, or have a business use-case where it might make sense to split. Example could be taking an order and splitting into it’s sections (as seen here).

Enrich with original event

  • When you split your event, you may want to duplicate the information into the child events, depending on your data strategy. If you duplicate then downstream consumers may have the information they need to process, or the can go back to producer/API to get information they need.
  • Splitter consumes original event, uses information to build payload for child events.

Change data capture into many events

  • Databases that support change data capture events allow us to react to events when data is changed in databases.
  • An example use-case could be listening for database changes (using change data capture) and transforming these events into multiple events downstream.
  • An example of this could be using DynamoDB stream, into EventBridge Pipes to create many events downstream. Example here.

Extra Resources

Download EDA Visuals

Join over 8,000 others learning EDA and download all the EDA visuals directly to your computer. This document updates everytime a new visual is added so make sure you come back to get the latest.

Download now →
Diagrams and thoughts by @boyney123 to help you learn.