Class KafkaConsumerManager


  • public class KafkaConsumerManager
    extends Object
    Manages consumer instances by mapping instance IDs to consumer objects, processing read requests, and cleaning up when consumers disappear.

    For read and commitOffsets tasks, it uses a ThreadPoolExecutor which spins up threads for handling read tasks. Since read tasks do not complete on the first run but rather call the AK consumer's poll() method continuously, we re-schedule them via a DelayQueue. A KafkaConsumerManager.ReadTaskSchedulerThread runs in a separate thread and re-submits the tasks to the executor.