Closed FabioBagni closed 8 months ago
Unfortunately not. With multiple publisher it is quite difficult to determine a right order because everybody might define it in a different way.
You could circumvent the issue somehow by using a UserHeader
with a timestamp and have a local cache which orders the samples according to your needs.
The problem with multiple publishers and history is that there are inherent races. Let's assume you have three publisher, A, B and C:
-> although A has the oldest data, it has the newest timestamp
@FabioBagni Are your questions answered and can this be closed?
Yes the answers are very clear, thanks.
I solved it writing timestamp inside the payload and manually discarding everything but the latest.
Hi, we're having trouble trying to implement "persistent" publishers and subscribers.
To do that we are initializing publishers with
publisherOptions.historyCapacity = 10
(or any size > 0), and subscribers withsubscriberOptions.historyRequest = 1
.With these options, the subscriber receives the latest published message at its creation.
The problem is that if we have multiple publishers with these options publishing on the same topic, the subscriber receives the latest published message from each publisher.
So, is there a way to understand which one of the received messages is the latest?