def _respond_async(self, is_ack, delivery_token, callback):
if delivery_token is None or callback is None:
return
try:
self.ack_queue.put((is_ack, delivery_token, callback),
block=True,
timeout=self.timeout_seconds)
hostport = util.get_hostport_from_delivery_token(delivery_token)
util.stats_count(self.tchannel.name, 'consumer_ack_queue.enqueue', hostport, 1)
except queue.Full:
callback(AckMessageResult(call_success=False,
is_ack=True,
delivery_token=delivery_token,
error_msg='ack message buffer is full'))
评论列表
文章目录