Closed goten002 closed 2 hours ago
Thank you for your detailed report!
We would have a look as soon as possible.
PR #4612 solves this issue
@goten002 it would be great if you could have a look to the test/functionalTest/cases/4605_alterationtype_entityupdate_with_notifyonmetadatachange/alterationtype_entityupdate_with_notifyonmetadatachange.test file added in that PR and provide feedback, please. Step 01-03 are fully based in your issue report and step 04 is an extra addition. As a result, 3 notifications are sent (shown in step 05).
PR https://github.com/telefonicaid/fiware-orion/pull/4612 has been merged.
@goten002 it would be great if you could check if the issue has been solved and provide feedback, using the telefonicaiot/fiware-orion:latest
image at dockerhub.
We have just released Orion 4.1.0 which includes PR #4612 so we are closing this issue.
However, @goten002 your feedback would still be very valuable. The issue could be reopened if the solution is not correct.
@fgalan Thank you so much for addressing the issue. I’ve tested the functionality with the latest image, and everything seems to be working as expected now. I really appreciate all the work and the fix!
When using subscriptions in FIWARE Orion with the
alterationTypes
field set toentityUpdate
andnotifyOnMetadataChange
set tofalse
, the subscription does not behave as expected. Specifically, the notification fails to trigger when an entity is updated with changes in metadata, when the attribute values remain unchanged. This behavior suggests that the subscription is incorrectly ignoring updates that involve metadata changes while the attribute values stay the same.How to reproduce it
Create a subscription::
Create an entity
Update Attributes
Expected behavior Following the requests above the notification should be triggered twice: once when the entity is created, and once when the entity is updated, regardless of whether the metadata or the value has changed. Specifically, the update request should trigger the subscription because the
alterationTypes
field includesentityUpdate
. The subscription should react to any update operation, regardless of whether the attribute values change, as long as the update occurs, even ifnotifyOnMetadataChange
is set to false.Additional information Interestingly, if the update request is sent without metadata or if the
TimeInstant
metadata value remains the same as in the create request, the subscription triggers as expected. This suggests that the issue arises only when metadata changes are included in the update.