I'm trying to produce messages in NestJS with kafka, but it seems the default of the ClientsModule
is to start consuming a topic and I see no way in the docs to disable that.
Created a client using:
return ClientProxyFactory.create({
transport: Transport.KAFKA,
options: kafkaOptions,
});
On start I'm getting the following log from kafka:
"message":"Consumer has joined the group"
even though I didn't configure or request it.
Is there a way to disable the consumer connection?
To start the nestjs kafka without consuming you need to pass the producerOnlyMode
option as true