v0.55.0 — broker fault tolerance + registry
Two more Moleculer pages checked against the service broker.
Fault tolerance (fault-tolerance):
- Retry —
call(action, params, { retries: 3 })re-runs the whole call on failure (total attempts = retries + 1);BrokerOptions.retriessets a broker-wide default. - Fallback —
{ fallback: value }or{ fallback: (err, ctx) => value }returns instead of throwing once every attempt (and anyerrorhook) 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.