Skip to content

Instantly share code, notes, and snippets.

@anmol2709
Last active Nov 12, 2018
Embed
What would you like to do?
val consumerSettings = ConsumerSettings(system, new ByteArrayDeserializer, new StringDeserializer)
.withBootstrapServers("localhost:9092")
.withGroupId("akka-stream-kafka-test")
.withProperty(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest")
val kafkaSource: Source[ConsumerRecord[Array[Byte], String], Consumer.Control] =
Consumer.plainSource(consumerSettings, Subscriptions.topics("kafkaTopic"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment