Skip to content

Commit

Permalink
test: disable kafka
Browse files Browse the repository at this point in the history
  • Loading branch information
jcy0308 committed Aug 29, 2024
1 parent 67f5726 commit d3ab769
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/kafka/kafka.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ export class KafkaService implements OnModuleInit, OnModuleDestroy {
private readonly puppeteerService: PuppeteerService,
private readonly minioService: MinioService,
) {
this.kafka = new Kafka({
clientId: `${process.env.CONSUMER_GROUP}+${process.pid}`,
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: 'scram-sha-256',
username: process.env.SASL_USER,
password: process.env.SASL_PASSWORD,
},
});
// this.kafka = new Kafka({
// clientId: `${process.env.CONSUMER_GROUP}+${process.pid}`,
// 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: 'scram-sha-256',
// username: process.env.SASL_USER,
// password: process.env.SASL_PASSWORD,
// },
// });

this.consumer = this.kafka.consumer({
groupId: process.env.CONSUMER_GROUP,
});
// this.consumer = this.kafka.consumer({
// groupId: process.env.CONSUMER_GROUP,
// });
}

async onModuleInit() {
Expand Down

0 comments on commit d3ab769

Please sign in to comment.