...
Info |
---|
If enable.auto.commit = false, then it is a manual management of the offset. |
Kafka Consumer and Post-Processing as commit
To handle the new record to process, we need to make sure that the ones we’ve currently processed are committed.
Code Block | ||
---|---|---|
| ||
try{
for(...){ //Processing batches of records... }
//Commit when we know we're done, after the batch is processed
myConsumer.commiySync();
}catch(CommitFailedException){
log.error("...");
} |