def __init__(self, topics, config, consumer_factory):
self.config = config
self.termination_flag = None
self.partitioner = Partitioner(
config,
topics,
self.acquire,
self.release,
)
self.consumers = None
self.consumers_lock = Lock()
self.consumer_procs = {}
self.consumer_factory = consumer_factory
self.log = logging.getLogger(self.__class__.__name__)
self.pre_rebalance_callback = config.pre_rebalance_callback
self.post_rebalance_callback = config.post_rebalance_callback
评论列表
文章目录