Whether a reader/writer use a single port number

4 posts / 0 new
Last post
Last seen: 9 years 3 months ago
Joined: 04/16/2015
Posts: 11
Whether a reader/writer use a single port number

From this link:  https://community.rti.com/kb/what-network-port-numbers-does-rti-connext-use, it shows how the port number used by RTI Context. I wander if I create multiple readers/writers under one domain, will it share one port number? I have monitor the port number used by my RTI application and I found that no matter how many topics/readers/writers I created, RTI doesn't create additional port for these entities. Does this mean all the readers/writers in one domain share one port number? I have read the User Manual and it says we can change the port number by QoS policy, rtps_well_known_ports.metatraffic_unicast_port. After some search I didn't find an example to use this property. Is there an example to show how to change the default port number it uses?

fercs77's picture
Last seen: 2 years 6 months ago
Joined: 01/15/2011
Posts: 30


By default, all the DataReaders and Datawriters under one domain receive data on the same port. You can change that behavior by setting the QoS values:

reader_qos.unicast (DDS_TransportUnicastQosPolicy)

reader_qos.multicast (DDS_TransportUnicastQosPolicy)

writer_qos.unicast (DDS_TransportUnicastQosPolicy)  -- This configures the reception of  ACK traffic 

Notice that if a DataReader (or a DataWriter) is configured to receive data in a different port, Connext DDS will create a new socket and a new thread to process the incoming data. This will not scale if you have many DataReaders/DataWriters. My recommendation is to use different ports only for the DataReaders/DataWriters that have stringent latency requirements as this will give you the option of procesing the traffic for these entities concurrently. In this case, you will also want to put these DataWriters/DataReaders in their own Publishers/Subscribers because the execution of DataWriters/DataReaders attached to the same Publisher/Subscriber is serialized.


- Fernando

Last seen: 1 year 1 month ago
Joined: 06/05/2023
Posts: 2

@fercs77: hi Fercs77:  so what is a Participant described in   https://community.rti.com/kb/what-network-port-numbers-does-rti-connext-use? Is participant a peer defined in NDDS_DISCOVERY_INITIAL_PEERS?

Howard's picture
Last seen: 11 hours 15 min ago
Joined: 11/29/2012
Posts: 584