Auto-commit runs on a timer inside poll(), committing the offsets of everything the last poll returned - whether your loop finished handling them or not. A crash mid-batch loses every record after the last tick.
Run this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.
Published 2026-08-25