-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add 'once' to subscription options #270
Conversation
Signed-off-by: Zoltan Kis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems ok!
Just one question:
If |options|' |once| is
true
, invoke |subscription|'s
stop() method with |options|
This means that I can't use a different set of options for unsubscribing when using once parameter. Correct?
The use case with |
I am not totally opposed to this extension but
I tried to see what is necessary to do a one-time (or X-time) subscription (see variable
There might be better solutions. However, even this is not super complex and offers already the possibility to say subscribe 3 times by changing Note: the code snippet is not 100% correct since it does not use promises et cetera. |
Right, so the balance for supporting
Especially the first con looks bad, since introduces corner cases to the app. A convenience most of the time, when other subscribe options are not needed, but when they are needed, it cannot be used, so the app should be aware of what protocol binding is underneath, or otherwise there might be errors difficult to handle. Occam says get rid of it from this low-level API and let the apps or convenience wrappers implement |
Should I close without merging? |
@relu91 what is your opinion? |
The reason I brought this topic up is that most of the known event APIs support the So my final decision would be to drop this feature by now and reconsider later. Maybe when we have a fully stable subscription APIs. |
Scripting API Call, 2020-1012: |
Closing for now. |
FYI: just clicking on the enhancement label does not show this PR (given it is closed). I created a dedicated issue to not lose track of it, see #274 |
No description provided.