I am interfacing ROS2 with native RTI DDS through RTI Connector for python.
In ROS2, the strings are unbounded and dynamically allocated.
But in RTI, if I give the type as default, then it limits it to 255 bytes.
For that I used the variable. stringMaxLength="2147483647"
Yes -- that is correct for setting up 'unbounded' support.
The value 2147483647 (0x7FFFFFFF) is interpreted to mean "allocate memory to the size of the sample, and free the memory when finished" -- rather than a one-time allocation of a fixed-size buffer.
See the CoreLibrariesUserManual section under "Unbounded Built-In Types" for more details.