fix(microservices): when postfixId is an empty string on kafka

This commit is contained in:
Micael Levi (@micalevisk)
2022-05-27 23:35:08 -04:00
parent 2e3727b786
commit 0359fa4666
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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];