Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

While group.share.partition.max.record.locks correctly prevents broker memory pressure by bounding in-flight records, hitting that lock ceiling has a critical liveness consequence: fetching operations yield no further records from the primary partition. If the DLQ topic suffers a prolonged metadata or storage outage, the coordinator holds record locks until the limit is exhausted stalling the primary pipeline entirely.

This re-introduces head-of-line blocking via a secondary infrastructure failure precisely the problem Share Groups were originally designed to eliminate. A DLQ (a secondary concern) taking down the primary stream is an architectural single point of failure (SPOF). The safer operational posture is to prioritize system liveness over strict DLQ durability during infrastructure degradation.

Concrete example: A share group is processing 50,000 records/sec across 20 partitions. The DLQ topic's leader undergoes an unplanned election lasting 45 seconds. Without share.group.dlq.write.timeout.ms, the coordinator accumulates ARCHIVING-state record locks until group.share.partition.max.record.locks is exhausted. At that point, primary partition fetching halts entirely for the duration of the DLQ outage. A secondary infrastructure failure (DLQ topic) has cascaded into a full primary pipeline outage precisely the head-of-line blocking scenario Share Groups were designed to prevent.

...

New Share Group Configuration Properties

Config KeyTypeDefaultDescription
share.group.dlq.circuit.breaker.enablebooleanfalseEnables the circuit breaker for this share group.
share.group.dlq.circuit.breaker.threshold.percentint20Percentage of messages routed to DLQ within the rolling window that triggers the circuit breaker. Range: 1–100.
share.group.dlq.circuit.breaker.window.mslong60000Rolling window duration (ms) over which the DLQ rate is evaluated. Default: 60 seconds.
share.group.dlq.circuit.breaker.min.messagesint100Minimum number of messages processed within the window before the circuit breaker can trigger. Prevents false positives on low-volume groups.
share.group.dlq.circuit.breaker.auto.resume.enablebooleanfalseIf true, the group automatically resumes after share.group.dlq.circuit.breaker.auto.resume.ms.
share.group.dlq.circuit.breaker.auto.resume.mslong300000Time (ms) to wait before auto-resuming a paused group. Default: 5 minutes.
share.group.dlq.write.timeout.mslong30000Maximum time (ms) the coordinator will wait for a DLQ write to complete before falling through to ARCHIVED state with a logged error. Default: 30 seconds.
share.group.dlq.strict.isolationbooleanfalseIf true, coordinator rejects group startup if the configured DLQ topic is already registered by another share group.

New Broker Metrics

MetricDescription
kafka.share.group:type=ShareGroupMetrics,name=DlqCircuitBreakerTripped,group={group-id}Counter incremented each time the circuit breaker trips for a given share group.
kafka.share.group:type=ShareGroupMetrics,name=DlqWriteTimeouts,group={group-id}Counter incremented each time a DLQ write times out and falls through to ARCHIVED.
kafka.share.group:type=ShareGroupMetrics,name=DlqTopicSharedByMultipleGroups,topic={dlq-topic}Gauge emitted at coordinator startup and on group registration when a DLQ topic is shared by more than one share group. No enforcement
observability only.

Share Group State Extension

...

  1. Should the circuit breaker window counter be persisted in the share group state topic (for coordinator failover resilience), or is an in-memory counter acceptable given that a failover naturally resets the window?

    Proposed: In-memory counter is acceptable for the initial implementation. A coordinator failover resets the window, which is a safe failure mode the circuit breaker may take up to one additional window period to re-trip after failover. Persisting the counter to the state topic adds complexity and write amplification that is not justified for a rolling-window metric. This can be revisited in a follow-on KIP if operational experience shows failover-induced false negatives are a problem.

  2. Should auto.resume.enable default to true for development environments?

    Proposed: No auto.resume.enable defaults to false in all environments. Differentiating defaults by environment would require broker-side environment detection, which is out of scope. Operators who want auto-resume behavior in development can set it explicitly. Defaulting to manual resume is the safer posture for production and avoids a footgun where a misconfigured production broker auto-resumes into a still-broken downstream service.

  3. Should the pause-reason field be added to the existing DescribeGroups RPC, or introduced as a new DescribeShareGroupState RPC?

  4. Should timed-out DLQ writes (ARCHIVED fall-through) count toward the rate threshold circuit breaker, or be tracked as a separate trigger condition only?

    Proposed: No. Timeout events and rate-threshold events are distinct failure modes with different operational meanings a timeout indicates DLQ infrastructure unavailability, while a high DLQ rate indicates downstream consumer failure. Conflating them would make the circuit breaker harder to reason about and could cause false trips during DLQ infrastructure recovery. Timeout events are tracked separately via the DlqWriteTimeouts metric and should trigger operator alerting independently.