Software Architecture Patterns, Antipatterns, and Pitfalls
by Mark Richards, Neal Ford, Raju Gandhi
Chapter 12. Key-Based Event Contract Pattern
When triggering events or sending messages, architects are faced with a decision about the event payload. They can choose to create a payload contract containing all the data necessary for reacting and responding to the event (that’s the Data-Based Event Payload contract in Chapter 8), or they can choose to send only the keys of that data. When responding to the event, services must retrieve the data from a database (that’s this pattern). This chapter focuses on the trade-offs and implications of the Key-Based Event Contract pattern.
Table 12-1 summarizes the metadata for the Key-Based Event Contract pattern.
| CATEGORY | METADATA |
|---|---|
CONTEXT: |
Contracts, Event-Driven Architecture, Message-Based Architectures, Microservices |
IMPROVED: |
Bandwidth Usage, Data Consistency, Data Integrity |
DEGRADED: |
Adaptability, Elasticity, Evolvability, Responsiveness, Scalability, Throughput |
How Much ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access