-
Notifications
You must be signed in to change notification settings - Fork 4
Configuring_0mq_Endpoints
Engine.js uses 0mq and the node.js 0mq bindings to communicate between server components. Most of the internal 0mq endpoints are configurable at runtime. All default internal 0mq endpoints are designed to work together “out of the box”.
Note: If you change a 0mq endpoint from its default make sure you also change the corresponding endpoint for the complementary server component. See the Default Endpoints & Mappings section.
Even though 0mq supports 4 different types of transports only 2
types are supported by Engine.js (ipc
and tcp
)
-
ipc
: The inter-process (ipc) transport passes messages between local processes using a system-dependent IPC mechanism. This is the default transport type for all Engine.js components. -
tcp
: TCP is an ubiquitous, reliable, unicast transport. Use this transport type when distributing server components across mulitple machines.
IPC endpoints have the format: ipc://[socket-name]
. See the
relevant 0mq documentation for more information about the ipc
transport.
TCP endpoints have the format: tcp://[interface]:[port]
. See the
relevant 0mq documentation for more information about the tcp
transport.
-
interface
: An IPv4 network address. Domain names will not work (but local-network DNS names will).- If the endpoint is marked as “exclusive” then you can use
*
as the interface. All interfaces will then be bound to the specified port.
- If the endpoint is marked as “exclusive” then you can use
-
port
: The TCP port number to use.- To see if a TCP port is free for an endpoint to use, use
lsof -i :[PORT]
- To see if a TCP port is free for an endpoint to use, use
Component | Param | Default Endpoint | Complementary Component | Complementary Param |
---|---|---|---|---|
Client | sending_endpoint |
ipc:///tmp/intake-listener.ipc |
Intake | listening_endpoint |
Client | listening_endpoint |
ipc:///tmp/exhaust-publisher.ipc |
Exhaust | publishing_endpoint |
Intake | sending_endpoint |
ipc:///tmp/cylinder-listener.ipc |
Cylinder | listening_endpoint |
Intake | listening_endpoint |
ipc:///tmp/intake-listener.ipc |
Client | sending_endpoint |
Cylinder | listening_endpoint |
ipc:///tmp/cylinder-listener.ipc |
Intake | sending_endpoint |
Cylinder | exhaust_endpoint |
ipc:///tmp/exhaust-listener.ipc |
Exhaust | listening_endpoint |
Exhaust | listening_endpoint |
ipc:///tmp/exhaust-listener.ipc |
Cylinder | exhaust_endpoint |
Exhaust | publishing_endpoint |
ipc:///tmp/exhaust-publisher.ipc |
Client | listening_endpoint |