Problem

When and how NDDS_DISCOVERY_PEERS env. variable should be used?

Solution

NDDS_DISCOVERY_PEERS is an environment variable used by RTI DDS (and consequently by BDNT) used in the discovery process to find the peers (in case of BDNT senders and receivers). In BDNT it is used the phase of connecting of senders and receiver.

The varaible can be used in several cases:

  • mutli-cast is not supported By default (if NDDS_DISCOVERY_PEERS is not set) it is used multi-cast for finding senders/receivers - to connect receiver(s) and sender(s).

If the sender(s) and receiver(s) do not connect it is very likely that multi-cast does not work (is not supported) of either of hosts. Probably it is disabled in the kernel. In this case we can specify the hosts that run sender/receivers in the NDDS_DISCOVERY_PEERS environment variable.

  • we do not want to use multi-cast
  • we want to limit the "discovery range" to some hosts only. For example if we ant to prevent interference between several systems/instances using the same stream/flow names

An example from cob-cdpm-b from AOS

export DISCOVERY_PEERS=cob-cpn-01,cob-cpn-02,cob-cpn-03,cob-cpn-04,cob-cpn-05,cob-cpn-06,cob-cpn-07,cob-cpn-08,cob-cpn-09,cob-cpn-10,cob-cpn-11,cob-cpn-12,cob-cpn-13,cob-cpn-14,cob-cpn-15,cob-cpn-16,gas03,gas06

-- BogdanJeram - 2014-01-17