Replies: 1 comment 1 reply
-
Hi @samsta, you are right this feature is currently not existing. Let's discuss this here with the dev team. The good news is that the low level datawriters get informed if a new subscriber (reader) is connected. Additional there is a hash added to every payload that should avoid to receive a sample twice on the reader side. So if in theory the low level reader architecture would hold the last sample and retransmit it with the same hash then only a new (late joined) reader/subscriber would process it. I would create a prototype and then we can check the impact and possible side effects. Best, ReX |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I have been browsing the code to find out if there's a feature that I'd call 'late subscription' but I couldn't find anything, so here's my suggestion for a future feature.
Late subscription support basically means that when you subscribe to a topic you'll receive the last message published on that topic pretty much immediately. This is very useful if you have a topic that isn't published to frequently, and a process subscribes to it late (e.g. due to startup ordering or because the process crashed and restarted).
Because this means that the Publisher needs to hold on to a (potentially costly) copy of the last message I'd propose this to be something that you can enable or disable in the Publisher, and maybe even add an option to the Subscriber to say whether you want a copy of the last message or not.
A simpler version of this would be to add a callback
subscriptionChanged
to the publisher so we can decide to re-publish in client code.I realise there's other ways to do this (e.g. query the message via RPC but that's less elegant and adds coupling). But I'm wondering if this is something that could be considered for future versions? Or maybe it's already there and I just can't find it.
Beta Was this translation helpful? Give feedback.
All reactions