A catalog service changes a product’s price and publishes an event. The search application needs to update its index. Should the event contain only the product ID, leaving search to fetch the details, or should it include the new price and other searchable fields?
The first choice keeps the message small but introduces a lookup. The second gives the consumer more information immediately, but creates another copy of data that must stay correct.
These are two common event-design patterns: event notification and event-carried state transfer. In this chapter, we’ll compare them through a product catalog, examine what happens during delays and failures, and work out which information belongs in the event contract.