I have to work with a code from reactive-kafka module: https://github.com/akka/reactive-kafka/blob/master/README.md
My code starts with:
val kafka = new ReactiveKafka()
val kafkaIdpsMsgs: Publisher[StringKafkaMessage] = kafka.consume(
ConsumerProperties(
brokerList = kafkaHosts,
zooKeeperHost = zkHosts,
topic = "test",
groupId = "idps-translator",
decoder = new StringDecoder()
).readFromEndOfStream())
val kafkaSamples: Subscriber[String] = kafka.publish(ProducerProperties(
brokerList = kafkaHosts,
topic = "test",
encoder = new StringEncoder()
))
I want to produce a message (by the publisher). What is the code I have to write to make it happen?