Manual Acknowledgement of Messages : Spring Cloud Stream Kafka
The scenario i want to implement is consume a message from Kafka , process it, if some condition fails i do not wish to acknowledge the message. For this i found in the spring cloud stream reference documentation, autoCommitOffset Whether to autocommit offsets when a message has been processed. If set to false, an Acknowledgment header will be available in the message headers for late acknowledgment. Default: true. My question is after setting autoCommitOffset to false, how can i acknowledge a message? A Code example would be hugely appreciated. I've provided an answer to the question here