Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-9094

[fiware-stackoverflow] Orion - pattern subscription to send multiple updates

    Details

      Description

      Created question in FIWARE Q/A platform on 13-11-2015 at 11:11
      Please, ANSWER this question AT https://stackoverflow.com/questions/33690740/orion-pattern-subscription-to-send-multiple-updates

      Question:
      Orion - pattern subscription to send multiple updates

      Description:
      I use Orion to send updates to Proton-CEP when a change of an object occurs.

      However, I have many such objects updates occurring every few seconds. So I send these updates to Orion in batches, like this:

      {
      "contextElements": [
      {
      "type": "Queue",
      "isPattern": "false",
      "id": "Queue.routes_queue",
      "attributes": [

      { "name": "volume", "type": "integer", "value": "3" }

      ]
      },
      {
      "type": "Queue",
      "isPattern": "false",
      "id": "Queue.optimizer_queue",
      "attributes": [

      { "name": "volume", "type": "integer", "value": "4" }

      ]
      }
      ],
      "updateAction": "APPEND"
      }

      I have a subscription which is supposed to send these event (when the volume has changed) to CEP for processing.

      {
      "entities": [

      { "type": "Queue", "isPattern": "true", "id": "Queue.*" }

      ],
      "attributes": [
      "volume"
      ],
      "reference": "http://<cep-host>:8080/ProtonOnWebServer/rest/events",
      "duration": "P1M",
      "notifyConditions": [

      { "type": "ONCHANGE", "condValues": [ "volume" ] }

      ],
      "throttling": "PT1S"
      }

      CEP is configured to listen to these events, and write them to a file. Unfortunately, only the first element is written.

      I have confirmed that this is not a CEP problem by using the provided accumulator-server script. I can see only a single update being exposed:

      POST http://localhost:1028/accumulate
      Content-Length: 741
      User-Agent: orion/0.24.0 libcurl/7.19.7
      Host: localhost:1028
      Accept: application/xml, application/json
      Content-Type: application/xml

      <notifyContextRequest>
      <subscriptionId>5645bb21abde60e23096acef</subscriptionId>
      <originator>localhost</originator>
      <contextResponseList>
      <contextElementResponse>
      <contextElement>
      <entityId type="Queue" isPattern="false">
      <id>Queue.routes_queue</id>
      </entityId>
      <contextAttributeList>
      <contextAttribute>
      <name>volume</name>
      <type>integer</type>
      <contextValue>4</contextValue>
      </contextAttribute>
      </contextAttributeList>
      </contextElement>
      <statusCode>
      <code>200</code>
      <reasonPhrase>OK</reasonPhrase>
      </statusCode>
      </contextElementResponse>
      </contextResponseList>
      </notifyContextRequest>
      =======================================

      ::1 - - [13/Nov/2015 10:29:05] "POST /accumulate HTTP/1.1" 200 -

      Can Orion send updates for all elements that have changed?

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        2h 54m 1 Backlog Manager 22/May/17 6:10 PM
        In Progress In Progress Closed Closed
        3h 1 Backlog Manager 22/May/17 9:10 PM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        fla Fernando Lopez made changes -
        Assignee Backlog Manager [ backlogmanager ]
        fla Fernando Lopez made changes -
        HD-Enabler Orion [ 10875 ]
        HD-Chapter Data [ 10838 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 21:12|UPDATED status: transition Finish| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 21:12|UPDATED status: transition Finish| # answers= 1, accepted answer= True
        backlogmanager Backlog Manager made changes -
        Resolution Done [ 10000 ]
        Status In Progress [ 3 ] Closed [ 6 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 18:12|UPDATED status: transition Answer| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 18:12|UPDATED status: transition Answer| # answers= 1, accepted answer= True
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 15:18|CREATED monitor | # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 15:18|CREATED monitor | # answers= 1, accepted answer= True
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            backlogmanager Backlog Manager
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: