From the course: Apache Kafka Essential Training: Getting Started (2021)
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Creating a topic
From the course: Apache Kafka Essential Training: Getting Started (2021)
Creating a topic
- [Instructor] In this video, we will create two topics in Kafka. I will first explore the topic creation command first. It's available in the chapter-3-commands.txt file inside the Kafka getting started project. The script to use for creating topics, is the Kafkatopics.sh file. What are the parameters for the script? First, we need to provide the link to Zookeeper. Topics are stored and managed in Zookeeper, so the creation command needs that information. Then comes the action, which in this case is create. We need to provide the name of the topic, with the topic parameter. While the name can be any string, it's recommended to use a pattern of qualified names for better management. In this case it's a tweets topic called Kafka.learning.tweets. We then specify two mandatory parameters. The number of partitions and the replication factor. We keep a partition size of one. We will discuss partitions later in the course.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.