Versions Compared

Key

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

...

// Channel used to send events to the background thread

private BlockingQueue<ApplicationEvent> queue;

abstract public class ApplicationEvent {
   private final ApplicationEventType eventType;
}

enum ApplicationEventType {
   COMMIT,
   ACK_PARTITION_REVOKED,
ACK_PARTITION_ASSIGNED,
UPDATE_METADATA,
LEAVE_GROUP, }
BackgroundEventQueue and BackgroundEvent
// Channel used to send events to the polling thread for client side execution/notification

private BlockingQueue<BackgroundEvent> queue;

abstract public class BackgroundEvent {
   private final BackgroundEventType eventType;
}

enum ResponseEventTypeBackgroundEventType {
   ERROR,
   REVOKE_PARTITIONS,
   ASSIGN_PARTITIONS,
FETCH_RESPONSE, }

...

  1. If subscribing to nothing, trigger unsubscribe()
  2. clear the fetcher buffer
  3. subscribes 
  4. send metadata update

Unsubscribe

  1. Send a leave group event
  2. unsubscribe from the topics

Major Changes

Consumer Poll Changes

...