Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow AdvancedSubscriber to detect AdvancedPublisher going away #1669

Open
skreborn opened this issue Dec 13, 2024 · 2 comments
Open

Allow AdvancedSubscriber to detect AdvancedPublisher going away #1669

skreborn opened this issue Dec 13, 2024 · 2 comments
Labels
new feature Something new is needed

Comments

@skreborn
Copy link

skreborn commented Dec 13, 2024

While AdvancedSubscriber::detect_publishers allows to manually subscribe to the liveliness of an AdvancedPublisher, this requires the user to keep around and manually synchronize the incoming messages from both.

@skreborn skreborn added the new feature Something new is needed label Dec 13, 2024
@OlivierHecart
Copy link
Contributor

If I understood well the issue. You would like to receive both data and liveliness events in the same callback or stream. This is something you can already do on top of Zenoh.
The problem with this is that you need to change the type of 'event' received by the callback or stream to a type (enum typically) that can handle both data and liveliness. This would dealign Subscriber and AdvancedSubscriber APIs and complexify the AdvancedSubscriber API for every user (even ones that don't care about liveliness). For those reasons we will probably not do this in Zenoh API.

@skreborn
Copy link
Author

Indeed, the increased API complexity by introducing an enumerated type is a perfectly valid reason not to add this directly into the callback/stream. While I personally wouldn't mind the dissonance between the plain Subscriber and the AdvancedSubscriber, I understand that the less differences are, the easier it is for developers to understand the library and use it correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Something new is needed
Projects
None yet
Development

No branches or pull requests

2 participants