Kafka Exception RetriableCommitFailedException
org.apache.kafka.clients.consumer.RetriableCommitFailedException
Retriable
Consumer
Exception thrown when an offset commit fails with a retriable error. This exception is generated on the client side upon receiving retriable error codes from the Group Coordinator in a commit response. Unlike CommitFailedException, this exception indicates that the commit can be retried. The consumer should attempt to commit the offsets again.
Common Causes
- An asynchronous offset commit (commitAsync) failed transiently because the group coordinator was momentarily unavailable or loading
- A brief network blip or coordinator failover between the consumer and the broker hosting __consumer_offsets
- Coordinator was rebuilding group state (COORDINATOR_LOAD_IN_PROGRESS) when the commit arrived
Solutions
- Treat it as retriable, but note commitAsync() does NOT auto-retry a failed commit (by design — so it never overwrites a newer offset with a stale one); do the retry inside the commitAsync callback, or just let the next commitAsync advance past it
- Prefer commitSync() at critical checkpoints (on shutdown / before a rebalance): it blocks and retries internally until it succeeds, hits a non-retriable error, or times out — stronger than commitAsync, though still not absolutely guaranteed
- Implement a commitAsync callback that logs and retries only the most recent offsets to avoid committing stale positions
Example Stack Trace
org.apache.kafka.clients.consumer.RetriableCommitFailedException: Offset commit failed with a retriable exception. You should retry committing the latest consumed offsets.
Caused by: org.apache.kafka.common.errors.CoordinatorNotAvailableExceptionRelated
Related Consumer exceptions: CommitFailedException · CoordinatorLoadInProgressException · CoordinatorNotAvailableException · FencedInstanceIdException · FencedMemberEpochException · GroupMaxSizeReachedException · IllegalGenerationException · InvalidGroupIdException
Hitting
RetriableCommitFailedException in production? Conduktor Console gives you real-time visibility into clients, consumer groups, and broker health. Browse every Kafka exception or protocol error code.