feat(microservices): Kafka controller await client consumers connect

This commit is contained in:
Michael Kaufman
2020-10-31 17:39:00 -04:00
parent da13cca8cd
commit a85cb0fe4b
4 changed files with 140 additions and 33382 deletions

View File

@@ -71,9 +71,9 @@ export class ServerKafka extends Server implements CustomTransportStrategy {
await this.start(callback);
}
public close(): void {
this.consumer && this.consumer.disconnect();
this.producer && this.producer.disconnect();
public async close(): Promise<void> {
this.consumer && (await this.consumer.disconnect());
this.producer && (await this.producer.disconnect());
this.consumer = null;
this.producer = null;
this.client = null;