When the default Loopback transport doesn’t cover your use-cases, Cambion has other transports available. One of these uses NetMQ to send data between instances of Cambion.
NetMQ uses two TCP ports. These two ports needs to be open in your firewall.
NetMQ transport for Cambion is also available on NuGet so you can install it using the NuGet Package Manager Console:
The NetMQ transport is setup during regular Cambion configuration.
9999 are arbitrary ports, and you can use whichever ports you fancy (that are available).
Remember that the ports must be the same (both numerical, and the same order) for all instances of Cambion that will talk to eachother.
In order for Cambion to send and receive data using NetMQ, one of the Cambion instances needs to work as a MessageHost. The other Cambion instances will then connect to the MessageHost as clients.
The MessageHost will work as a normal client in addition to being the host without any additional configuration
Initialize the NetMQ backend as normal, but set the optional parameter
useMessageHost parameter in the
UseNetMQ extension to
ICambion cambion = new CambionConfiguration() .Transport.UseNetMQ( publishAddress: "tcp://localhost:9999", subscribeAddress: "tcp://localhost:9998", useMessageHost: true) .Create();
Clients will use the same configuration as above, but will set
false (or omit it, as it defaults to