Versions Compared

Key

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

...

  1. The polling thread updates the subscriptionState.
  2. Create an ASSIGN event, and queue up the event to the background thread.
  3. Background thread receives the event and executes the event.
    1. send a commitOffset
    2. Update metadata

Unsubscribe

  1. The polling thread removes the subscriptions from the subscriptionState
  2. executes the onPartitionRevoke callback
  3. Send background thread an LEAVE_GROUP event
  4. Returns
  5. The background thread:
    1. Initiate LeaveGroup

Subscribe

  1. The polling thread updates the subscriptionState.
  2. Create a SUBSCRIBE event, and send it to the background thread.
  3. Background thread executes the event:
    1. Update metadata

...

  1. Poll the ConsumerEventQueue, and execute the events accordingly
  2. Prepare a FETCH event, and send it to the background thread.
  3. Wait for the CompleteableFuture to finish
  4. Execute the interceptor.onConsumer and return the data.
  5. Background thread execute the FETCH event:
    1. poll coordinatorAutocommits
    2. issue fetch requests


Event Data Models

...