Skip to content

Instantly share code, notes, and snippets.



Created Jun 23, 2013
What would you like to do?
producer example
val topic = "urls"
val props = new Properties()
props.put("broker.list", "0:localhost:9092")
props.put("serializer.class", "kafka.serializer.StringEncoder")
val config = new ProducerConfig(props)
val producer = new Producer[String, String](config)
val data = new ProducerData[String, String](topic, href)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment