-
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
needsActualChange subscription field to implement "always-notify" at subscription side #3439
Comments
This functionality would be very useful for the projects I work on: theese projects are business intelligence dashboards that receive the data using notifications. The source of the data are third-party projects. |
very good and thanks for this post |
Hi @fgalan |
@rajeswar-NEC thank you for your willingness to work on this! You have been assigned. |
Hi @fgalan As per #3439 issue, we have to change the notify configurations for below mentioned API’s, Mentioning the some of the requests effect with the above functionality and will notify with respect to "needsActualChange" field. POST /v2/op/update?options=forcedUpdate First we have to correctly parse the new field in JSON request/response for subscription management operations of the REST API. For this a new field should be added to the subject class. |
@rajeswar-NEC I think your description above is mostly correct. However, I have one doubt. What do you mean by "Below requests need to be updated" and the list of requests (all them with |
Hi @fgalan sir,
First this new field The new parameter at JSON API level should be parsed correctly and stored correctly in the DB. A new field name should be defined for that in dbConstants in subscription creation and update operations. After above parts get completed, by using this new field I have to implement it's functionality so that notifications associated to the subscription will be as per this issue. |
@ArqumFarooqui-NEC thank for your willingness to work on this! Your analysis is mostly correct. My only comment is that the new field will be stored not only in the DB but also in the csubs cache. |
Hi @fgalan sir, I have started the fixing this issue and about ~30-40% code had been fixed. But currently I am busy in some other priority tasks since last 1 month approx., Due to which I have put this issue on-hold for sometime and I will resume work on this issue as soon as another task get completed. |
FYI, NGSI-LD has always-notify as default (and only) behavior. Then an issue arrived: So, I implemented "no-notify-on-no-real-change", using a global switch (CLI). Now, to the point: The fix isn't difficult, I just rendered the old compound value and the new compound value to two char buffers and then I did a strcmp on them. |
This is covered by the Thus, the issue is going to be closed as solved. |
Issue #3389 covers "always-notify" from the point of view of the update request. However, it is also make sense to set it at subscription level, i.e. a subscription configured with "always-notify" will consider every update operation as an actual update, no matter if the attribute were actually changed or not.
It could be done using a new boolean field
needsActualChange
withincondition
. By default, this field is set to true (for backward compatibility reasons). If set to false then all updates associated to that subscription are interpreted always as actual updates, no matter if the attribute were actually changed or not.Eg:
The text was updated successfully, but these errors were encountered: