![Building Event-Driven Microservices - Chapter 3 - Communication and Data Contracts](/en/2022/05/building-event-driven-microservices-03-communication-and-data-contracts/images/Building-Event-Driven-Microservices%28title%29_hu7787e8fb510b89a0b5a2ec0c57daf609_74941_400x0_resize_q90_h2_box.webp)
Building Event-Driven Microservices - Chapter 3 - Communication and Data Contracts
The Event-Driven model heavily relies on the QUALITY of events.
Good quality events are:
explicitly defined via contracts have comments support evolution with backward and forward compatibility support code generation breaking changes are well thought Good events are implemented using the right tools:
use Avro/Thrift/Protobuf formats and never use JSON! use the right event broker (such as Pulsar) Good events are designed to:
contain all the info needed by consumers use separate streams for each event type use the right data types for their fields (don’t use string for numbers, use enums, etc.