![]() |
Apache Kafka is an open-source event streaming platform that is used to build real-time data pipelines and also to build streaming applications. Kafka is specially designed to handle a large amount of data in a scalable way. In this article, we will learn how to get all topics in Apache Kafka. Steps to get the list of all topics in Apache KafkaBelow are the steps and commands to get the list of all topics in Apache Kafka. Step 1: Start the Zookeeper ServerTo list all the topics in Kafka, first, we need to start the zookeeper server in the Apache Kafka folder location. Here is the command to start the zookeeper server. .\bin\windows\zookeeper-server-start.bat config\zookeeper.properties Run the above command in the command prompt so that we can start the zookeeper as shown below: Step 2: Start the Kafka ServerTo start the Kafka Server, here is the command: .\bin\windows\kafka-server-start.bat config\server.properties The above command is used to start the Kafka server and here is the attachment of after starting the Kafka Server: Step 3: Get the Topics in ApacheKafkaTo get all the topics in Apache Kafka, we need to use the below command: .\bin\windows\kafka-topics.bat --list --bootstrap-server localhost:9092 Here is the attachment to see the list of topics in Apache Kafka: The above command is used to get all the topics available in Apacke Kafka. |
Reffered: https://www.geeksforgeeks.org
Advance Java |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 13 |