Pinned Loading
-
-
kafka-producer-python.py
kafka-producer-python.py 1from kafka import KafkaProducer
2import json, time, os
34f = open('./data.json')
5documents = json.load(f)
-
-
kafka-consumer-python.py
kafka-consumer-python.py 1from kafka import KafkaConsumer
23consumer = KafkaConsumer('message', bootstrap_servers=[os.getenv("HOST_KAFKA")], auto_offset_reset='latest', enable_auto_commit=True)
4for msg in consumer:
5data = msg.value.decode('utf-8')
-
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.