@avtechno/sfr 1.0.9 → 1.0.11
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/dist/sfr-pipeline.mjs +2 -2
- package/package.json +1 -1
- package/src/sfr-pipeline.mts +3 -2
- package/src/types/index.d.ts +1 -1
package/dist/sfr-pipeline.mjs
CHANGED
|
@@ -37,10 +37,9 @@ export class SFRPipeline {
|
|
|
37
37
|
async init(base_url) {
|
|
38
38
|
this.base_url = base_url;
|
|
39
39
|
if (this.comms["MQ"]) {
|
|
40
|
-
const channel = await this.comms["MQ"].createChannel();
|
|
41
40
|
//Create channels for each type of Communication Pattern
|
|
42
41
|
const channels = await Promise.all(PATTERNS.map(async (v) => {
|
|
43
|
-
const mq = TARGETED_PATTERN.includes(v) ? new TargetedMQ(
|
|
42
|
+
const mq = TARGETED_PATTERN.includes(v) ? new TargetedMQ(this.comms["MQ"], v) : new BroadcastMQ(this.comms["MQ"], v);
|
|
44
43
|
return [v, mq];
|
|
45
44
|
}));
|
|
46
45
|
this.pattern_channels = Object.fromEntries(channels);
|
|
@@ -213,6 +212,7 @@ export class SFRPipeline {
|
|
|
213
212
|
if (mq instanceof BroadcastMQ) {
|
|
214
213
|
mq.channel.reject(msg, false);
|
|
215
214
|
}
|
|
215
|
+
return; //Return immediately to avoid executing handler fn (which may contain reply or ack calls.)
|
|
216
216
|
}
|
|
217
217
|
handler.fn(msg);
|
|
218
218
|
};
|
package/package.json
CHANGED
package/src/sfr-pipeline.mts
CHANGED
|
@@ -37,10 +37,9 @@ export class SFRPipeline {
|
|
|
37
37
|
async init(base_url?: string): Promise<ServiceDocuments> {
|
|
38
38
|
this.base_url = base_url;
|
|
39
39
|
if(this.comms["MQ"]){
|
|
40
|
-
const channel = await this.comms["MQ"].createChannel();
|
|
41
40
|
//Create channels for each type of Communication Pattern
|
|
42
41
|
const channels = await Promise.all(PATTERNS.map(async (v) => {
|
|
43
|
-
const mq = TARGETED_PATTERN.includes(v) ? new TargetedMQ(
|
|
42
|
+
const mq = TARGETED_PATTERN.includes(v) ? new TargetedMQ(this.comms["MQ"], v) : new BroadcastMQ(this.comms["MQ"], v);
|
|
44
43
|
|
|
45
44
|
return [v, mq];
|
|
46
45
|
}));
|
|
@@ -223,6 +222,8 @@ export class SFRPipeline {
|
|
|
223
222
|
if (mq instanceof BroadcastMQ) {
|
|
224
223
|
mq.channel.reject(msg, false);
|
|
225
224
|
}
|
|
225
|
+
|
|
226
|
+
return; //Return immediately to avoid executing handler fn (which may contain reply or ack calls.)
|
|
226
227
|
}
|
|
227
228
|
|
|
228
229
|
handler.fn(msg);
|