Giter VIP home page Giter VIP logo

kafka-docker-sample's Introduction

kafka-docker-sample

What's inside

Sample docker compose app, consists of 4 services:

  • zookeeper: centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services
  • kafka (broker): distributed event streaming platform
  • consumer: python script that connects to the broker and consumes queue
  • producer: python script that connects to the broker and produces a series of messages

get the project

Clone it

git clone [email protected]:quanturtle/kafka-docker-sample.git

Run it

docker compose up --build

zookeper starts

zookeeper  | ===> User
zookeeper  | uid=1000(appuser) gid=1000(appuser) groups=1000(appuser)
zookeeper  | ===> Configuring ...

kafka broker starts

broker     | ===> User
broker     | uid=0(root) gid=0(root) groups=0(root)
broker     | ===> Configuring ...

consumer and producer start

producer   | Giving Kafka a bit of time to start up…
consumer   | Giving Kafka a bit of time to start up…

after consumer is ready, producer should send 5 messages

producer   | a, test_topic, 0
producer   | b, test_topic, 0
producer   | c, test_topic, 0
producer   | d, test_topic, 0
producer   | e, test_topic, 0
producer exited with code 0

that should be received by consumer

consumer   | Message received: "a" from topic test_topic
consumer   |
consumer   | Message received: "b" from topic test_topic
consumer   |
consumer   | Message received: "c" from topic test_topic
consumer   |
consumer   | Message received: "d" from topic test_topic
consumer   |
consumer   | Message received: "e" from topic test_topic
consumer   |
consumer exited with code 0

kafka-docker-sample's People

Watchers

Alvaro Machuca Recalde avatar

kafka-docker-sample's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.