You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, thanks for developing such a nice tool very useful for Kafka development.
I'm using the withRunningKafka method to test publishing to an embedded Kafka instance using ReactiveKafka.
"KafkaEvnetSink" should {
"streams event to kafka" in withRunningKafka {
valkafkaConfig=EmbeddedKafkaConfig()
valbrokerList=s"localhost:${kafkaConfig.kafkaPort}"valtopic="abc"valsink=Sink.fromSubscriber(newReactiveKafka().publish(ProducerProperties(brokerList, topic, newStringEncoder())))
Source(1 to 10).map(_.toString).to(sink).run()
consumeFirstStringMessageFrom(topic) shouldBe "1"
}
The above test throws this error: 15:08:12.857 ERROR k.producer.async.DefaultEventHandler - Failed to collate messages by topic, partition due to: Failed to fetch topic metadata for topic: abc
It seems that this is an issue of port and host according this SO post.
Is this a bug or am I using it wrong?
The text was updated successfully, but these errors were encountered:
If you look at the post, the OP managed to fix it by adding the advertised.port property. You can add custom properties to brokers/producers/consumers by using the EmbeddedKafkaConfig class. Give it a go.
Firstly, thanks for developing such a nice tool very useful for Kafka development.
I'm using the
withRunningKafka
method to test publishing to an embedded Kafka instance usingReactiveKafka
.The above test throws this error:
15:08:12.857 ERROR k.producer.async.DefaultEventHandler - Failed to collate messages by topic, partition due to: Failed to fetch topic metadata for topic: abc
It seems that this is an issue of port and host according this SO post.
Is this a bug or am I using it wrong?
The text was updated successfully, but these errors were encountered: