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. To make these choices, it’s important to know where Kafka excels in microservices, including smart endpoints, data mesh, CQRS, and event stores, and where it’s a poor match (request-response).
Then there’s the issue of how to move data in and out—for this we can turn to Kafka Connect, which we met briefly in chapter 5. We’ll explore in detail how this product can be effectively used for data integration within an enterprise environment, examining both its potential and common challenges.
Finally, we need to protect our system from the risk of undetected data loss—always a concern in asynchronous message transfer—using Kafka’s guarantees. How do we ensure durability (no data loss), exactly-once processing, and ordering, and what do these semantics actually guarantee?
This chapter helps turn patterns into practical choices you can defend in production, backed by clear checklists and trade-offs.