https://github.com/zizaco/kafka-poc
CLI program to play around with Apache Kafka
https://github.com/zizaco/kafka-poc
Last synced: 2 months ago
JSON representation
CLI program to play around with Apache Kafka
- Host: GitHub
- URL: https://github.com/zizaco/kafka-poc
- Owner: Zizaco
- Created: 2018-03-31T12:13:02.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-31T12:14:58.000Z (about 7 years ago)
- Last Synced: 2025-03-24T04:37:22.927Z (2 months ago)
- Language: JavaScript
- Size: 106 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kafka POC
**Why:** To play around with Kafka and quick test scenarios to find out the fit for specific projects.
**What:** The idea is to have a quick example to tweak settings and quickly test scenarios.
---------------------------------

## Concepts
Learn more about Kafka: [kafka.apache.org](https://kafka.apache.org/)
Comparison with RabbitMQ: [pivotal.io/rabbitmq/understanding-when-to-use-rabbitmq-or-apache-kafka](https://content.pivotal.io/rabbitmq/understanding-when-to-use-rabbitmq-or-apache-kafka)
## Getting started / Prerequisites / Dependencies
First of all, make sure that you have a Kafka listening on `localhost:9092`. The easier way to do that is throught docker:
```
# Run kafka locally
docker run -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=127.0.0.1 --env ADVERTISED_PORT=9092 spotify/kafka
```Use the `./index.js [topic]` as a entry point. Initialize multiple terminal instances in order to be able to see the message delivery.
```
# Run producer
./index producer kafkapoc.type.message# (In a second terminal) run the consumer program
./index consumer kafkapoc.type.message
```Fell free to run multiple consumers, stop, start services and play around with the code.