ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Order of published/subscribed messages

asked 2012-10-24 10:36:49 -0500

Jonas Koenemann gravatar image


I have a single publisher and a single subscriber. The publisher is publishing at short intervals. Is there ensured that the messages arrive in order or do i have to care about it myself? Is there an option to force sending in order?

Thanks! Jonas

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-10-24 10:53:42 -0500

tfoote gravatar image

For a single publisher single subscriber system they should all be ordered, but not guaranteed to all be there depending on your queue size. If you have multiple publishers the should be relative ordering from the individual publisher, but no guarantees between two publishers on ordering.

edit flag offensive delete link more

answered 2012-10-24 11:01:15 -0500

JBuesch gravatar image

Since traffic is exchanged using (persistent) TCP channels (might not be true for all) messages arrive in order by nature. You can also add a Header in the message type which contains a sequence number in order to prove this fact although not necessary.

edit flag offensive delete link more

Question Tools


Asked: 2012-10-24 10:36:49 -0500

Seen: 2,122 times

Last updated: Oct 24 '12