Created
July 6, 2015 16:30
-
-
Save maiha/0dfd5e4fccaa5f563a3d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import seven.kafka.consumer._ | |
val options = KafkaBasicConsumer.defaultOptions ++ Map("auto.commit.enable" -> "true") | |
def consume(t: String, g: String): Unit = { | |
val consumer = new KafkaBasicConsumer("localhost:2181", g, options) | |
consumer.basicConsume(t, DefaultCallback) | |
Thread.sleep(1000) | |
consumer.shutdown() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment