@lad-tech/nsc-toolkit 1.22.2 → 1.22.4
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.
- package/CHANGELOG.md +2 -2
- package/dist/Client.js +3 -1
- package/dist/StreamManager.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## [1.22.
|
|
1
|
+
## [1.22.4](https://github.com/lad-tech/nsc-toolkit/compare/v1.22.3...v1.22.4) (2024-09-05)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* Drop error if failed subscribe to subject ([#122](https://github.com/lad-tech/nsc-toolkit/issues/122)) ([edc4580](https://github.com/lad-tech/nsc-toolkit/commit/edc4580df2b3ae4e12b530d822e6cb60ce89ca1d))
|
package/dist/Client.js
CHANGED
|
@@ -99,7 +99,9 @@ class Client extends Root_1.Root {
|
|
|
99
99
|
return method.call(target, eventName, handler);
|
|
100
100
|
}
|
|
101
101
|
catch (error) {
|
|
102
|
-
|
|
102
|
+
const errorMessage = 'Failed subscribe to subject';
|
|
103
|
+
this.logger.error(errorMessage, error);
|
|
104
|
+
throw new Error(`${errorMessage} ${this.serviceName}.${String(eventName)}`);
|
|
103
105
|
}
|
|
104
106
|
};
|
|
105
107
|
}
|
package/dist/StreamManager.js
CHANGED
|
@@ -105,7 +105,7 @@ class StreamManager extends Root_1.Root {
|
|
|
105
105
|
throw new Error(`Error creating consumer ${consumerName}. Stream for subject ${subject} not found`);
|
|
106
106
|
}
|
|
107
107
|
if ((0, types_1.isConsumerOptsBuilder)(options)) {
|
|
108
|
-
await this.jsm.consumers.add(streamName, options.config);
|
|
108
|
+
await this.jsm.consumers.add(streamName, { ...options.config, filter_subject: subject });
|
|
109
109
|
}
|
|
110
110
|
return isPullConsumer
|
|
111
111
|
? new StreamFetcher_1.StreamFetcher(this.broker.jetstream(), streamName, consumerName, {
|