1

How can i create kafka consumer with different consumer group ids in one nestjs applicion?

Below code works but in one NestJs application i can use only one group-id but I need two consumer with different group-id

const app = await NestFactory.createMicroservice<MicroserviceOptions>(AppModule, {
    transport: Transport.KAFKA,
    options: {
      client: {
        clientId: 'clientId',
        brokers: ['localhost:9092'],
      },
      consumer: {
        groupId: 'groupId',
      },
    },
  });

0 Answers0