19.8 URL Groups (Loading Redundant Locations)

Use URL groups to specify multiple locations for a single XML file, to provide redundancy and fault tolerance. Specify the locations by enclosing them in square brackets. The syntax of a URL group is:

[URL1 | URL2 | URL2 | ... | URLn]

You can specify either an XML file or an XML string. For example:

[file:///usr/local/default_dds.xml | file:///usr/local/alternative_default_dds.xml |
str://"<dds><qos_library name="Data_Library"><qos_profile  name="Data_Profile" base_name="BuiltinQosLibExp::Generic.StrictReliable" is_default_qos="true" /></qos_library></dds>"]

The OR operand (|) tells Connext DDS to load one file/string at a time, starting from the left. If the first file/string is not available, Connext DDS tries loading the next one, and so on. For example, if the first location loaded successfully, Connext DDS does not load the subsequent locations. Brackets are not required for URL groups with a single file/string. In fact, single XML files separated by semicolons are URL groups without brackets.

Here’s an example (on UNIX-like systems with bash) that loads multiple files, including one bracketed URL group with redundant file locations:

export NDDS_QOS_PROFILES=[file:///usr/local/default_dds.xml | file:///usr/local/alternative_default_dds.xml]; file:///usr/local/default_dds_2.xml

See also 19.5 How to Load XML-Specified QoS Settings for information on loading multiple XML files.

© 2020 RTI