THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
We use a blocking queue to send API events from the polling thread to the background thread.
...
ServerEventQueue
// Channel used to send events to the background thread
private BlockingQueue<ServerEvent> queue;
abstract public class ServerEvent {
private final ServerEventType eventType;
}
enum ServerEventType {
FETCH,
COMMIT,
METADATA_UPDATE,
CLOSE,
...
}
...
ConsumerEventQueue
// Channel used to send events to the polling thread for client side execution/notification
private BlockingQueue<ConsumerEvent> queue;
abstract public class ConsumerEvent {
private final ConsumerEventType eventType;
}
enum ConsumerEventType {
ERROR,
REVOKE_PARTITION,
...
}
...