Public | Automated Build

Last pushed: a year ago
Short Description
apache kafka
Full Description

with prepared zookeeper(s)

$ docker-compose up -d
$ docker-compose scale zks=2
$ docker-compose -f docker-compose-kafka.yml up -d
$ docker-compose -f docker-compose-kafka.yml scale kafs=2

standalone

$ docker-commpose -f docker-compose-standalone up -d

test

# enter kafka container
$ docker exec -it ubuntukafka_kfkm_1 /bin/bash

# create topic
(root@xxxx):/# /opt/kafka-xxxx/bin/kafka-topics.sh --create --topic test --zookeeper zk1:2181 --partitions 1 --replication-factor 1

# consume from the topic using the console producer
(root@xxxx):/# /opt/kafka-xxxx/bin/kafka-console-consumer.sh --topic test --zookeeper zk1:2181

# using another console to create producer
(root@xxxx):/# /opt/kafka-xxxx/bin/kafka-console-producer.sh --topic test --broker-list localhost:9092
Docker Pull Command
Owner
samuelololol
Source Repository

Comments (0)