Moleculer: Version 0.11 changes

Created on 4 Sep 2017  路  6Comments  路  Source: moleculerjs/moleculer

Breaking changes

  • communication protocol changed #86
  • broker.bus removed. Use events for subscriptions in service schema.
  • broker.emitLocal renamed as broker.broadcastLocal
  • broker.emit is balanced (grouping by service name)
  • broker.broadcast is not balanced (same logic as the old emit)
  • renamed internal events. (Starts with $)

    • $node.connected
    • $node.updated
    • $node.disconnected
    • $services.changed
    • $circuit-breaker.closed
    • $circuit-breaker.opened
    • $circuit-breaker.half-opened
  • changed returned structure of $node.list, $node.services, $node.actions, $node.health

  • strategy in broker options is a class instead of an instance

Changes

  • changed default broker options: heartbeatInterval: 5, heartbeatTimeout: 15, circuitBreaker.maxFailures: 3

New

  • new simple built-in logFormatter
  • new service registry
  • new internal action $node.events
  • new waitForServices method in services & broker #87
  • ping other nodes transit.sendPing. For responses subscribe to $node.pong event.
  • pluggable custom Validator
  • new Error classes

Docs

  • [x] update CHANGELOG
  • [ ] update docs on moleculer site
  • [x] update protocol doc on moleculer site

Install for testing

$ npm install moleculer@next

ETA

~ Sept 15

Most helpful comment

Released :tada:

All 6 comments

There's as typo on $services.chaged

Thanks, fixed. :+1:

doing broker.emit balanced is a great idea!! excellent project btw!

ETA changed to Sept 15

96

Released :tada:

Was this page helpful?
0 / 5 - 0 ratings