0
0
Kafkadevops~30 mins

Kafka Manager/UI tools - Mini Project: Build & Apply

Choose your learning style9 modes available
Basic Kafka Manager Setup and Topic Listing
📖 Scenario: You are working as a Kafka administrator. You want to manage Kafka topics easily using a Kafka Manager tool. This project will guide you through setting up a simple Kafka Manager configuration and listing topics using a command-line interface.
🎯 Goal: Build a simple Kafka Manager setup script that connects to a Kafka cluster and lists all available topics.
📋 What You'll Learn
Create a configuration dictionary with Kafka cluster details
Add a variable for the Kafka Manager URL
Write a function to simulate fetching topics from the Kafka cluster
Print the list of topics retrieved from the Kafka Manager
💡 Why This Matters
🌍 Real World
Kafka Managers and UI tools help administrators easily monitor and manage Kafka clusters and topics without using complex commands.
💼 Career
Understanding how to configure and interact with Kafka Manager tools is useful for roles like Kafka administrator, DevOps engineer, and backend developer.
Progress0 / 4 steps
1
Create Kafka cluster configuration
Create a dictionary called kafka_cluster with these exact entries: 'name': 'TestCluster', 'zookeeper': 'localhost:2181', and 'kafka_broker': 'localhost:9092'.
Kafka
Need a hint?

Use curly braces to create a dictionary and include the exact keys and values as shown.

2
Add Kafka Manager URL configuration
Create a variable called kafka_manager_url and set it to the string 'http://localhost:9000'.
Kafka
Need a hint?

Assign the URL string exactly as shown to the variable kafka_manager_url.

3
Write function to fetch topics
Define a function called get_topics that takes no parameters and returns the list ['topic1', 'topic2', 'topic3'].
Kafka
Need a hint?

Define a function with no inputs that returns the exact list of topics.

4
Print the list of topics
Call the function get_topics() and print the result using print().
Kafka
Need a hint?

Use print() to show the list returned by get_topics().