v3.5.4
Fixed
-
Tracing hooks installed on the default options could patch a copy nothing
ever called.DEFAULT_IMQ_SERVICE_OPTIONSandDEFAULT_IMQ_CLIENT_OPTIONS
were plain module-scope objects, so a process that evaluated this module twice
held two copies — which is what a loader handling ESM and CJS through separate
pipelines does: undertsx,require('@imqueue/rpc')and
import('@imqueue/rpc')return distinct instances.Anything that installs behavior by mutating those objects then patched a copy
the application never calls.@imqueue/opentelemetryattaches its
beforeCall/afterCall/wrapCallhooks that way, and produced no spans at
all under such a loader — with no error, since the patch itself succeeded.Both are now keyed on
Symbol.for, making them singletons per process rather
than per module evaluation, so a mutation through any instance is visible to
all. This also removes the "duplicate installs at different tree depths"
caveat the instrumentation documents.
About
@imqueue/rpc is the type-safe RPC framework of @imqueue: self-describing service classes over a Redis message queue that generate their own strongly-typed clients — no hand-written client code, no .proto, no service discovery, no load balancer. Delayed calls via IMQDelay, optional caching and locking decorators. Node.js and TypeScript only, Redis only.
- Docs: https://imqueue.org/
- Guide for AI assistants / LLMs: https://imqueue.org/llms.txt
- Commercial license & support: https://imqueue.com/
npm i @imqueue/rpc