Kafka python
2018-12-06 本文已影响0人
yepeng05
消费者 kafka_consumer.py
from kafka import KafkaConsumer
if __name__ == "__main__":
consumer = KafkaConsumer("kafkatest", bootstrap_servers='bigdata-pro05.canc.com:9092', auto_offset_reset="earliest")
for message in consumer:
print(message)