Introduce @KafkaListenerTest for focused Kafka Listener testing #45706
Labels
for: team-meeting
An issue we'd like to discuss as a team to make progress
status: waiting-for-triage
An issue we've not yet triaged
Uh oh!
There was an error while loading. Please reload this page.
Currently, testing Kafka listeners typically involves
@SpringBootTest
and@EmbeddedKafka
, which loads the entire application context (as documented here).To enable more lightweight and focused testing of Kafka listeners, similar to how
@WebMvcTest
allows for testing web controllers in isolation, could anew new test slice be introduced?@KafkaListenerTest
.This slice would focus on testing a specific listener and its associated configuration (e.g., serialization/deserialization, error handlers) without the overhead of the full application context.
This could significantly improve the efficiency and speed of testing Kafka listener components.
Any thoughts on this proposal?
The text was updated successfully, but these errors were encountered: