0
0
Kafkadevops~15 mins

Topic creation in Kafka - Mini Project: Build & Apply

Choose your learning style9 modes available
Kafka Topic Creation
📖 Scenario: You are setting up a Kafka environment to handle messages for a small online store. You need to create a topic where order messages will be sent and received.
🎯 Goal: Create a Kafka topic named orders with 3 partitions and a replication factor of 1 using the Kafka command line tool.
📋 What You'll Learn
Create a topic named orders
Set the number of partitions to 3
Set the replication factor to 1
Use the Kafka kafka-topics.sh command line tool
💡 Why This Matters
🌍 Real World
Kafka topics organize messages by category, helping systems handle data streams efficiently.
💼 Career
Kafka topic creation is a fundamental skill for data engineers and backend developers working with real-time data pipelines.
Progress0 / 4 steps
1
Set up the Kafka topic creation command
Write the command to create a Kafka topic named orders using kafka-topics.sh with the --create option.
Kafka
Need a hint?

Use kafka-topics.sh --create --topic orders as the base command.

2
Add partitions configuration
Extend the command to set the number of partitions to 3 using the --partitions option.
Kafka
Need a hint?

Add --partitions 3 to specify the number of partitions.

3
Add replication factor configuration
Add the --replication-factor 1 option to the command to set the replication factor to 1.
Kafka
Need a hint?

Use --replication-factor 1 to set replication factor.

4
Display the created topic details
Write the command to describe the orders topic using kafka-topics.sh with the --describe option.
Kafka
Need a hint?

Use kafka-topics.sh --describe --topic orders to see topic details.