Routing defines how applications communicate via the routing manager.
Basic Routing
You can specify routing by providing a single string representing the application name that hosts the routing component. If not specified, the first started application hosts it.
"routing" : "service-sample",
Internal Communication via TCP
To use TCP for internal communication, use a structured routing object. This is useful when applications are on different machines or require specific network settings.
Host Configuration
The host object defines the properties of the routing manager:
name: Name of the application hosting the routing component.uid/gid: User/Group identifiers (required if credential checks are enabled).unicast: The unicast address for the routing manager.port: The port for the routing manager.
Guest Configuration
The guests object defines properties for applications that are NOT the routing manager:
unicast: The unicast address for applications to connect to the routing manager. Defaults to the host's unicast address if not set.ports: A set of port ranges used by clients. Each client requires two ports (one for receiving, one for sending).- You can specify
uid and gid for specific ranges. ranges consists of first and last port numbers.- Constraint: Each range must contain an even number of ports. The parity (even/odd) of the first port in a range must match the parity of the routing host port.
Unix Domain Sockets (UDS)
Set uds-preferred to true to prefer Unix Domain Sockets over TCP for internal communication between the routing manager and clients.