Skip to content

Circuit breaker that pauses consumers natively #26

Closed
3 of 3 issues completed
Closed

Description

@thomhurst

Implement the circuit breaker in design §5.

Scope

  • When a consumer's failure rate crosses a threshold within a window, pause the consumer natively (Kafka Pause, Service Bus processor stop) instead of sending messages to the dead-letter queue.
  • Half-open with a probe message, then close or re-open.
  • Expose state as a metric.

Acceptance criteria

  • Tests prove messages are not dead-lettered while the circuit is open.

Shipped foundations: #9 (failure pipeline), #21 (Kafka transport), and #24 (Azure Service Bus transport). All are complete on main and no longer block this issue.

See docs/design.md and docs/decisions.md.

Sub-issues

Sub-issues

3 of 3 Issues completed
Loading 3 sub-issues

Activity

  1. added
    phase-1: transports
    area: resiliency
    P2
    on Oct 31, 2026
  2. thomhurst commented on Nov 1, 2026

    @thomhurst
    OwnerAuthor

    Triage against origin/main 66f3349: native consumer circuit-breaking execution is not implemented. Added native blocked-by #9, #21 and #24 to match the existing failure-pipeline and transport prerequisites.

  3. thomhurst commented on Nov 10, 2026

    @thomhurst
    OwnerAuthor

    Removed completed blocked_by links to #9, #21 and #24 and updated the prerequisite text. Fresh origin/main c548832 includes their failure pipeline and native transports, but still has no consumer circuit-breaker implementation; the existing remaining scope and P2 priority stand.

  4. added
    in-progress
    on Nov 10, 2026
  5. thomhurst commented on Nov 10, 2026

    @thomhurst
    OwnerAuthor

    Split into independently mergeable native sub-issues: #399 supplies the shared internal policy; #400 wires Kafka pause/replay/commit behavior; #401 wires Service Bus processor lifecycle and settlement. Both integrations depend natively on #399. The parent stays open until both native integrations meet its acceptance criteria. Pinned source inspection confirms Dekaf 1.26.0 already provides Pause/Resume and Service Bus 7.21.0 provides StopProcessingAsync/StartProcessingAsync; neither provides the failure-rate policy. Service Bus explicitly forbids awaiting stop from a callback because it drains those callbacks.

    The first unit is implemented in draft #406, closing #399 after review. It supplies tested atomic policy state, fixed sampling windows and one half-open probe; no consumer has native circuit behavior enabled yet. #400 and #401 carry the remaining original acceptance criteria and native-state telemetry integration.

  6. added
    in-progress
    and removed
    in-progress
    on Nov 10, 2026
  7. self-assigned this
    on Nov 10, 2026
  8. thomhurst commented on Nov 10, 2026

    @thomhurst
    OwnerAuthor

    Acceptance audit against origin/main 389ac647222dcc0a88b07e528b9a4a856d578955: #406 supplies the shared policy; #411 supplies Kafka native pause/resume, retained offsets and probe recovery; #412 supplies Service Bus native stop/drain/restart and retained deliveries. Both adapters report actual circuit state. Native sub-issues #399, #400 and #401 are closed. Tests cover no failure-pipeline dead-lettering while open, and both merged integration CI runs passed. A fresh focused audit run passed all 23 policy/Service Bus circuit tests.

    The only remaining mismatch was the roadmap calling Kafka planned. #419 corrects it, records detailed code/test/CI evidence and closes this parent on merge. npm ci and the documentation production build passed.

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

Metadata

Metadata

Assignees

Labels

P2area: resiliencyin-progressphase-1: transports

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions