Advanced Testing Techniques for Spring for Apache Kafka
This text discusses techniques for shortening the test feedback cycle with infrastructure on demand in integration tests, using Spring Kafka in a "vertically" scaled way. It emphasizes the importance of testing and provides an analogy to boxing training and the testing pyramid. The post also covers how to configure Spring Kafka to handle transient errors and retry sending events to a reporting system, as well as handling deserialization issues. Additionally, it introduces Testcontainers, a popular library for running Docker containers in tests, and demonstrates an integration test for the transient error scenario using JUnit 5 testing framework. The text concludes with a discussion on scaling Kafka processors deployments and the importance of shifting left in testing.
Company
Confluent
Date published
Nov. 13, 2020
Author(s)
Lucia Cerchie, Alexei Zenin, Josep Prat
Word count
2349
Hacker News points
None found.
Language
English