Use mqtt sub-pub model for message callback
vzhr opened this issue · comments
In this project, we receive messages by loop on a high frequency, so that it maybe a little expensive. I have found that mqtt has sub-pub model, does this will help?
https://zeromq.org/socket-api/?language=cpp&library=zmqpp#Publish-subscribe%20pattern
Thanks for your attention. But in this project, messages are handled once new message coming rather than in a high frequency loop. I did tried to receive messages in a loop but commented these lines out.
btw, this project uses the zeroMQ pub/sub mode as the link you attached.
swarm_ros_bridge/src/bridge_node.cpp
Line 122 in 3b37290
Notixe that 'dont_block' is set false which leads to block in receiving threads until new messages coming
OK, Good job.