Message Sequence
Explanation
Section titled “Explanation”Sometimes an application must send more data than fits in a single message. Messaging systems often limit message size, and large messages can also slow the system down. Message Sequence is one way to handle this.
The idea is simple. The sender cuts the data into parts and sends each part as its own message. Every message carries a position identifier. That identifier uniquely identifies the message and fixes its place in the order.
Putting the parts back together
Two related patterns help the receiver:
- The Aggregator receives a stream of messages, finds the ones that belong together (see Correlation Identifier) and combines them.
- The Resequencer receives a stream that may arrive out of order. It holds early arrivals in an internal buffer. When a complete sequence is available, it publishes the messages in order.
Missing parts
A part may never arrive. One completeness strategy is to wait for all parts. Another is a timeout: wait a fixed time, then proceed with what arrived. Which one fits depends on whether a partial result is useful.
Alternative: Claim Check
The Claim Check pattern stores the full payload in an external data store. Only a reference travels through the messaging system.
Example
Section titled “Example”An export job produces a very large report, and the channel accepts only small messages. The sender cuts the report into numbered chunks and sends them all. The receiver buffers the chunks, joins them in order and hands over the complete report. If a chunk does not arrive before the timeout, the receiver follows its chosen rule for missing parts.
Trade-offs
Section titled “Trade-offs”Splitting keeps the data inside the messaging system. The price is extra design work: sequencing, correlation, duplicate handling and reassembly.
Claim Check avoids that work. It adds extra network trips compared with sending the data inline. It also makes the system depend on an external store.
Diagram source
flowchart LR S[Sender] -->|split| M1[Part 1] S --> M2[Part 2] S --> M3[Part 3] M1 --> C[Channel] M2 --> C M3 --> C C --> R[Resequencer and Aggregator] R -->|rebuild| O[Original data]Checks
Section titled “Checks”- The document names the message size limit that makes splitting necessary.
- Each message in a sequence carries a position identifier that orders it.
- The design states how out-of-order arrivals are buffered and reordered before processing.
- The design states what happens when parts are missing, such as waiting for all parts or a timeout.
- The design explains why Message Sequence was chosen over Claim Check, including duplicate handling and reassembly effort.
Related
Section titled “Related”- Claim Check
- Correlation Identifier
- Message Channel
- Messaging
- Composed Message Processor
- Idempotent Receiver
- Message Structure
- Enterprise Integration Patterns
Sources
Section titled “Sources”- Message Sequence - Enterprise Integration Patterns — enterpriseintegrationpatterns.com, accessed 2026-11-09
- Resequencer - Enterprise Integration Patterns — enterpriseintegrationpatterns.com, accessed 2026-11-09
- Aggregator - Enterprise Integration Patterns — enterpriseintegrationpatterns.com, accessed 2026-11-09
- Claim Check pattern - Azure Architecture Center | Microsoft Learn — learn.microsoft.com, accessed 2026-11-09