Skip to content

Commit

Permalink
feat: kafka sasl 설정 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
jcy0308 committed Aug 29, 2024
1 parent 352950f commit 080fbd9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/kafka/kafka.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ export class KafkaService implements OnModuleInit, OnModuleDestroy {
this.kafka = new Kafka({
clientId: `${process.env.CONSUMER_GROUP}+${process.pid}`,
brokers: [process.env.KAFKA_CLIENT_BOOTSTRAP_SERVER],
sasl: {
// mechanism: `process.env.SASL_MECHANISM`,
mechanism: 'scram-sha-256',
username: process.env.SASL_USER,
password: process.env.SASL_PASSWORD,
},
});
}

Expand Down

0 comments on commit 080fbd9

Please sign in to comment.