Skip to content

Instantly share code, notes, and snippets.

@astronomy88
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astronomy88/b88457bd4ea035545ce3 to your computer and use it in GitHub Desktop.
Save astronomy88/b88457bd4ea035545ce3 to your computer and use it in GitHub Desktop.
from kafka import *
mykafka = KafkaClient("localhost:9092")
producer = SimpleProducer(mykafka)
producer.send_messages("test", "mymessage")
producer.send_messages("test", "mymessage 2")
producer.send_messages("test", "mymessage 3")
producer.send_messages("test", "mymessage 4")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment