【发布时间】:2015-01-26 09:12:31
【问题描述】:
我正在尝试为 OrionCB 中现有实体的属性创建订阅。
网址 http://130.206.80.120:1026/NGSI10/subscribeContext
方法 发布
标题 内容类型:application/xml
身体
<?xml version="1.0"?>
<subscribeContextRequest>
<entityIdList>
<entityId type="finesce_meteo" isPattern="false">
<id>finesce_meteo</id>
</entityId>
</entityIdList>
<attributeList>
<attribute>precip</attribute>
</attributeList>
<reference>http://localhost:5050/notify</reference>
<duration>P100Y</duration>
<notifyConditions>
<notifyCondition>
<type>ONCHANGE</type>
<condValueList>
<condValue>precip</condValue>
</condValueList>
</notifyCondition>
</notifyConditions>
<throttling>PT5S</throttling>
</subscribeContextRequest>
此操作检索 200 个 OK 标头代码,带有以下正文:
<subscribeContextResponse>
<subscribeResponse>
<subscriptionId>54c5f049286043784451d08b</subscriptionId>
<duration>P100Y</duration>
<throttling>PT5S</throttling>
</subscribeResponse>
</subscribeContextResponse>
问题是当我尝试检查它是否已创建时。当我尝试列出订阅时,它不会出现。我正在使用这条线:
echo 'db.csubs.find().pretty()' | mongo orion
但是如果我用 unsubscribeContextRequest 删除这个订阅,我会得到 200 OK 代码。它表明此订阅存在。
订阅存在(因为它创建和删除都正常),并且在我列出订阅的任何时候都没有出现,这种情况很少见。
请问有什么问题吗?
我正在尝试启动这个 whit cygnus 进程,然后停止与 cygnus 相同的进程,获得相同的结果。
问候
【问题讨论】:
-
请编辑您的问题以显示启动 Orion Context Broker 的命令行,通常是
ps ax | grep contextBroker命令的结果。 -
[root@orioncb ~]# ps ax | grep contextBroker 6889 pts/1 S+ 0:00 grep contextBroker 28707 ? Ssl 672:56 /usr/bin/contextBroker -port 1026 -logDir /var/log/contextBroker -pidpath /var/log/contextBroker/contextBroker.pid -dbhost localhost -db orion
标签: mongodb fiware fiware-orion fiware-cygnus