Skip to content

riparrag/learn-kstream-73

Repository files navigation

Master Kafka Streams course - Sprinboot app Greetings Topology

see Branches for each lesson/section

Set up Kafka Environment using Docker from docker-compose.yml

Place in in same root dir having docker-compose.yml

  • This should set up the Zookeeper and Kafka Broker in your local environment
docker-compose up

Verify the Local Kafka Environment

  • Run this below command
docker ps
  • You should be below containers up and running in local
CONTAINER ID   IMAGE                                   COMMAND                  CREATED          STATUS          PORTS                                            NAMES
fb28f7f91b0e   confluentinc/cp-server:7.1.0            "/etc/confluent/dock…"   50 seconds ago   Up 49 seconds   0.0.0.0:9092->9092/tcp, 0.0.0.0:9101->9101/tcp   broker
d00a0f845a45   confluentinc/cp-zookeeper:7.1.0         "/etc/confluent/dock…"   50 seconds ago   Up 49 seconds   2888/tcp, 0.0.0.0:2181->2181/tcp, 3888/tcp       zookeeper

Interacting with Kafka

Produce Messages

  • This command should take care of logging in to the Kafka container.
docker exec -it broker bash
  • Command to produce messages in to the Kafka topic.
kafka-console-producer --broker-list localhost:9092 --topic greetings

Consume Messages

  • This command should take care of logging in to the Kafka container.
docker exec -it broker bash
  • Command to consume messages from the Kafka topic.
kafka-console-consumer --bootstrap-server localhost:9092 --topic greetings-output

About

Master kafka Streams Course - Section 73

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages