Skip to content

Instantly share code, notes, and snippets.

@emmettbutler
Created January 20, 2016 17:49
Show Gist options
  • Save emmettbutler/b987cabecff7daaa954b to your computer and use it in GitHub Desktop.
Save emmettbutler/b987cabecff7daaa954b to your computer and use it in GitHub Desktop.
client = KafkaClient(hosts="mycoolkafkahost:9092")
topic = client.topics["mycooltopic"]
consumer = topic.get_simple_consumer()
while True:
zmq_message = get_from_zmq(block=False)
kafka_message = consumer.consume(block=False)
do_something_with_messages((zmq_message, kafka_message))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment