Skip to content

Instantly share code, notes, and snippets.

@Verina-Armanyous
Created November 29, 2021 08:32
Show Gist options
  • Save Verina-Armanyous/c8b4eeef17b7fb3c77bd9a0cf2ae7054 to your computer and use it in GitHub Desktop.
Save Verina-Armanyous/c8b4eeef17b7fb3c77bd9a0cf2ae7054 to your computer and use it in GitHub Desktop.
from kafka import KafkaConsumer
consumer = KafkaConsumer(
'tutorial',bootstrap_servers=['localhost:9092'],
value_deserializer=lambda x: loads(x.decode('utf-8')))
for message in consumer:
print(message)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment