Design Patterns (GoF) (50 Qs)•Part 3: Architectural Patterns & Enterprise Systems (25 - 35)
Claim Check Pattern: Handling large message payloads in event-driven systems.
mid Leveldesign-patternsArchitectural Patterns
In Simple Words: Message brokers (Kafka, RabbitMQ, SQS) are designed for small payloads (< 256 KB); sending 50MB PDF files or 4K videos directly through message queues degrades broker memory and throughput:
- Claim Check Workflow:
- Producer uploads the 50MB file directly to cloud object storage (AWS S3 / GCS).
- Producer publishes a lightweight event message to the queue containing only the metadata and a storage pointer:
{ file_id: "101", s3_uri: "s3://bucket/video.mp4" }(The Claim Check). - Downstream consumers receive the event and download the file directly from S3 when ready.