zenoh icon indicating copy to clipboard operation
zenoh copied to clipboard

LivelinessSubscriber current tokens option

Open OlivierHecart opened this issue 8 months ago • 0 comments

Describe the feature

For different reasons, the LivelinessSubscriber has been implemented with a similar behavior than the classic Subscriber in the sense that it only receives liveliness tokens declared after the subscriber was created. There are use cases for this behavior but the most common use case is to receive all currently declared tokens as well as future declared tokens. This forces users to use a zenoh-ext QueryingLivelinessSubscriber.

Getting the current tokens is internally feasible. So it should be possible to add a with_current_tokens() (exact name to be defined) function to the LivelinessSubscriber constructor and avoid having to use a QueryingLivelinessSubscriber.

Note: there is a plan to Remove QueryingSubscriber and NBFTSubscriber and replace them with constructor options. This should be made accordingly.

OlivierHecart avatar Jun 11 '24 09:06 OlivierHecart