THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
// 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,
}
...
- If subscribing to nothing, trigger unsubscribe()
- clear the fetcher buffer
- subscribes
- send metadata update
Unsubscribe
- Send a leave group event
- unsubscribe from the topics
Major Changes
Consumer Poll Changes
...