Skip to content

taion809/kafka-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

kafka-cli

Docker Pulls Docker Stars

Usage example:

version: '3'
services:
    zookeeper:
        image: wurstmeister/zookeeper
        ports:
            - "2181:2181"
    kafka:
        image: wurstmeister/kafka 
        ports:
            - "9092:9092"
        environment:
            KAFKA_CREATE_TOPICS: "test:1:1"
            KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
        volumes:
            - /var/run/docker.sock:/var/run/docker.sock
    producer:
        image: taion809/kafka-cli:2.2.0
        command: kafka-console-producer.sh --broker-list kafka:9092 --topic test
        links:
            - kafka
    consumer:
        image: taion809/kafka-cli:2.2.0
        command: kafka-console-consumer.sh --bootstrap-server kafka:9092 --topic test --from-beginning
        links:
            - kafka