This reminds me a lot of Seneca, except I don’t see yet where microservices come into play.
Patrick Metzdorf
21

Hi Patrick,

This example above is very basic. Please check the documentation. You will find a section about transporters. Currently Moleculer supports 3 transporters (message brokers) NATS, Redis and MQTT. There is also an example which demonstrates communication between processes/nodes.

Answer for you question: You don’t need to define the node when call the action. The ServiceBroker handles everything. So declare you have 2 nodes. Node1 is running ”math” service, Node2 is running “posts” service. And if you simple call the “math.add” on Node2, broker will transfer the request to Node1, call action and transfer back the response to Node2. If you have 2 or more nodes which are runing “math”, ServiceBroker will be load balancing the request.