Skip to content

v0.55.0 — broker fault tolerance + registry

Choose a tag to compare

@tshafer tshafer released this 11 Jul 17:39
· 101 commits to main since this release

Two more Moleculer pages checked against the service broker.

Fault tolerance (fault-tolerance):

  • Retrycall(action, params, { retries: 3 }) re-runs the whole call on failure (total attempts = retries + 1); BrokerOptions.retries sets a broker-wide default.
  • Fallback{ fallback: value } or { fallback: (err, ctx) => value } returns instead of throwing once every attempt (and any error hook) has failed. Order: retry → error hooks → fallback → throw. (Timeout was already there.)

Registry (registry): broker.hasAction(name), listActions(), listServices(), getService(name).

Networking / balancing — clustering is the pluggable Transporter seam (NATS/Redis/TCP); a single node has one endpoint per action, so cross-node load balancing doesn't apply. Event group balancing already works via emit(…, { groups }). Documented rather than added.

All additive and backward compatible. 360 tests; type-checked doc examples. See docs/broker.md.