From 077ffadc09c8510cff680b6e342f53b56c2f4573 Mon Sep 17 00:00:00 2001 From: chanyeong Date: Fri, 30 Aug 2024 01:19:36 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20broker=20=EC=A0=84=EB=B6=80=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/kafka/kafka.service.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/kafka/kafka.service.ts b/src/kafka/kafka.service.ts index 1e522db..fe1d17c 100644 --- a/src/kafka/kafka.service.ts +++ b/src/kafka/kafka.service.ts @@ -21,7 +21,11 @@ export class KafkaService implements OnApplicationBootstrap, OnModuleDestroy { ) { this.kafka = new Kafka({ clientId: `${process.env.CONSUMER_GROUP}+${process.pid}`, - brokers: [process.env.KAFKA_CLIENT_BOOTSTRAP_SERVER], + brokers: [ + 'kafka-controller-0.kafka-controller-headless.kafka.svc.cluster.local:9092', + 'kafka-controller-1.kafka-controller-headless.kafka.svc.cluster.local:9092', + 'kafka-controller-2.kafka-controller-headless.kafka.svc.cluster.local:9092', + ], sasl: { // mechanism: `process.env.SASL_MECHANISM`, mechanism: 'scram-sha-256', @@ -70,6 +74,7 @@ export class KafkaService implements OnApplicationBootstrap, OnModuleDestroy { }, }) .catch((e) => console.error(`[example/consumer] ${e.message}`, e)); + console.log('consumer has started'); } async onModuleDestroy() {