1

我想创建一个从 PERSEO CEP 到 Orion CB 的订阅,以便在属性更改时 Perseo Cep 抛出一个规则。如何使用这 3 个指令: - PERSEO_NOTICES_PATH='/notices', - PERSEO_RULES_PATH='/rules' - MAX_AGE

In - MAX_AGE 我想将它设置为永远持续很多年。

perseo-core: image: 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 前沿:

图片: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'
4

2 回答 2

1

在创建规则时,当我发送规则时,我有http://perseo-coreip:8080/perseo-core/rules并且它不正确,

正确的是:http://perseo-fe-ip:9090/rules,它的工作原理。

将规则存储在 mongodb 中并正确触发规则。

于 2019-05-22T09:41:39.203 回答
1

您可以在NGSIv2 API 演练中找到有关 CB 订阅的基本信息,并在NGSIv2 规范(“订阅”部分)中找到完整的详细信息。

在这种情况下,您必须将与 Perseo 对应的通知端点设置为通知端点。考虑到上面的配置PERSEO_ENDPOINT_PORTPERSEO_NOTICES_PATH它应该是这样的:

  ...
  "notification": {
    "http": {
      "url": "http://<perseohost>:8080/notices"
    },
  ...

编辑:也许端口是 9090 而不是 8080。不完全确定(9090 可能是 Perseo FE 中/notices的端口,而 8080 是 Perseo FE 用来与 Perseo Core 联系的端口)

于 2019-05-16T20:13:49.543 回答