简体   繁体   English

Fiware Orion MQTT 通知不工作(不再)

[英]Fiware Orion MQTT notification not working (anymore)

I don't know where to look anymore, maybe someone has an idea what's going wrong?我不知道去哪里看,也许有人知道出了什么问题?

I created an MQTT subscription on my Orion Context Broker:我在我的 Orion Context Broker 上创建了一个 MQTT 订阅:

{
"description": "Subscription to notify of all WaterQualityObserved changes",
"subject": {
    "entities": [{
        "idPattern": ".*",
        "type": "WaterQualityObserved"
    }],
     "condition": {
            "attrs": []
        }
},
"notification": {
    "mqtt": {
        "url": "mqtt://127.0.0.1:1883",
        "topic": "water-quality-observed-changed"
    }
}

} }

I have both my Orion Context Broker and Mosquitto MQTT broker running locally in Docker containers.我的 Orion Context Broker 和 Mosquitto MQTT 代理都在 Docker 容器中本地运行。 I get this when listing the subscriptions in my Orion CB:在我的 Orion CB 中列出订阅时,我得到了这个:

[
{
    "id": "633bf12fe929777b6a60242b",
    "description": "MQTT subscription to notify of all WaterQualityObserved changes",
    "status": "active",
    "subject": {
        "entities": [
            {
                "idPattern": ".*",
                "type": "WaterQualityObserved"
            }
        ],
        "condition": {
            "attrs": []
        }
    },
    "notification": {
        "timesSent": 3,
        "lastNotification": "2022-10-04T08:47:55.000Z",
        "attrs": [],
        "onlyChangedAttrs": false,
        "attrsFormat": "normalized",
        "mqtt": {
            "url": "mqtt://127.0.0.1:1883",
            "topic": "water-quality-observed-changed",
            "qos": 0
        },
        "lastFailure": "2022-10-04T08:47:55.000Z",
        "failsCounter": 3,
        "covered": false
    }
}

] ]

As you can see “timesSent” augments when I PATCH the entity.如您所见,当我 PATCH 实体时,“timesSent”会增加。

The strange thing is it worked before!奇怪的是它以前有效!

Any idea what I'm doing wrong?知道我做错了什么吗?

Thanks.谢谢。

Guy家伙

The "The strange thing is it worked before!" “奇怪的是它以前有效!” sentence make me think it has to do with connectivity between container.这句话让我觉得它与容器之间的连接有关。 I'd suggest to review all the involved connectivity (Orion -> MQTT broker, MQTT broker -> your MQTT subscriber).我建议检查所有涉及的连接(Orion -> MQTT 代理,MQTT 代理 -> 您的 MQTT 订阅者)。 If that doesn't help, a re-deploy of all the docker containers could help.如果这没有帮助,重新部署所有 docker 容器可能会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM