Environment
- Managed Kafka cluster (Confluent Cloud)
- Topic with multiple partitions
- Multiple replicas in the same consumer group
Relevant configuration
Error policy:
policy
.Retry(retryCount, initialDelay, delayIncrement)
.ThenStop();
EnableAutoCommit is left at Confluent default (true).
Summary
We saw a single incident where a message at offset N consistently failed, the consumer stopped, and after rebalance the group resumed from N+1 (skipping N). Before that, we had two normal stop/restart cycles where the failing message at N was retried again as expected. We cannot reproduce it so far.
Timeline (from logs)
For partition P, offset N:
-
P@N is consumed, processing starts.
-
Business code throws on every attempt.
-
Silverback retries multiple times; logs show the same offset P@N on each attempt.
-
After the last attempt, Silverback logs fatal stop:
- “Fatal error occurred… The consumer will be stopped… offset:
[P]@N …”
-
The very next log line is the rebalance revoke:
- Incident: “Revoked partition [P] (offset was N+1)”
- Normal/expected when consumer stops after failures:
“Revoked partition [P] (offset was -1001)”
-
The partition is assigned to another consumer in the same group, and it resumes from N+1, effectively skipping P@N.
Questions / pointers
At the moment the only thing that stands out to us is auto-commit. Could auto-commit (EnableAutoCommit=true) realistically cause the committed group offset to advance to N+1 in this kind of “retry → stop → immediate rebalance” flow, even though the message at N never succeeded?
If auto-commit alone shouldn’t explain this, do you have any ideas what else could affect the committed offset / starting position after rebalance in Silverback/Confluent.Kafka (e.g., revoke/assign behavior, commit-on-revoke, shutdown sequence, etc.)?
Thanks a lot in advance for any guidance.
Environment
Relevant configuration
Error policy:
EnableAutoCommitis left at Confluent default (true).Summary
We saw a single incident where a message at offset
Nconsistently failed, the consumer stopped, and after rebalance the group resumed fromN+1(skippingN). Before that, we had two normal stop/restart cycles where the failing message atNwas retried again as expected. We cannot reproduce it so far.Timeline (from logs)
For partition
P, offsetN:P@Nis consumed, processing starts.Business code throws on every attempt.
Silverback retries multiple times; logs show the same offset
P@Non each attempt.After the last attempt, Silverback logs fatal stop:
[P]@N…”The very next log line is the rebalance revoke:
“Revoked partition [P] (offset was -1001)”
The partition is assigned to another consumer in the same group, and it resumes from
N+1, effectively skippingP@N.Questions / pointers
At the moment the only thing that stands out to us is auto-commit. Could auto-commit (
EnableAutoCommit=true) realistically cause the committed group offset to advance toN+1in this kind of “retry → stop → immediate rebalance” flow, even though the message atNnever succeeded?If auto-commit alone shouldn’t explain this, do you have any ideas what else could affect the committed offset / starting position after rebalance in Silverback/Confluent.Kafka (e.g., revoke/assign behavior, commit-on-revoke, shutdown sequence, etc.)?
Thanks a lot in advance for any guidance.