Rosanswers logo


Simple comprehension problem. I though that when a message on a topic was read by a subscriber it was "erased" just after. If I have, lets say, two subscribers on one topic, when new information is available, do all subscriber are going to receive the same message ? It makes sense but I never considered it that way =). So I just want confirmation.

For example if I have a subscriber with a very complex and long callback while I have a very short callback for the other subscriber, I guess it's their queue size that is going to determine which message are going to be used by he Callback but overall, thy are gong to have access to the same message. Is it correct ?

Like :

Message 1 on topic -|----> Message 1 to Subscriber 1 if space available in queue
                    |----> Message 1 to Subscriber 2 at the same time if space available in queue


Originally posted by Maya on ROS Answers with karma: 1172 on 2014-04-09

Post score: 1


1 Answer 1


Rosanswers logo

Yes. Topics are broadcast; all subscribers should see all messages sent to a topic. (disregarding transmission issues, queue sizes, etc).

Originally posted by ahendrix with karma: 47576 on 2014-04-09

This answer was ACCEPTED on the original site

Post score: 3

Original comments

Comment by demmeln on 2014-04-11:
Just as a comment, this is the pub-sub communication pattern: http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.