-
Notifications
You must be signed in to change notification settings - Fork 3
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
Requirement: Add Optional Acknowledgement for Event Subscription/Unsubscription success #29
Comments
+1 some way to know if subscribe/observe was successful. |
I'd suggest that if this is defined then it should just be a mandatory response from a Thing when subscribing to an event rather than be configurable by the Consumer, to avoid the complexity of additional conditional logic. If event subscriptions are acknowledged then there should probably also be acknowledgements of other asynchronous operations. Specifically, observing a property and invoking an action:
To follow this same pattern it would be tempting to re-use the E.g. {
"thingID": "https://mythingserver.com/things/mylamp1",
"messageType": "eventSubscription",
"event": "overheated",
"status": "subscribed",
"requestID": "123e4567-e89b-12d3-a456-426655",
"timestamp": "2021-11-10T11:43:20.135Z",
} {
"thingID": "https://mythingserver.com/things/mylamp1",
"messageType": "eventSubscription",
"event": "overheated",
"status": "unsubscribed",
"requestID": "123e4567-e89b-12d3-a456-426655",
"timestamp": "2021-11-10T11:43:20.135Z",
} Note that there is a * Which does raise the question of what happens if a |
Yes, makes sense.
Yes, agree
Yes, I’ve implemented it this way. The
Yes, I’ve implemented it this way. Sending an immediate |
I would also like to avoid to use the event message as an acknowledge.
Yes, I agree. Multiple subscriptions to the same event over a single WebSocket connection should not be allowed. However, I also use the messageId of the |
Description: Currently, when a Thing client (consumer) subscribes or unsubscribes to events from a Thing Server, the client typically has to wait until an error occurs or the first event is received before it can proceed with other actions that are dependent on the success or failure of the subscription/unsubscription.
This can be problematic for clients that require immediate feedback on the status of the subscription/unsubscription, as waiting for an event or an error might introduce unnecessary delays in their workflows.
Proposal: To improve this, it would be helpful if the protocol allows the consumer to define whether it expects an acknowledgment (ACK) from the Thing Server indicating whether the subscription or unsubscription was successful. This would enable the client to proceed with further steps without having to wait for the first event or potential error.
Suggested Changes:
Benefits:
The text was updated successfully, but these errors were encountered: