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

[BUG] ONCHANGE subscription sends notification when value under condition it is not updated #943

Closed
XavierVal opened this issue May 29, 2015 · 3 comments
Milestone

Comments

@XavierVal
Copy link
Contributor

Reported by @jframos
I have confirm that the notifications are sent when the attribute subscribed has not been modified.

Data to reproduce it:
Given this entity append (without Fiware/pahts headers):

 <?xml version="1.0" encoding="UTF-8"?>
<updateContextRequest>
    <contextElementList>
        <contextElement>
            <entityId type="region" isPattern="false">
                <id>qa_ok</id>
            </entityId>
            <contextAttributeList>
                <contextAttribute>
                    <name>sanity_status</name>
                    <type>string</type>
                    <contextValue>OK</contextValue>
                </contextAttribute>
                <contextAttribute>
                    <name>_timestamp</name>
                    <type>string</type>
                    <contextValue>333</contextValue>
                </contextAttribute>
            </contextAttributeList>
        </contextElement>
    </contextElementList>
    <updateAction>APPEND</updateAction>
</updateContextRequest>

And this subscription:

 {
     "entities": [
         {
             "type": "region",
             "isPattern": "true",
             "id": ".*"
         }
     ],
     "attributes": [
         "sanity_status"
     ],
     "reference": "http://x.x.x.x:1028",
     "duration": "PT10M",
     "notifyConditions": [
         {
             "type": "ONCHANGE",
             "condValues": [
                 "sanity_status"
             ]
         }
     ]
 }

When the entity updates the value "sanity_status" it is notified properly.
But if the "sanity_status" does not change but the "timestamp" does, CB sends the notification to the subscriber. CB should not send it if the "condValues" has not been updated, isn't it?

@kzangeli
Copy link
Member

kzangeli commented Jun 1, 2015

I tried to reproduce this issue but without any luck.
See PR #944

@fgalan fgalan added this to the 0.23.0 milestone Jun 2, 2015
@fgalan
Copy link
Member

fgalan commented Jun 16, 2015

We have been able to reproduce at the end in the branch o PR #944 (with new commits).

@XavierVal
Copy link
Contributor Author

Hunted bug confirmed and PR merged

fisuda pushed a commit to fisuda/fiware-orion that referenced this issue Feb 15, 2022
Cross notification HTTP header 'Ngsiv2-Attrsformat'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants