The problem with big messages
Message brokers work best with small messages. Stuffing a large image, video, or document into a message bloats the queue, slows the broker, and may hit size limits.
The claim check
The claim check pattern stores the large payload in external storage, such as an object store, and puts only a small reference, the claim check, into the message.
- Producer writes the blob to storage and sends a message holding its key.
- Consumer reads the key from the message and fetches the blob from storage when needed.
Why it helps
- Small messages keep the broker fast and within limits.
- Lazy retrieval: a consumer that does not need the blob skips the fetch entirely.
- Decoupled lifetime: storage retention and queue retention can differ.
Things to manage
- Cleanup: orphaned blobs need a retention or garbage collection policy.
- Access: consumers must have permission and a path to the storage.
Key idea
The claim check pattern moves large payloads to external storage and passes only a small reference through the queue, keeping the broker fast while consumers fetch the blob only when they need it.