Skip to content

gitorko/project80

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project 80

Spring Boot & Kafka

https://gitorko.github.io/spring-apache-kafka/

Version

Check version

$java --version
openjdk 17.0.3 2022-04-19 LTS

Kafka

To run kafka we need zookeeper, use the docker compose command to run kafka as a container

For windows ensure the C:\Windows\System32\drivers\etc\hosts file has these 2 entries. For link ensure /etc/hosts has these 2 entries.

127.0.0.1 zookeeper
127.0.0.1 kafkaserver
docker-compose -f docker/docker-compose.yml up

To create topic

docker exec -it kafkaserver /bin/bash
$ /opt/bitnami/kafka/bin/kafka-topics.sh --create --replication-factor 1 --partitions 1 --topic mytopic.000 --bootstrap-server localhost:9092

To delete topic

docker exec -it kafkaserver /bin/bash
$ /opt/bitnami/kafka/bin/kafka-topics.sh --delete --topic mytopic.000 --bootstrap-server localhost:9092

Clean up

docker-compose -f docker/docker-compose.yml stop
docker rm kafka-ui kafkaserver zookeeper

Restart

docker-compose -f docker/docker-compose.yml start

Dashboard for kafka, wait for a few seconds as it takes time to come up.

Open http://localhost:9090/

About

Kafka Producer Consumer & Kafka Streams

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages