Chapter Conclusion
We'll conclude this chapter with a quick summary of what we've learned.
We'll cover the following
Kafka offers an interesting approach for the asynchronous communication between microservices.
Benefits #
-
Kafka can store records permanently, which facilitates the use of event sourcing in some scenarios. In addition, approaches like Avro are available for solving problems like schema evolution.
-
The overhead for the consumers is low. They have to remember only the position in each partition.
-
With partitions, Kafka has a concept for parallel processing and, with consumer groups, it has a concept to guarantee the order of records for consumers. In this way, Kafka can guarantee delivery to a consumer and at the same time distribute the work among several consumers.
-
Kafka can guarantee the delivery of messages. The consumer commits the records it has successfully processed. If an error occurs, it does not commit the record and tries to process it again.
Therefore, it is worth taking a look at this technology, especially for microservices, even if other asynchronous communication mechanisms are also useful.
Get hands-on with 1200+ tech skills courses.