11-02-2021 03:05 AM - edited 11-02-2021 03:06 AM
Hello,
When I use DDS write to send bytes of strings,I set forceUnboundedString? to True in order to send large data strings. I found when I set the bytes to 64983, it can be read out from another computer, but when I set to 64984, it cann't be read out. So how many bytes of strings can be sent at once and read from other reader?What QoS may have influence on it?
Solved! Go to Solution.
11-02-2021 08:02 AM
Hi Saiyxin,
By default the property parent.message_size_max is set to 65536. That limits the size of data the transport t can receive. Looks like your type is over the maximum (some overhead is added). That limit can be customized by transport through QoS. Here is an example of how to do it UDPv4 and shared memory.
<participant_qos>
...
<property>
<value>
<!-- Add the following settings to enable large data for UDPv4 transport -->
<element>
<name>dds.transport.UDPv4.builtin.parent.message_size_max</name>
<value>65530</value>
</element>
<element>
<name>dds.transport.UDPv4.builtin.send_socket_buffer_size</name>
<value>65530</value>
</element>
...
<!-- Add the following settings to enable large data for shared memory transport -->
<element>
<name>dds.transport.shmem.builtin.parent.message_size_max</name>
<value>65530</value>
</element>
<element>
<name>dds.transport.shmem.builtin.receive_buffer_size</name>
<value>65530</value>
</element>
<element>
<name>dds.transport.shmem.builtin.received_message_count_max</name>
<value>32</value>
</element>
</value>
</property>
...
</participant_qos>
Also, the receiver buffer size can be changed:
<participant_qos>
...
<receiver_pool>
<buffer_size>65530</buffer_size>
</receiver_pool>
...
</participant_qos>
You can increase the maximum size to accommodate your data type. Have a look at the "message_size_max" property and other ones related related properties in the user's manual: