5

Is this any bug with the Apache Kafka 0.9.0.0? I'm using the following command to list the topics and I get nothing even though the server was started with a topic being created!

Joes-MacBook-Pro:kafka_2.11-0.9.0.0 joe$ bin/kafka-topics.sh --list --zookeeper localhost:2181
Joes-MacBook-Pro:kafka_2.11-0.9.0.0 joe$ 

Here is the command that I used to start Apache Kafka:

bin/kafka-server-start.sh config/server.properties & bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test_topic

It is getting harsh for me to just try out the basic stuff around the much hyped Apache Kafka. Here is one another example where I'm pretty much stuck!

Apache Kafka 0.9.0.0 Show all Topics with Partitions

1
  • Kafka 0.9 was recently released and may contain bugs. We are successfully running 0.8.2 in production. Is that an option you can consider?
    – Rahul
    Commented Jan 19, 2016 at 17:18

2 Answers 2

12

I don't see the zookeeper started in your code. Please start zookeeper and then kafka in the same order.

bin/zookeeper-server-start.sh config/zookeeper.properties &
bin/kafka-server-start.sh config/server.properties &

Try to list the topics with the below command.

bin/kafka-topics.sh --list --zookeeper localhost:2181

You can create the topic with the below command

bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic test --partitions 1 --replication-factor 1

Once the topic is created, you get a message saying "test" created. Now you can try list command to see your topic listed.

Note: The replication factor depends upon the number of brokers that you run on a single server.

3

For someone who comes looking for this in 2024, the useful option is below -

$ bin/kafka-topics.sh --list --bootstrap-server localhost:9092

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.