Moleculer Broker icon

Moleculer Broker

Moleculer Broker

Broadcast

AI-generated

Overview

This node, named 'Moleculer Broker', integrates with the Moleculer microservices framework to perform operations such as calling actions, emitting events, and broadcasting messages within a Moleculer broker environment. The 'Broadcast' operation specifically allows sending a broadcast message to multiple services or nodes in the Moleculer network. This node is useful in scenarios where distributed communication or event-driven messaging is needed across microservices, such as notifying multiple services of a state change or triggering actions in several services simultaneously.

Use Case Examples

  1. Broadcasting a notification to all services when a user updates their profile.
  2. Sending a system-wide alert to multiple microservices in a distributed application.

Output

JSON

  • json - The JSON output contains the response from the broadcast operation, including any data returned by the services that received the broadcast message.

Dependencies

  • Requires a Moleculer API key credential for authentication to the Moleculer broker.

Troubleshooting

  • If the node fails to broadcast, ensure the Moleculer broker is accessible and the API key credential is valid.
  • Errors may occur if the broadcast message format is incorrect or if the target services are not available in the broker network.
  • Common error messages include connection failures or permission denials, which can be resolved by verifying network connectivity and credential permissions.

Discussion