DEV Community


The Kafka offset trap in Spring Cloud

Maxime Guilbert
Just a dev who touches a lot of things and wants to share his experiences. (or just want to note somewhere things to don't forget)
Updated on ・1 min read

This morning, I worked as usual with Java Spring apps and Kafka. I wanted to test the kafka configuration auto.offset.reset.

By default, following the Kafka documentation, the value of auto.offset.reset is latest.

Alt Text

But when I did my test, I saw that this default configuration is not applied with Spring!

When I looked in the Spring Cloud documentation, I saw that the default value is earliest!

Alt Text

I don't know why it's configured like this, but it's a little bit confusing.

I hope it will help you!

Discussion (0)