-
Notifications
You must be signed in to change notification settings - Fork 265
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
Covered notifications in subscritpions #3693
Comments
Hi @fgalan Sir, I would like to work on this issue. Please assign this issue to me. |
Hi @fgalan Sir, As per my investigation, in this issue I’ve to add a new parameter field “covered” in subscription payload within notification as mentioned below with bolean type. First we have to correctly parse the new parameter in JSON request/response for subscription management operations of the REST API. For this a new parameter should be added to the notification class. |
@rajeswar-NEC thank you for your willingness to work in this issue! You have been assigned. I have read your understanding of the issue above and I think is correct. |
Hi @fgalan sir, Due to medical reason @rajeswar-NEC is not able to work on this issue. |
Hi @fgalan sir, I would like to work on this issue, please assign this issue to me. Thanks |
Thank you for your willingness to work on this issue! You have been assigned :) |
Hi @fgalan Sir, I have divided this issue into three parts:
Currently I have done first part of this issue and raised PR #4068 for the same. As per my understanding the code for getting attributes in notification are written in I have also tried to fixed this issue at mongoBackend and for this I have tried to add the logic in Could you please guide me which is the suitable place for fixing this issue. |
During the update logic at some point the code grabs matching subscriptions in either addTriggeredSubscriptions_withCache() or addTriggeredSubscriptions_noCache() depending the CB working mode. The grabbed subscriptions are stored in a map structure using TriggeredSubscription objects. Check if TriggeredSubscription already has the information you need about the notification attributes (maybe the |
Hi @fgalan sir, Fixed issue in my latest commit. Please review my PR and if it is ok then please merge it into master. Thanks |
Fix: Covered notifications in subscritpions #3693
…ications_prelanding Fix: Covered notifications in subscritpions #3693 (prelanding)
Currently, Orion notifications only include attributes that the entity actually has. For instance, if the subscription has
notification.attrs: [A, B, C]
but the entity only has A and B, C is not included in the notification.That's fine with most of the notification receiver. However, some receivers may benefit from notifications with always the same set of attributes, no matter which attributes has actually the entity or not.
Thus, the issue is about including a new subscription parameter
notification.covered
(*) of boolean type.false
Orion will work as now.true
then Orion will complete the notification with any missing attribute in the notification. These attributes will have valuenull
and type"None"
.The default value in case of omitting the field is
false
to ensure backward compatibilty.(*) covered in the sense the notification will cover completely the attributes in
notification.attrs
. However, suggestion for the name are welcome :)The text was updated successfully, but these errors were encountered: