intermediateBuilding the Consumer Microservice

Why is manual offset commit (rather than auto-commit) often preferred for a consumer doing meaningful processing?

Auto-commit advances the offset on a timer regardless of whether your processing actually succeeded, so a crash mid-processing can mean that message is never retried (it's already marked as consumed). Manual commit lets you commit the offset only AFTER your processing logic completes successfully, so a failure leaves the offset uncommitted and the message gets redelivered on restart.

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full Spring Ecosystem Mastery library.

Why is manual offset commit (rather than auto-commit) often preferred for a consumer doing meaningful processing?

Next Step

Continue to Why does a Kafka consumer that writes to a database need to think about idempotency, not just 'save the record'?← Back to all Kafka & Microservices questions