This repo has the infrastructure and code for creating a ssl secured kafka cluster.
-
Navigate to the secrets directory
-
Run the below command
$ cd secrets/
$ sh create-certs.sh
- Run the docker compose for a ssl secured kafka cluster
$ cd ..
$ docker-compose up
- Produce Messages to the topic.
$ docker exec -it kafka1 bash
$ kafka-console-producer --bootstrap-server localhost:9092 \
--topic test-topic \
--producer.config /etc/kafka/properties/producer.properties
- Consume Messages from the topic.
$ docker exec -it kafka1 bash
$ kafka-console-consumer --bootstrap-server localhost:9092 \
--topic test-topic \
--from-beginning \
--consumer.config /etc/kafka/properties/consumer.properties
$ docker exec -it kafka1 bash
$ kafka-console-consumer --bootstrap-server localhost:9092 \
--topic library-events \
--from-beginning \
--consumer.config /etc/kafka/properties/consumer.properties