From the course: Apache Kafka Essential Training: Getting Started

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Creating topics with partitions

Creating topics with partitions

- [Instructor] Having looked into how partitions help Kafka scale, let's now create a topic with partitions. The commands for this chapter are available in the file: chapter-4-commands.txt under the Resources directory in the Java project. In order to create multiple partitions, we simply need to specify the number of partitions needed in the partitions parameter. In this case, we are creating a topic called kafka.learning.orders with a partition count of three. Let's execute this command in the Kafka container. To recollect, you would need to use the Docker exec command to log into the shell and navigate to the bin directory as shown in the previous chapters. The topic has been successfully created now. Let's explore this topic with the describe command. The describe command also takes in the topic name to only show details for a specific topic. The output now shows one line for each partition in the topic. There is a…

Contents