@rlanz/bus
Advanced tools
Comparing version 0.0.5 to 0.1.0
@@ -45,3 +45,3 @@ /** | ||
try { | ||
debug('publishing message %j to bus', message); | ||
debug('publishing message "%j" to channel "%s"', message, channel); | ||
await this.#driver.publish(channel, message); | ||
@@ -51,3 +51,3 @@ return true; | ||
catch (error) { | ||
debug('error publishing message %j to bus. Retrying later', message); | ||
debug('error publishing message "%j" to channel "%s". Retrying later', message, channel); | ||
const wasAdded = this.#errorRetryQueue.enqueue(channel, { | ||
@@ -54,0 +54,0 @@ payload: message, |
@@ -9,2 +9,3 @@ /** | ||
import { Redis } from 'ioredis'; | ||
import debug from '../debug.js'; | ||
import { JsonEncoder } from '../encoders/json_encoder.js'; | ||
@@ -45,2 +46,3 @@ export class RedisTransport { | ||
return; | ||
debug('received message for channel "%s"', channel); | ||
const data = this.#encoder.decode(message); | ||
@@ -50,4 +52,6 @@ /** | ||
*/ | ||
if (data.busId === this.#id) | ||
if (data.busId === this.#id) { | ||
debug('ignoring message published by the same bus instance'); | ||
return; | ||
} | ||
// @ts-expect-error - TODO: Weird typing issue | ||
@@ -54,0 +58,0 @@ handler(data.payload); |
{ | ||
"name": "@rlanz/bus", | ||
"version": "0.0.5", | ||
"version": "0.1.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45571
1284