7 Kafka Interaction Patterns
This chapter covers
- Patterns for applying Kafka in microservices
- Implementing a data mesh architecture with Kafka
- Integrating data using Kafka Connect
- An introduction to Kafka transactions
Now that you have seen some real-world use cases, let’s look at how Kafka fits into architectural patterns—so you can choose it deliberately, not by default. You’ll see where Kafka excels in microservices (smart endpoints, data mesh, CQRS, event store) and where it’s a poor match (request–response). We cover how to bring data in and out with Kafka Connect while calling out common operational pitfalls. Finally, we make Kafka’s delivery semantics concrete: durability (no data loss), exactly-once processing, and ordering—what Kafka actually guarantees and what it doesn’t. This chapter helps turn patterns into practical choices you can defend in production, backed by clear checklists and trade-offs.
7.1 Field notes: When Kafka helps—and when it hurts
The team gathers once again in the meeting room, with the whiteboard cluttered with diagrams of their Kafka setup. Max Sellington, Eva Catalyst, and Rob Routine are now deep in discussion about how Kafka fits into their architecture.