roslibjs icon indicating copy to clipboard operation
roslibjs copied to clipboard

Duplicate messages when subscribing to a topic multiple times

Open larslue opened this issue 7 years ago • 1 comments

Hi all,

if a website subscribes to a topic multiple times which is latched, each subscriber gets all latched messages. That might be a problem because a subscriber to a topic can not know whether the received messages are new and relevant.

Steps to reproduce the problem

  1. Run a roscore with a latched topic. Let's call it '/example_topic/'
  2. Publish some messages on the topic.
  3. In your website subscribe to the topic. The subscriber will get all latched messages of the topic.
  4. Add another subscriber to the topic with the same instance of roslibjs. The second subscriber gets all latched messages of the topic, but so does the first subscriber although there were no new messages.

larslue avatar Jun 27 '18 08:06 larslue

I got the same!

fabioaraujopt avatar Sep 23 '19 17:09 fabioaraujopt