Explainstuff.mebeta
All concepts
Cloud Native Patternsintermediate6 min

Claim Check

Stash a big payload in storage and pass around a tiny ticket instead of the whole thing.

When you check a coat at a theater, you don't carry the coat to your seat — you hand it over and get a little numbered tag. The tag is tiny and easy to pass around; the bulky coat sits safely in the cloakroom until you redeem the tag on your way out. The Claim Check pattern does exactly this for messages: keep the heavy thing in storage, pass around the lightweight ticket.

The problem

Message brokers love small messages. But real workloads often need to move large payloads — a 20 MB scanned document, a video to transcode, a fat batch of records. Stuffing those into a queue or topic causes real pain: many brokers enforce a maximum message size (Azure Service Bus and SQS are measured in hundreds of kilobytes, not megabytes), big messages slow the broker down and bloat memory, and you pay to shuttle the same large bytes through the messaging layer even when most consumers only need part of it. The messaging system was built to coordinate, not to be a file transfer pipe.

The before: a fat payload jammed through the broker
20 MB payload through the broker
Producer
Queue (20 MB msg)
Worker
Shoving a 20 MB payload straight through the queue slows the broker, bloats its memory, and risks hitting the maximum message size — the messaging layer was built to coordinate, not to ship files.

How it works

Split the payload from the message. When the producer has a large payload, it first writes the payload to shared storage — a blob store, object store, or similar — which hands back a key or URL. The producer then puts only that reference (plus any small metadata) onto the queue. That reference is the claim check. The consumer pulls the small message, reads the reference, and fetches the full payload from storage only when it's ready to process it. The broker never touches the heavy bytes; it just carries the ticket. The diagram below shows the payload going into the store while a slim message — holding only the reference — flows through the queue to the worker, which redeems it for the real data.

Pass the ticket, not the coat
payload / reference
Producer
Blob Store
Queue (ref)
Worker
The big payload goes to storage; a slim reference flows through the queue. The worker redeems it for the real data only when it's ready.
Tip

Plan the payload's lifecycle. A claim check is useless if the coat has been thrown out — and dangerous if anyone can grab any coat. Give stored payloads a retention or cleanup policy so storage doesn't grow forever, and lock down access (signed URLs, scoped permissions) so only the intended consumer can redeem the reference.

When to use it

Reach for Claim Check whenever messages would otherwise carry large or variable-size payloads, especially if you risk hitting broker size limits or you want to keep queue-based load leveling snappy and cheap. It pairs naturally with pub/sub fan-out — many subscribers can share one stored payload via the reference — and with competing consumers pulling work off the queue. The stored payload can even act like a cache others reuse.

Skip it when payloads are already tiny: the extra storage round-trip and cleanup logic aren't worth it for a few hundred bytes. Claim Check earns its keep precisely when the thing you're moving is too big to comfortably mail.

Key takeaways

  • Claim Check moves a large payload out of a message and into shared storage, sending only a reference (the 'claim check') through the messaging system.
  • It keeps messages small, so brokers stay fast and you avoid hitting message-size limits.
  • The consumer uses the reference to fetch the full payload from storage only when it actually needs it.
  • You trade an extra storage round-trip for smaller, cheaper, more reliable messaging.
  • Remember a lifecycle plan: clean up stored payloads after processing, and secure access to the storage.

Keep going