I have a spring boot application, that keeps reading all messages from a specific topic. My problem is that I have an issue that when the application restarts, it needs to read all the messages from the topic again. I thought these two options combined would do it, but it is not working:
- resetOffsets: true
- startOffset: earliest
Here is my method;
@StreamListener(myTopic)
public void handle(@Payload Input input) {
/** Do other stuff not related **/
}
Here is my application.yaml
spring:
cloud.stream:
bindings:
myTopic:
destination: TOPIC
content-type: application/**avro
group: group-topic
concurrency: 1
resetOffsets: true
startOffset: earliest