Spring Stream Kafka re-reads all messages

453 Views Asked by At

Using Spring cloud stream version Brooklyn.SR1 with spring-cloud-starter-stream-kafka in my spring-boot application. I'm getting an undesirable situation each time my application is restarted my application re reads all of the messages that are persisted on the Kafka bus. I set the properties consumer.resetOffsets = true and consumer.startOffset = true. At first it looked like those properties resolved the situation but i was able to reproduce it. surly I'm doing something wrong

1

There are 1 best solutions below

0
On

spring.cloud.stream.kafka.bindings..consumer.startOffset = latest

worked for me.