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

FIWARE.Question.Tech.Data.OrionContextBroker.OrionPatternSubscriptionToSendMultipleUpdates

    Details

      Description

      Created question in FIWARE Q/A platform on 13-11-2015 at 11:11
      Please, ANSWER this question AT http://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

        Hide
        backlogmanager Backlog Manager added a comment -

        2015-11-13 12:05|CREATED monitor | # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2015-11-13 12:05|CREATED monitor | # answers= 1, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2015-11-13 15:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2015-11-13 15:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2015-11-13 18:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2015-11-13 18:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2015-11-13 21:05|UPDATED status: transition Finish| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2015-11-13 21:05|UPDATED status: transition Finish| # answers= 1, accepted answer= True

          People

          • Assignee:
            fermin Fermín Galán
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: