Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Failed to collate messages by topic, partition due to: Failed to fetch topic metadata for topic: #16

Open
ziboumima opened this issue Feb 5, 2016 · 0 comments

Comments

@ziboumima
Copy link

Hi, first thanks for the work to bring a way to test kafka easily
I'm using this package but I failed to make the simple test

package com.the_ica.cli
import info.batey.kafka.unit.{ KafkaUnit, KafkaUnitRule }
import kafka.producer.KeyedMessage


object KafkaTest {
  def main(args: Array[String]): Unit = {
    val kafkaUnitServer = new KafkaUnit(2181, 9092)
    val testTopic = "topic"
    kafkaUnitServer.startup()
    kafkaUnitServer.createTopic(testTopic)
    val keyedMessage = new KeyedMessage(testTopic, "key", "value")
    kafkaUnitServer.sendMessages(keyedMessage)
    val results = kafkaUnitServer.readMessages(testTopic, 1)
    println(results)
  }
}

The full error is

Created topic "topic".
ERROR - k.p.a.DefaultEventHandler - Failed to collate messages by topic, partition due to: Failed to fetch topic metadata for topic: topic
ERROR - k.n.Processor - Closing socket for /127.0.0.1 because of error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant