Commit cb72b020 authored by 赵威's avatar 赵威

seek to end

parent 1700208b
......@@ -13,11 +13,12 @@ def consume_kafka(device_dict, diary_dict, tractate_dict, diary_predict_fn, trac
consumer = KafkaConsumer(bootstrap_servers="172.16.44.25:9092,172.16.44.31:9092,172.16.44.45:9092",
group_id="essm_online_prediction",
enable_auto_commit=True,
auto_offset_reset="earliest",
auto_offset_reset="latest",
auto_commit_interval_ms=1000)
consumer.subscribe(["gm-portrait-update-device"])
consumer.seek(0, 2)
consumer.poll()
consumer.seek_to_end()
try:
for msg in consumer:
......
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