Short answer is : None. No code change is needed at all if your application use only ROS API (and not specific Fast-RTPS symbols)
ROS 2 aims to abstract all this from you and if you have another DDS implementation installed you should be able to switch to another implementation by just setting the RMW_IMPLEMENTATION
environment variable. You can find more info here
This has limits though, for examples if you application contains custom ROS messages, you need to generate them for the implementation you want to use. So you need to have the DDS implementation and corresponding ROS packages already installed before building the workspace of your application.
For a concrete example: if you use ROS Eloquent, all you need to do to use Connext DDS in your application is:
- install connext DDS and it's ROS wrapper :
apt-get install ros-eloquent-rmw-connext-cpp
- source your ROS installation:
source /opt/ros/eloquent/setup.bash
- build your workspace:
colcon build
export RMW_IMPLEMENTATION=rmw_connext_cpp
ros2 run my_package my_application
Can you please share how you have done this pub/sub on default dds?