Skip to content

v0.56.0 — broker validation + caching

Choose a tag to compare

@tshafer tshafer released this 11 Jul 17:49
· 100 commits to main since this release

Six more Moleculer pages checked against the service broker.

  • Validating — an action params schema is validated (and coerced) before the handler; a bad call rejects with ValidationException. Any Zod-style schema; the broker bundles no validator.
  • Caching — mark an action cache: true | { ttl, keys } and give the broker a cacher (any Keel Cache — memory or Redis via redisStore()); results memoize by action + params (keys limits the cache key). No cacher → no-op.
  • Metrics / tracing — the middleware localAction seam is the hook; every ctx already carries the trace fields (requestID/parentID/level/caller). Errors — typed broker errors (ServiceNotFoundError/RequestTimeoutError/ValidationException) plus createError. RunnercreateService() + broker.start() from boot. All documented rather than added.

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