消费者 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)
网友评论