lan

Experiment 2: Core Messaging Pipeline

Topic Creation · Console Producer · Console Consumer

arrow_back Back to Experiments
Distributed Streaming

Producer → Topic → Consumer

With the broker running, create a Topic and wire up a Producer on Machine 2 and a Consumer on Machine 3 to see real-time message flow.

flag Aim

Design a distributed pipeline: Machine 1 (Broker), Machine 2 (Producer), Machine 3 (Consumer). Understand how advertised.listeners and firewall rules affect cross-machine connectivity.

route Theory: The Data Pipeline

Kafka decouples applications. Producers append records to the end of a Topic, and Consumers read those records sequentially from an offset. They operate completely independently of one another.

upload Producer
arrow_right_alt
Topic (Queue)
0
1
2
arrow_right_alt
download Consumer
Messages flow left to right asynchronously

checklist Mission Milestones

0 / 4 Done
radio_button_unchecked 1. Start Broker
radio_button_unchecked 2. Create Topic
radio_button_unchecked 3. Launch Consumer
radio_button_unchecked 4. Send Messages

format_list_numbered Commands — Follow Order!

1

Start Broker (Terminal 1)

kafka-storage.bat random-uuid
kafka-storage.bat format -t <UUID> -c config\server.properties
kafka-server-start.bat config\server.properties

Or just click the green ⚡ Auto-Boot button.

2

Create Topic (Terminal 2)

kafka-topics.bat --create --topic fsd-topic --bootstrap-server 192.168.1.10:9092
3

Start Consumer (Terminal 3)

kafka-console-consumer.bat --topic fsd-topic --bootstrap-server 192.168.1.10:9092 --from-beginning
4

Start Producer & Send (Terminal 2)

kafka-console-producer.bat --topic fsd-topic --bootstrap-server 192.168.1.10:9092

Then type any message and press Enter!

lightbulb

Messages typed in Terminal 2 will appear instantly in Terminal 3 once the consumer is running!

Terminal 1 — Machine 1 Broker (192.168.1.10)
Offline
KRaft Broker — Ready to initialize.
C:\kafka4.3.1>
Terminal 2 — Producer (192.168.1.20)
Producer
Remote Kafka Producer Node on LAN.
Ready to create topics and publish events.
C:\kafka4.3.1>
Terminal 3 — Consumer (192.168.1.30)
Consumer
Remote Kafka Consumer Node on LAN.
Ready to subscribe to topic event feeds.
C:\kafka4.3.1>