Versions Compared

Key

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

...

  1. Deprecate HeartbeatThread

    1. Remove the heartbeat thread.
    2. Move the heartbeat logic to the background thread.
  2. Refactor the Coordinator classes

    1. Revisit timers and loops
    2. Remove some blocking methods, such as commitOffsetSync.  The blocking commit should be handled by the polling thread, waiting for the background thread to complete the future.
    3. The coordinator will be polled by the background thread loop.
    4. Rebalance state modification: We will add a few states to ensure the rebalance callbacks are executed in the correct sequence and time.
  3. Refactor the KafkaConsumer API

    1. It will send Events to the background thread if network communication is required.
    2. Remove dependency on the fetcher, coordinator, and networkClient.
  4. Introduce events Events and communication channels.

    1. We will use two channels the facilitate the two-way communication
  5. Address issues in these Jira tickets

...

The client thread, also known as the polling thread, is where the thread user invokes the poll() operation.

Background Thread

The Specifically, in the context of the new design, we use this generic term to indicate the active process running in the background.  It handles network communication, rebalancing, including coordinator communication and heartbeat.  This article will provide more implementation details. 

Heartbeat Thread

The background running thread in the current implementation (see KIP-62).

Channel

We have two channels in this design.  One channel delivers messages from the polling thread to the background thread.  The other channel delivers messages submitted by the background thread to the polling thread.

Event

The primary communication medium for the polling thread is to interact with the background thread.

...