Versions Compared

Key

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

...

New Consumer Group

  1. subscribe() invoked on the client thread. A subscription event was sent to the background thread
  2. Background The background thread drains the queue , and updates the GroupState to PREPARE.
  3. HeartbeatRequestManager .
  4. The background thread poll the RequestManager, HeartbeatRequestManager sends a heartbeat
  5. (maybe after a few loops)
  6. is polled. It checks the GroupState and determine it is time to send the heartbeat
  7. ConsumerGroupHeartbeatResponse received. Updated the PartitionAssignmentManagerGroupState to ASSIGN.
  8. PartitionAssignmentManager is poll, assignment updatedpolled, and realize the GroupState is in ASSIGN. Trigger assignment computation:
    1. Serverside assignment: no API will be invoke and assignment will be made
    2. Client side assignment:
      1. ConsumerGroupPrepareAssignment API will be invoked
      2. Leader receives the response and invoke ConsumerGroupInstallAssignment API after computing the assignment
    3. Old protocol: [ommitted here]
      1. JoinGroup ...
      2. SyncGroup ...
  9. Once the assignment is computed, send an event to the client thread to invoke the rebalance callback.
  10. Callback triggered; notify the background thread.
  11. PartitionAssignmentManager is polled and receives the acknowledgment from the client thread. Transition to Complete.
  12. [something needs to happen here]
  13. Transition the GroupState to Stable.

GroupState

[UNJOINED, PREPARE, ASSIGN, COMPLETE, STABLE]

...