Hello fellow rti dds users,
we use unicast for all of our topics. But one specific topic has over 100 subscribers and is published over 100 times per second. So we think multicast would be the right solution to send the topic just once insteadof clogging the network.
How can we specify the DataReaders and DataWriters for that one specific topic to use multicast only?
Thanks in advance.
- Mike
You should use the TransportMulticast QoS Policy for the DataReaders. In DDS, requesting multicast to be used is set on the DataReader side. Nothing to be done on the DataWriter side. For each DataReader, if you specify the same multicast address, then the DataWriter will only send one copy of the data to the multicast address, which would be sent to all of the DataReaders who have set that multicast address in their QOS.
Of course, the network that you're on needs to be able to pass the multicast packet between the publishing host to all of the subscribing hosts...if they are all on the same subnet, then that's usually no problem. If they are on different subnets, you'll have to enable your routers/switches to pass multicast packets between subnets as well as modify the multicast TTL of the UDP transport for the DataWriter's participant so that the network will deliver the multicast packet properly.
See:
https://community.rti.com/static/documentation/connext-dds/6.0.1/doc/api/connext_dds/api_cpp/structDDS__DataReaderQos.html#a88be8296924413045ef04f93e097d6ca
and
https://community.rti.com/static/documentation/connext-dds/6.0.1/doc/api/connext_dds/api_cpp/structNDDS__Transport__UDPv4__Property__t.html#a3a361973cfdc08952376a23792fbbc8c
which can be set via XML QOS as well.