Commit 5aa7237f authored by lixiaofang's avatar lixiaofang

去掉多余的判断

parent 9b2e6460
...@@ -34,7 +34,7 @@ def kafka_consum(topic_name=None): ...@@ -34,7 +34,7 @@ def kafka_consum(topic_name=None):
# consumser_obj.seek(partition=TopicPartition(topic_name,int(partition_id.decode())),offset=int(topic_partition_info[partition_id])) # consumser_obj.seek(partition=TopicPartition(topic_name,int(partition_id.decode())),offset=int(topic_partition_info[partition_id]))
while True: while True:
begin = time.time() begin = time.time()
msg_dict = consumser_obj.poll(timeout_ms=100, max_records=30) msg_dict = consumser_obj.poll(timeout_ms=100, max_records=50)
for msg_key in msg_dict: for msg_key in msg_dict:
consume_msg = msg_dict[msg_key] consume_msg = msg_dict[msg_key]
for msg in consume_msg: for msg in consume_msg:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment