Skip to content

Release a circuit-held Kafka record when its lane stops, once Dekaf exposes a lane-stopping signal #796

Closed

Description

@thomhurst

Summary

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

Changes once Dekaf ships it

  • Bump Dekaf to the release that contains the fix.
  • 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.

Remove on-hold when a Dekaf release contains thomhurst/Dekaf#4169.

Activity

  1. added
    enhancement
    area: kafka
    P3
    on-hold
    and removed
    on-hold
    on Nov 15, 2026
  2. thomhurst commented on Nov 15, 2026

    @thomhurst
    OwnerAuthor

    Unblocked: Dekaf 1.29.0 ships StopRequestedToken (thomhurst/Dekaf#4170, closes thomhurst/Dekaf#4169). Removing on-hold.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3area: kafkaenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions