@rayondigital/nest-dapr 0.9.49 → 0.9.50
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.
|
@@ -109,7 +109,7 @@ let DaprPubSubClient = DaprPubSubClient_1 = class DaprPubSubClient {
|
|
|
109
109
|
}
|
|
110
110
|
try {
|
|
111
111
|
const contentType = (_a = messages[0].contentType) !== null && _a !== void 0 ? _a : 'application/json';
|
|
112
|
-
const response = yield this.daprClient.pubsub.publishBulk(pubSubName, topic, messages.map((m) => m.payload), producerId ? { metadata: { partitionKey: producerId }, contentType } : undefined);
|
|
112
|
+
const response = yield this.daprClient.pubsub.publishBulk(pubSubName, topic, messages.map((m) => m.payload), producerId ? { metadata: { partitionKey: producerId, PartitionKey: producerId }, contentType } : undefined);
|
|
113
113
|
if (response !== undefined && response.failedMessages && response.failedMessages.length > 0) {
|
|
114
114
|
const error = (_c = (_b = response.failedMessages[0]) === null || _b === void 0 ? void 0 : _b.error) !== null && _c !== void 0 ? _c : new Error('Unable to publish message');
|
|
115
115
|
const failedMessages = response.failedMessages.map((m) => {
|
|
@@ -117,6 +117,7 @@ let DaprPubSubClient = DaprPubSubClient_1 = class DaprPubSubClient {
|
|
|
117
117
|
return {
|
|
118
118
|
pubSubName: pubSubName,
|
|
119
119
|
topic,
|
|
120
|
+
producerId,
|
|
120
121
|
payload: m.message.event,
|
|
121
122
|
metadata: m.message.metadata,
|
|
122
123
|
contentType: (_a = m.message.contentType) !== null && _a !== void 0 ? _a : contentType,
|
|
@@ -145,7 +146,7 @@ let DaprPubSubClient = DaprPubSubClient_1 = class DaprPubSubClient {
|
|
|
145
146
|
options['metadata'] = metadata;
|
|
146
147
|
}
|
|
147
148
|
if (producerId) {
|
|
148
|
-
options['metadata'] = Object.assign({ partitionKey: producerId }, metadata);
|
|
149
|
+
options['metadata'] = Object.assign({ partitionKey: producerId, PartitionKey: producerId }, metadata);
|
|
149
150
|
}
|
|
150
151
|
if (fireAndForget) {
|
|
151
152
|
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
package/package.json
CHANGED