I looked at the following documentation: https://github.com/akka/reactive-kafka and I saw the following code snippet:
implicit val actorSystem = ActorSystem("ReactiveKafka")
implicit val materializer = ActorMaterializer()
val kafka = new ReactiveKafka()
val publisher: Publisher[StringConsumerRecord] = kafka.consume(ConsumerProperties(
bootstrapServers = "localhost:9092",
topic = "lowercaseStrings",
groupId = "groupName",
valueDeserializer = new StringDeserializer()
))
I understand that 'publisher' is supposed to write messages to Kafka. However, Consumer in Kafka means exactly the opposite, meaning consumer reads messages from Kafka. If so, how does it make sense that 'publisher' is related to kafka.consume(ConsumerProperties...) ?