Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/srijanone/kubedrop-kafka-consumer
A Reactive Microservice to listen kafka events and does processing
https://github.com/srijanone/kubedrop-kafka-consumer
Last synced: 3 days ago
JSON representation
A Reactive Microservice to listen kafka events and does processing
- Host: GitHub
- URL: https://github.com/srijanone/kubedrop-kafka-consumer
- Owner: srijanone
- Created: 2020-09-02T12:11:06.000Z (about 4 years ago)
- Default Branch: develop
- Last Pushed: 2022-12-13T13:28:16.000Z (almost 2 years ago)
- Last Synced: 2024-03-26T15:17:00.242Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 275 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# KubeDrop Kafka Consumer
A Reactive Microservice to listen kafka events and does processing
---
### Pre-requisite
Create a file `.env` with appropriate ENV. VARIABLES Values. Application reads this value while bootstrapping. Use `.env.example` file for reference
```shell
# Application Config
NODE_ENV="development"# Kafka Related Config
KAFKA_CLIENT_ID="unique-client-id"
KAFKA_GROUP_ID="kafka-consumer"
KAFKA_BROKERS="localhost:9092"
KAFKA_USERNAME=""
KAFKA_PASSWORD=""
KAFKA_TOPIC="article.created"
```---
## Running
### Run without Docker
- `npm install` OR `yarn`
- `node src/app.js`### Run with Docker
- `docker build -t kafka-consumer .`
- `docker run -p 3009:3009 --env-file=".env" kafka-consumer`---
## Push image to registry
- `docker build -t kubedrop/kafka-consumer .`
- `docker login`
- `docker push kubedrop/kafka-consumer`