Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Principle:Apache Kafka Coordinator Timer Scheduling

From Leeroopedia


Knowledge Sources
Domains Distributed_Systems, Scheduling
Last Updated 2026-02-09 12:00 GMT

Overview

A deferred execution mechanism that schedules time-based operations within the coordinator runtime.

Description

Coordinator Timer Scheduling provides a way to execute operations after a specified delay. Timers are used for session timeouts, heartbeat deadlines, delayed rebalances, and other time-dependent coordinator behaviors. Each timer is identified by a unique key and can be cancelled or overridden. When a timer fires, it generates a write operation that produces records, maintaining the coordinator's log-based state management model.

Usage

Use this principle for any coordinator behavior that requires delayed execution, such as consumer group session timeouts or delayed partition reassignments.

Theoretical Basis

  1. Key-Based Management: Each timer has a unique key for cancellation and override.
  2. Write Operation Integration: Timer expiration triggers a write operation that generates records, keeping all state changes in the log.
  3. Retry Support: Failed timer operations can be automatically retried with configurable backoff.
  4. Leadership Awareness: Timer operations that fail due to NotCoordinatorException are silently ignored since the coordinator is no longer active.

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment