When sending messages through rostopic, should both rosnodes need on?
Hi All:
Here is one question about the "rostopic". Can client rosnode send message to the topic when server rosnode is off? or vice versa. The topic concept is also be used in MQTT protocol. In their MQTT website description, the action of sending messages from one node to another through topic does not need to concern about the received one condition(that means received one can be on or off state) due to the waste of long-term internet connections and the occupitation of the internet bandwidth ?
@JoshMarino why not post this as an answer? :-)
"A publisher sends the message regardless if anyone listens to it or not." How is this possible if messages are transported via TCP? Or do you just mean that the .publish(msg) does not block if there is no listener?
publish(..)
never blocks.And whether TCP is used or not doesn't matter: if there are no subscribers, there are no connections between nodes, so the middleware will simply discard the msg passed to it by the various
.publish(..)
methods.Only nodes exchange msgs, the master is not involved.