mqtt_bridge provides a functionality to bridge between ROS and MQTT in bidirectional.
$ sudo apt install python3-pip
$ sudo apt install ros-noetic-rosbridge-library
$ sudo apt install mosquitto mosquitto-clients
$ pip3 install -r requirements.txt
$ roslaunch mqtt_bridge demo.launch