@xnestjs/kafka 1.6.2 → 1.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -115,14 +115,14 @@ let KafkaCoreModule = KafkaCoreModule_1 = class KafkaCoreModule {
115
115
  }
116
116
  async onApplicationBootstrap() {
117
117
  const options = this.connectionOptions;
118
- if (!options.lazyConnect) {
119
- this.logger?.log('Connecting to Kafka brokers' + (Array.isArray(options.brokers) ? colors.blue(options.brokers.join(',')) : ''));
120
- common_1.Logger.flush();
121
- await this.client.connect().catch(e => {
122
- this.logger?.error('Kafka connection failed: ' + e.message);
123
- throw e;
124
- });
125
- }
118
+ if (options.lazyConnect)
119
+ return;
120
+ this.logger?.log('Connecting to Kafka brokers' + (Array.isArray(options.brokers) ? colors.blue(options.brokers.join(',')) : ''));
121
+ common_1.Logger.flush();
122
+ await this.client.connect().catch(e => {
123
+ this.logger?.error('Kafka connection failed: ' + e.message);
124
+ throw e;
125
+ });
126
126
  }
127
127
  onApplicationShutdown() {
128
128
  return this.client.close();
@@ -112,14 +112,14 @@ let KafkaCoreModule = KafkaCoreModule_1 = class KafkaCoreModule {
112
112
  }
113
113
  async onApplicationBootstrap() {
114
114
  const options = this.connectionOptions;
115
- if (!options.lazyConnect) {
116
- this.logger?.log('Connecting to Kafka brokers' + (Array.isArray(options.brokers) ? colors.blue(options.brokers.join(',')) : ''));
117
- Logger.flush();
118
- await this.client.connect().catch(e => {
119
- this.logger?.error('Kafka connection failed: ' + e.message);
120
- throw e;
121
- });
122
- }
115
+ if (options.lazyConnect)
116
+ return;
117
+ this.logger?.log('Connecting to Kafka brokers' + (Array.isArray(options.brokers) ? colors.blue(options.brokers.join(',')) : ''));
118
+ Logger.flush();
119
+ await this.client.connect().catch(e => {
120
+ this.logger?.error('Kafka connection failed: ' + e.message);
121
+ throw e;
122
+ });
123
123
  }
124
124
  onApplicationShutdown() {
125
125
  return this.client.close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xnestjs/kafka",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "NestJS extension library for Kafka",
5
5
  "author": "Panates",
6
6
  "license": "MIT",