Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
languagejava
try{
  for(...){ //Processing batches of records...  }
  //Commit when we know we're done, after the batch is processed
  myConsumer.commiySync();
}catch(CommitFailedException){
  log.error("...");
}