Back to Catalog
Integration
Message Construction
Document Message
Ship a complete data record as a message — receiver does whatever it wants with it.
Intent & Description
Real-world Use Case
Product catalog sync — every time a product is updated, a full ProductDocument message is published containing all product fields. Downstream search index, recommendation engine, and mobile API each consume and process it independently without calling back to the product service.
Source
📌 TL;DR
Document Message = ship the whole record, not a pointer to it. Self-contained, processable, replayable. Watch payload size.
Advantages
- Receiver is fully autonomous — no callbacks or additional fetches needed
- Self-contained = easier to replay, debug, and audit
- Works well for data sync and replication use cases
- Decouples processing time from data availability
Disadvantages
- Large payloads can overwhelm brokers — use Claim Check for big documents
- Data can be stale by the time it is consumed (eventual consistency)
- Schema evolution is tricky — all consumers must handle new/removed fields
- Redundant data if multiple consumers only need a slice (pair with Content Filter)