我想创建一个从PERSEO CEP到Orion CB的订阅,以便当属性更改时Perseo Cep抛出一个规则。如何使用这3个指令:- PERSEO_NOTICES_PATH='/notices',- PERSEO_RULES_PATH='/rules‘- MAX_AGE
In - MAX_AGE,我想把它设置为永远,或者很多年。
perseo-core:镜像: fiware/perseo-core主机名: perseo-core container_name: fiware-perseo-core depends_on:- mongo-db - orion网络:- smartcity端口:- "8080:8080“环境:- PERSEO_FE_URL=http://perseo-fe:9090 - MAX_AGE=9999
perseo-front:
图片来源: telefonicaiot/perseo-fe
image: fiware/perseo
hostname: perseo-fe
container_name: fiware-perseo-fe
networks:
- smartcity
ports:
- "9090:9090"
depends_on:
- perseo-core
environment:
- PERSEO_ENDPOINT_HOST=perseo-core
- PERSEO_ENDPOINT_PORT=8080
- PERSEO_MONGO_HOST=mongo-db
- PERSEO_MONGO_URL=http://mongo-db:27017
- PERSEO_MONGO_ENDPOINT=mongo-db:27017
- PERSEO_ORION_URL=http://orion:1026/
- PERSEO_LOG_LEVEL=debug
- PERSEO_CORE_URL=http://perseo-core:8080
- PERSEO_SMTP_SECURE=true
- PERSEO_MONGO_USER:"root"
- PERSEO_MONGO_PASSWORD:"example"
- PERSEO_SMTP_HOST=x
- PERSEO_SMTP_PORT=25
- PERSEO_SMTP_AUTH_USER=x
- PERSEO_SMTP_AUTH_PASS=x
- PERSEO_NOTICES_PATH='/notices'
- PERSEO_RULES_PATH='/rules'发布于 2019-05-17 04:13:50
您可以在NGSIv2 API walkthrough中找到有关CB订阅的基本信息,并在NGSIv2 Specification (“订阅”部分)中找到完整的详细信息。
在这种情况下,您必须将对应于Perseo的通知端点设置为通知端点。考虑到上面针对PERSEO_ENDPOINT_PORT和PERSEO_NOTICES_PATH的配置,应该是这样的:
...
"notification": {
"http": {
"url": "http://<perseohost>:8080/notices"
},
...编辑:可能的端口是9090而不是8080。不完全确定(9090可能是Perseo FE中的端口,/notices正在侦听,而8080是Perseo FE用于与Perseo Core联系的端口)
发布于 2019-05-22 17:41:39
在规则创建过程中,当我发送规则时,我使用了http://perseo-coreip:8080/perseo-core/rules,但它并不正确。
正确的做法是:http://perseo-fe-ip:9090/rules,这样它就可以工作了。
将规则存储在mongodb中,并正确触发规则。
https://stackoverflow.com/questions/56061395
复制相似问题