Ask Your Question

topic tantrums

asked 2011-06-10 19:53:12 -0600

kissandra79 gravatar image

Imagine a scenario where there are 2 nodes subscribing to the same topic. And that, node B subscribes to the topic a few minutes after node A. Now, when node B starts subscribing to the topic, does it start receiving all the earlier messages that were consumed by 'A' since it started earlier or does it only receive the messages that are available on the topic from that moment in time.

And what is the size of any given topic? Does it hold messages forever or is there some kind of limit as to how many messages a topic can hold at any point in time.

I apologize if my understanding of ROS is severely lacking, but I am still learning.

Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-06-11 04:10:10 -0600

dornhege gravatar image

Node B will only receive messages that are published after it has connected (with the execption of latching).

There is a queue size for messages, that you can define, but it is not for a topic in general, but for the publisher/subscriber.

These things come clear, when you look at what a topic is. Messages are not sent to a physical topic (i.e. some program) and stored there, where subscribers receive them from. A topic is merely a common name to publish/subscribe to, but nothing more. Each message stream is handled out between the publisher and subscriber directly, they just use the topic name to "find each other".

edit flag offensive delete link more


The biggest revelation was that the publisher and subscriber pass messages between them directly. I thought that the topic was a physical memory location where messages are stored by publisher and retrieved by subscriber. If topic is virtual, then latching happens at publisher or subscriber?Or both?
kissandra79 gravatar image kissandra79  ( 2011-06-11 04:41:40 -0600 )edit
It can only be in the publisher.
dornhege gravatar image dornhege  ( 2011-06-11 09:01:38 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-06-10 19:53:12 -0600

Seen: 205 times

Last updated: Jun 11 '11