Subscription to CB working but not visible

心已入冬 提交于 2019-12-01 20:52:43

Note that you are running Orion in multiservice mode. Thus, entities/attributes/subscriptions are separated by tentant/services completely isolated in different databases at MongoDB layer. In particular, note that the subscribe context request is using Fiware-Service: fiwarefinal so the subscription is created in the "fiwarefinal" service (associated to the orion-fiwarefinal DB).

Thus curl http://localhost:1026/v2/subscription will not show any subscription, as the subscrition query is resolved in the default tenant (associated to the orion database). The same for echo 'db.csubs.count()' | mongo orion --quiet. In order to get the subscription list (or count in DB) for the "fiwarefinal" service you should use:

  • curl --header 'Fiware-Service: fiwarefinal' http://localhost:1026/v2/subscription
  • echo 'db.csubs.count()' | mongo orion-fiwarefinal --quiet

Note that you also need to use Fiware-Service: fiwarefinal in the unsubscribe context operation if you want to remove subscription in the "fiwarefinal" tenant/service.

Please find, more information about multiservice mode and how it relates with DB level.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!