-
Notifications
You must be signed in to change notification settings - Fork 43
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
Exception using subscriptions in a mixed environment (LD and V2) #1649
Comments
ok, that definitely sounds like a stupid bug I need to fix. |
Thank you for your attention! I realised that it is sufficient to have a registered subscription and then query V2 API curl -X POST -H 'fiware-service: test' -H 'fiware-servicepath: /#' -H 'content-type: application/ld+json' -d '{
"description": "Notify me of all product price changes",
"type": "Subscription",
"entities": [{"type": "Product"}],
"watchedAttributes": ["price"],
"notification": {
"format": "keyValues",
"endpoint": {
"uri": "http://tutorial:3000/subscription/price-change",
"accept": "application/json"
}
},
"@context": "https://smartdatamodels.org/context.jsonld"
}' http://localhost:1026/ngsi-ld/v1/subscriptions` and then: curl -H 'fiware-service: test' http://localhost:1026/v2/subscriptions
curl: (52) Empty reply from server I hope this helps |
That should really help. Thanks! |
So, I implemented a functional test for this. I used mongo v3.6 and what I have in the develop branch right now. No error.
(I tried both with and without the |
Forget the comment about not being able to reproduce. |
Environment
orion-ld:1.6.0
mongo:3.6
Description
We are using orion-ld in an environment where there are components using the V2 part and others using the LD part.
Recently we realised that when we have both ‘V2-type’ and ‘LD-type’ subscriptions in the same NGSI-Tenant, the call to /v2/subscriptions throws an exception that crashes orion-ld.
The error output is:
terminate called after throwing an instance of ‘mongo::MsgAssertionException’ what(): wrong type for field (_id) 2 != 7
In the same NGSI-Tenant, the call to the LD endpoint is executed correctly.
If no LD subscriptions are present the V2 endpoint responds correctly.
The text was updated successfully, but these errors were encountered: