Configuration Guide
|
All Ultra Messaging scope, option, and value strings are case-insensitive. Thus, the following are identical:
context fd_management_type wincompport Context Fd_Management_Type WinCompPort CONTEXT FD_MANAGEMENT_TYPE WINCOMPPORT
The *_interface options require a network interface, usually supplied as a string (from a configuration file or in source code via *_attr_str_setopt()), the syntax used for network interface specifications is CIDR notation:
a.b.c.d/num
where '/num' is the optional "prefix length", the number of leading 1 bits in the netmask. If the prefix length is omitted, it defaults to 32 (netmask 255.255.255.255), which means that it must be an exact match for the interface's IP address. However, if the prefix length '/num' is supplied, it tells Ultra Messaging to select the first interface that starts with that network number. This makes it easier to share a configuration file between many (possibly multi-homed) machines on the same network.
For example:
context resolver_unicast_interface 192.168.0.0/24
specifies a netmask of 255.255.255.0 and would match the interface 192.168.0.3 on one host, and 192.168.0.251 on another host. But would not match 192.168.1.3.
The prefix length ("/num") does not need to match the actual network mask used by the host. For example, you have many hosts on different internal IP networks, but if they all start with "10", you can specify the interface as "10.0.0.0/8". UM will scan the list of interfaces and select the first one it finds that starts with 10. This is useful for selecting any network-connected interface, omitting the loopback 127.0.0.1.
You can also set network interfaces by device name. When setting a configuration option's interface by device name, you must use double quotes, as illustrated below.
context resolver_unicast_interface "en0"
Finally, you can also set network interfaces by DNS host name. When setting a configuration option's interface by DNS name, simply replace the dotted IP address with the host name, as illustrated below.
context resolver_unicast_interface myhost.mydomain.com/24
Notice the use of the optional netmask even though the host name will typically resolve to a specific host IP address. In this case, UM will zero out the host bits of myhost's address and find any interface within that network. If the netmask is omitted, an exact match to myhost's address is needed.
As mentioned above, when a device name is supplied as an interface specification, the device name must be enclosed in double quotes. This presents a problem when the configuration option is specified within an XML file. In XML files, the values for all options must be enclosed in double quotes, but those quotes are only used by the XML parser to delimit the value. The quote characters themselves are not passed to the UM configuration parser. But the UM configuration parser needs the double quotes to indicate that the device name is being used.
The solution is to use the """ escape when specifying device names for interfaces within an XML file. The XML parser will convert those to actual double quote characters as part of the value passed to UM.
For example:
Another example:
(The repeated semicolon looks strange; the first one closes the """, and the second one separates the resolver_multicast_interface option from the transport option.)
When specifying send or receive socket buffer sizes, keep the following platform-specific information in mind.
See our whitepaper Topics in High Performance Messaging for background and guidelines on UDP buffer sizing.
There are a large number of configuration options which are network port numbers. In many cases, ranges of ports are specified so that multiple instances of UM-based programs can be run on the same machine without interference. Each instance will find a free port in the configured range. However, if the range is not large enough, an instance of UM can fail to initialize due to ports not being available.
Port range exhaustion can also happen if other software packages assign to ports in the range configured for UM. Users should be careful to configure all their networking packages to use non-overlapping port numbers.
The operating system allocates a range of ports for ephemeral ports. These ports are allocated dynamically as-needed by networking packages, including UM, for sockets that don't need a well-known, predictable port number. See Wikipedia's article Ephemeral port for ephemeral port ranges used by popular operating systems.
UM port configurations should avoid the host's ephemeral port range. Since these ports are allocated dynamically by the operating system, these allocations can interfere with UM by exhausting UM port ranges.
When the UM C API is used to set configuration options programmatically, port numbers can be specified as a string or as a binary value. For example, here is an option being set by binary value:
See Setting an Option from a Binary Value.
There are some port options whose binary values must be supplied in network order. For example:
It is generally the case where setting a port to a specific value (i.e. not setting up a range) requires network order. Whereas setting the high and low port values of a range are done in host order.
The reference documentation for each port option specifies the byte order required when binary values are being specified. For example, transport_tcp_port (source) has a table row that says:
Byte order: | Network |
This section describes the format of each option reference entry.
Each entry begins with a brief description of the option. Following the description is a series of items that defines permissible usage and describes the values for the option.
Next, for enumerated-valued options with limited specific choices, a table details the permissible String Value (configuration file), Integer Value (programmatic attribute setting), and a Description of each choice that includes default value designations.
Alternately, for switch-valued options (0 or 1), a table describes the meaning of each of the two possible values. The default value is noted within the description.