recieve_message.py 332 B

1234567891011121314151617
  1. #!/usr/bin/env python3
  2. from MessageCorps.broker import kafka_consumer
  3. import logging
  4. logging.basicConfig(level=logging.DEBUG)
  5. def main():
  6. consumer = kafka_consumer(bootstrap_servers="localhost:9092", topic="VideoStream")
  7. for message in consumer.consume():
  8. print(message)
  9. if __name__ == '__main__':
  10. main()