You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Release a circuit-held Kafka record when its lane stops, once Dekaf exposes a lane-stopping signal #796
A Kafka record held by an open consumer circuit waits in its key lane until the circuit admits another attempt. Dekaf's partitioned runtime gives a handler no way to leave a stopping lane without marking its record processed. So a revoke or seek that waits past StopTimeout while a record is held stops the whole consumer. Nothing is lost, because the record stays uncommitted, but every rebalance during a dependency outage can take a consumer down.
Requested upstream in thomhurst/Dekaf#4169: a token on the record context that fires when the lane starts stopping, where an OperationCanceledException on that token counts as a clean, unprocessed exit.
Where
src/Relayer.Kafka/KafkaConsumer.cs, ProcessAsync: the circuit hold awaits changed.Task.WaitAsync(cancellationToken), and the runtime cancels that token only after StopTimeout.
Documented as a limitation in website/docs/guides/failure-handling.md (consumer circuit breaking) and in D22 in docs/decisions.md.
In ProcessAsync, also observe the new lane-stopping token while a record is held, so it exits unprocessed as soon as the lane starts stopping.
Restore the seek-while-held step in KafkaReceiveTests.Circuit_retains_failed_offset_and_preserves_permanent_dead_letter_handling (removed in Adopt Dekaf 1.28.0: parallel Kafka receive, one-pass header merge, trim-safe Avro #795). Add a broker test that revokes a partition while a record is held, and assert the consumer keeps running and the record replays on the new owner.
Remove the limitation, and the StopTimeout advice, from the failure-handling guide and D22.
Activity
thomhurst commentedon Nov 15, 2026
Unblocked: Dekaf 1.29.0 ships
StopRequestedToken(thomhurst/Dekaf#4170, closes thomhurst/Dekaf#4169). Removing on-hold.Expect a handler cancelled during a seek to replay under Dekaf 1.29 (#…
Synchronize the seek cancellation test with the lane stopping (#796)
Run the circuit-held revoke test on the session-shared Kafka broker (#…
Release a circuit-held Kafka record when its lane stops (#877)