blob: bd49c09ac6e761ccd5469ac3b9d7f7f0ed1b4b88 [file] [log] [blame]
#!/usr/bin/env python
import threading, logging, time
from kafka import KafkaConsumer
class Consumer(threading.Thread):
daemon = True
def run(self):
consumer = KafkaConsumer(bootstrap_servers='10.100.198.220:9092',
auto_offset_reset='earliest')
consumer.subscribe(['voltha-heartbeat'])
for message in consumer:
print (message)
def main():
threads = [
Consumer()
]
for t in threads:
t.start()
time.sleep(3000)
if __name__ == "__main__":
main()