Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zeroc0d3/learn-kafka-golang
Learning Kafka with Golang
https://github.com/zeroc0d3/learn-kafka-golang
docker golang kafka kafka-consumer kafka-publisher zeroc0d3 zeroc0d3lab
Last synced: 2 months ago
JSON representation
Learning Kafka with Golang
- Host: GitHub
- URL: https://github.com/zeroc0d3/learn-kafka-golang
- Owner: zeroc0d3
- License: apache-2.0
- Created: 2019-11-19T06:24:26.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-13T03:47:21.000Z (almost 4 years ago)
- Last Synced: 2024-10-04T13:28:31.653Z (3 months ago)
- Topics: docker, golang, kafka, kafka-consumer, kafka-publisher, zeroc0d3, zeroc0d3lab
- Language: Python
- Size: 56.6 MB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Learn Kafka
Learning kafka using Go and library shopify sarama### Running Snapshot
#### Kafka Publisher
![Kafka-Publisher](./snapshot/kafka-producers.png)#### Kafka Consumer
![Kafka-Consumer](./snapshot/kafka-consumer.png)### Publisher
* Using wordlist `word.txt` for dummy publish message### Running
* Setup docker container
```
bash run-docker.sh
```* Setup topic name
```
export KAFKA_TOPIC="kafka-topic"
```* Setup broker & zookeeper connection
```
export KAFKA_BROKER_URL="kafka:9092"
export ZOOKEEPER_URL="zookeeper:2081"
```* Setup hosts
```
vi /etc/hosts
----
127.0.0.1 zeroc0d3_kafka # container_name
```* Install Dependencies
```
make setup
```* Build Producer
```
make build-producer
```* Build Consumer
```
make build-consumer
```* Run Producer
```
make run-producer
```* Run Consumer
```
make run-consumer
```### Copyright
* Author : **Dwi Fahni Denni (@zeroc0d3)**
* License: **Apache ver-2**