Split a large message into a claim check and a payload. Send the claim check to the messaging platform and store the payload to an external service.
When to use this pattern?
Whenever a message size cannot fit the supported message limit of the chosen message bus technology.
Ensure that security is enforced, when sensitive data is stored in the payload.
Challenges for a large message
Message size limitations
Subscriber processing limitations
Solution Design
Keep the large file in the external storage or database and keep the reference in the service queue
Considerations
Consider deleting the message data after consuming it, if you don’t need to archive it.
Synchronously
Asynchronously
Storing and retrieving the message content causes additional overhead and latency