Skip to content

Commit

Permalink
fix: onApplicationBootStrap
Browse files Browse the repository at this point in the history
  • Loading branch information
jcy0308 committed Aug 29, 2024
1 parent af03ca0 commit 44fbadf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kafka/kafka.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ export class KafkaService implements OnApplicationBootstrap, OnModuleDestroy {
this.consumer = this.kafka.consumer({
groupId: process.env.CONSUMER_GROUP,
});
this.consumer.connect();
}

async onApplicationBootstrap() {
await this.consumer.connect();
await this.consumer.subscribe({ topic: this.topic, fromBeginning: false });
await this.consumer
.run({
Expand Down

0 comments on commit 44fbadf

Please sign in to comment.