You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(Kafka): adding postfixId property in kafka client options
When I was getting some error logs trying connect to the kafka server, I saw that the library added a "-server" or "-client" suffix to the value of the clientId property.
Well, in the documentation there is a very generic "HINT" on how to change this...
"Kafka client and consumer naming conventions can be customized by extending ClientKafka and KafkaServer in your own custom provider and overriding the constructor."
But looking at node_modules i found a property called "posfixId" in the file responsible for initializing the connection to the kafka server, which appeared to be responsible for prefixing of clientId value, so I put this setting in my configuration object in main.ts with an empty value, like ''.
And it worked fine (the suffix was removed), so i think it would be nice to make it clear that this configuration exists, after all, some Kafka servers need a specific clientId where the value cannot be changed in any way.
You can see this property in https://github.com/nestjs/nest/blob/master/packages/microservices/server/server-kafka.ts line 60.
So, in conclusion, I'm proposing to put this as one more property in the "Options" object section.
0 commit comments