Skip to content

Commit

Permalink
switched to localhost ip in kafka container
Browse files Browse the repository at this point in the history
  • Loading branch information
amir-awad committed Jan 18, 2024
1 parent 44b5500 commit 38ac502
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
environment:
- KAFKA_BROKER_ID=1
- KAFKA_LISTENERS=PLAINTEXT://:${KAFKA_PORT}
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:${KAFKA_PORT}
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:${KAFKA_PORT}
- KAFKA_ZOOKEEPER_CONNECT=${ZOOKEEPER_HOST_NAME}:${ZOOKEEPER_PORT}
- KAFKA_CREATE_TOPICS=notifications:1:1,out_of_stock:1:1
- ALLOW_PLAINTEXT_LISTENER=yes
Expand Down
2 changes: 1 addition & 1 deletion pharmacy/src/producers/MedicineProducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from '../utils/Constants.js';

export const medicineProducer = (app) => {
const client = new KafkaNode.KafkaClient({ kafkaHost: 'localhost:9092' });
const client = new KafkaNode.KafkaClient({ kafkaHost: '127.0.0.1:9092' });
const producer = new KafkaNode.Producer(client);
const kafka_topic = 'out_of_stock';

Expand Down

0 comments on commit 38ac502

Please sign in to comment.