Apache Kafka Integration Testing

If you liked my video course on “Apache Kafka for Event-Driven Spring Boot Microservices”, you might be interested in learning how to test your Kafka-based Spring Boot Microservices.

I am working on an e-book that will teach you how to perform integration testing on your Apache Kafka-based Spring Boot applications.

My book will cover:

Setting Up the Development Environment

  • Installing and configuring Apache Kafka
  • Configuring an Embedded Instance of Kafka for Testing
  • Creating a Spring Boot project with Kafka dependencies
  • Setting up Testcontainers with Kafka for Integration Testing

Testing Kafka Producers

  • Sending messages to topics with KafkaTemplate
  • Verifying successful message delivery
  • Testing exception handling during message sending
  • Testing message serialization/deserialization
  • Testing Producer configuration

Testing Kafka Consumers

  • Consuming messages
  • Verifying message processing logic within consumers
  • Testing error handling in consumers (exceptions, Dead Letter Topic)

Advanced Testing Scenarios

  • Testing ordered message processing
  • Simulating network failures and broker downtime
  • Writing tests to verify producer idempotence
  • Guaranteeing Exactly-Once Delivery
    • Writing tests to verify consumer idempotence
    • Validating end-to-end message processing exactly once

If you would like to know when it is ready, I can send you an email. I can also share with you sample chapters, when they are ready.

About the Author

Sergey KargopolovMy name is Sergey Kargopolov and I teach how to create and test Spring Boot Microservices. You can find my video lessons on YouTube or check my video courses on Udemy.