@rayondigital/nest-dapr 0.10.5 → 0.10.6
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.
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { KeyValueType } from '@dapr/dapr/types/KeyValue.type';
|
|
1
2
|
export interface DaprPubSubMetadata {
|
|
2
3
|
name: string;
|
|
3
4
|
topicName: string;
|
|
4
5
|
route?: string;
|
|
6
|
+
metadata?: KeyValueType;
|
|
5
7
|
}
|
|
6
8
|
export declare const DaprPubSub: (options: DaprPubSubMetadata) => MethodDecorator;
|
package/dist/dapr.loader.js
CHANGED
|
@@ -180,7 +180,7 @@ let DaprLoader = DaprLoader_1 = class DaprLoader {
|
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
182
|
const name = (_a = daprPubSubMetadata.name) !== null && _a !== void 0 ? _a : (_b = this.options.pubsubOptions) === null || _b === void 0 ? void 0 : _b.defaultName;
|
|
183
|
-
const { topicName, route } = daprPubSubMetadata;
|
|
183
|
+
const { topicName, route, metadata } = daprPubSubMetadata;
|
|
184
184
|
this.logger.log(`Subscribing to Dapr: ${name}, Topic: ${topicName}${route ? ' on route ' + route : ''}`);
|
|
185
185
|
yield this.daprServer.pubsub.subscribe(name, topicName, (data) => __awaiter(this, void 0, void 0, function* () {
|
|
186
186
|
var _c, _d;
|
|
@@ -206,7 +206,7 @@ let DaprLoader = DaprLoader_1 = class DaprLoader {
|
|
|
206
206
|
this.logger.log(`Retrying pubsub handler ${topicName} operation`);
|
|
207
207
|
return dapr_1.DaprPubSubStatusEnum.RETRY;
|
|
208
208
|
}
|
|
209
|
-
}), route);
|
|
209
|
+
}), route, metadata);
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
212
|
subscribeToDaprBindingEventIfListener(instance, methodKey) {
|
package/package.json
CHANGED