My application needs to send a huge amount of data to another process, more than may fit in a single message. Or my application has made a request whose reply contains too much data for a single message.
How can messaging transmit an arbitrarily large amount of data?
Whenever a large set of data may need to be broken into message-size chunks, send the data as a Message Sequence and mark each message with sequence identification fields.
The three Message Sequence identification fields are:
- Sequence identifier – Distinguishes this cluster of messages from others.
- Position identifier – Uniquely identifies and sequentially orders each message in a sequence.
- Size or End indicator – Specifies the number of messages in the cluster, or marks the last message in the cluster (whose position identifier then specifies the size of the cluster).
... Read the entire pattern in the book Enterprise Integration Patterns
Related patterns:
Competing Consumers, Correlation Identifier, Invalid Message Channel, Message Channel, Message Dispatcher, Request-Reply, Claim Check, Transactional Client