From the course: Apache Kafka Essential Training: Getting Started (2021)

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Creating topics with partitions

Creating topics with partitions

From the course: Apache Kafka Essential Training: Getting Started (2021)

Start my 1-month free trial

Creating topics with partitions

- [Lecturer] 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 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 us execute this command in the Kafka container. To recollect, we need to use the docker exec command to log into the shell 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 the topic name to show only details for this specific topic. The output now shows one lane for each partition in the topic. There is a partition ID shown which is numbered from zero to two. Each…

Contents