Skip to content

Commit 85dabb9

Browse files
committed
add: node kafka producer & consumer init
1 parent 9894f2e commit 85dabb9

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ These are the microservices and server side developments with Nestjs and Nodejs
4040
| nestjs PM2 | [Source](./standalone-apis/nest-pm2) | Nodejs Worker Threads & PM2 |
4141
| nestjs kafka sample | [Source](./standalone-apis/nest-kafka-sample) | Nestjs Kakfa sample |
4242
| nestjs kafka microservices sample | [Source](./standalone-apis/nest-kafka-microservices) | Nestjs Kakfa Microservices |
43+
| node kafka producer & consumer | [Source](./standalone-apis/node-kafka-producer-consumer/) | Nodejs kafka producer consumer |
4344

4445
## Tips & Tricks
4546

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Nodejs Kafka Producer & Consumer
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: "3"
2+
services:
3+
zookeeper:
4+
image: 'bitnami/zookeeper:latest'
5+
ports:
6+
- '2181:2181'
7+
environment:
8+
- ALLOW_ANONYMOUS_LOGIN=yes
9+
kafka:
10+
image: 'bitnami/kafka:latest'
11+
container_name: 'kafka'
12+
ports:
13+
- '9092:9092'
14+
environment:
15+
- KAFKA_BROKER_ID=1
16+
- KAFKA_LISTENERS=PLAINTEXT://:9092
17+
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092
18+
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
19+
- ALLOW_PLAINTEXT_LISTENER=yes
20+
depends_on:
21+
- zookeeper

0 commit comments

Comments
 (0)