Git Product home page Git Product logo

alpine-kafka's Introduction

kafka-logo

docker-kafka-alpine

Publish Docker Image License Docker Stars Docker Pulls Docker Image

Alpine Linux based Kafka Docker Image

Dependencies

Image Tags

REPOSITORY          TAG                 SIZE
blacktop/kafka      latest              461MB
blacktop/kafka      3.0                 461MB
blacktop/kafka      2.8                 473MB
blacktop/kafka      2.7                 473MB
blacktop/kafka      2.6                 473MB
blacktop/kafka      2.5                 438MB
blacktop/kafka      2.4                 441MB
blacktop/kafka      2.3                 437MB
blacktop/kafka      2.2                 411MB
blacktop/kafka      2.1                 461MB
blacktop/kafka      2.0                 461MB
blacktop/kafka      1.1                 332MB
blacktop/kafka      1.0                 441MB
blacktop/kafka      0.11                226MB
blacktop/kafka      0.10                437MB
blacktop/kafka      0.9                 238.6MB
blacktop/kafka      0.8                 227.5MB

Getting Started

NOTE: I am assuming use of Docker for Mac with these examples.( KAFKA_ADVERTISED_HOST_NAME=localhost )

docker run -d \
           --name kafka \
           -p 9092:9092 \
           -e KAFKA_ADVERTISED_HOST_NAME=localhost \
           -e KAFKA_CREATE_TOPICS="test-topic:1:1" \
           blacktop/kafka

This will create a single-node kafka broker (listening on localhost:9092), a local zookeeper instance and create the topic test-topic with 1 replication-factor and 1 partition .

You can now test your new single-node kafka broker using Shopify/sarama's kafka-console-producer and kafka-console-consumer

Required

$ go get github.com/Shopify/sarama/tools/kafka-console-consumer
$ go get github.com/Shopify/sarama/tools/kafka-console-producer

Now start a consumer in the background and then send some data to kafka via a producer

$ kafka-console-consumer --brokers=localhost:9092 --topic=test-topic &
$ echo "shrinky-dinks" | kafka-console-producer --brokers=localhost:9092 --topic=test-topic

Documentation

Issues

Find a bug? Want more features? Find something missing in the documentation? Let me know! Please don't hesitate to file an issue

Credits

Heavily (if not entirely) influenced by https://github.com/wurstmeister/kafka-docker

Todo

  • Add ability to run a single node kafka broker when you don't supply a zookeeper link.

License

MIT Copyright (c) 2016-2021 blacktop

alpine-kafka's People

Contributors

blacktop avatar diasjorge avatar saghir786 avatar timbotetsu avatar

Watchers

 avatar  avatar

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.