Apache Kafka Integration Testing

In 2024, I created a video course for absolute beginners, teaching them how to build Event-Driven Spring Boot Microservices with Apache Kafka. However, the course intentionally does not cover how to write integration tests. It is designed for absolute beginners, and I did not want to take students’ attention away from the main content to learn how to write integration tests.

I created a mini e-book that is designed to complement that course. It provides a focused walkthrough on how to write integration tests for basic Kafka Producer and Kafka Consumer Spring Boot applications.

While this book complements the video course, it stands independently. You do not need to enroll in the video course to benefit from this book. However, a basic understanding of Apache Kafka and the workings of Kafka Producer and Kafka Consumer is required to fully grasp the content of this book.

Throughout the book, I explain all the crucial aspects of Producer and Consumer configuration. Additionally, you have the option to download the source code for both applications, as well as the final versions of the test methods from a git repository created specifically for this book.

By the end of this book, you will be able to:

  • Write an integration test for a Kafka Producer,
  • Verify Producer Configuration properties. For example, we will write an integration test to verify that the Kafka producer is indeed configured as an Idempotent Producer, 
  • Write an integration test for a Kafka Consumer. 

Please refer to the table of contents for additional details.

I hope this mini e-book proves to be a valuable resource for you.