Commit 60d1bb37 authored by lixiaofang's avatar lixiaofang

新增类型

parent 11f9cc91
......@@ -25,7 +25,7 @@ from moment.views.process_time import judge_offset_partition_have_consum
def kafka_consum(topic_name=None):
topic_name = settings.KAFKA_TOPIC_NAME if not topic_name else topic_name
consumser_obj = KafkaConsumer(topic_name, bootstrap_servers=settings.KAFKA_BROKER_LIST, enable_auto_commit=True,
auto_commit_interval_ms=1, group_id="vest")
auto_commit_interval_ms=1, group_id="vest", auto_offset_reset='earliest')
consumser_obj.subscribe([topic_name, ])
try:
redis_topic_partition_name = "vest:topic_name:" + str(topic_name)
......
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