In this chapter, we will look at the significance of the asynchronous mode of communication using message passing across microservices. We will also understand that the secret to being resilient to failures is communication via message passing.
We will explore Apache Kafka and see its usage for different purposes, including as a message broker and for a publish-subscribe model.
Lagom provides a message broker API (on top of Apache Kafka) for ease of access from our microservices. The message broker API is a continuation of the Persistence API, and we will see how together they let us do solid engineering with a few lines of code.
We will cover the following topics in this chapter:
- Asynchronous mode of communication and its significance
- Apache Kafka and its usage-message broker
- Lagom message broker API