mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
fix(microservices): when postfixId is an empty string on kafka
This commit is contained in:
@@ -62,7 +62,7 @@ export class ClientKafka extends ClientProxy {
|
||||
const consumerOptions =
|
||||
this.getOptionsProp(this.options, 'consumer') || ({} as ConsumerConfig);
|
||||
const postfixId =
|
||||
this.getOptionsProp(this.options, 'postfixId') || '-client';
|
||||
this.getOptionsProp(this.options, 'postfixId') ?? '-client';
|
||||
this.producerOnlyMode =
|
||||
this.getOptionsProp(this.options, 'producerOnlyMode') || false;
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ export class ServerKafka extends Server implements CustomTransportStrategy {
|
||||
const consumerOptions =
|
||||
this.getOptionsProp(this.options, 'consumer') || ({} as ConsumerConfig);
|
||||
const postfixId =
|
||||
this.getOptionsProp(this.options, 'postfixId') || '-server';
|
||||
this.getOptionsProp(this.options, 'postfixId') ?? '-server';
|
||||
|
||||
this.brokers = clientOptions.brokers || [KAFKA_DEFAULT_BROKER];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user