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

[fiware-stackoverflow] Orion context broker: check subscription expiration?

    Details

      Description

      Created question in FIWARE Q/A platform on 25-09-2015 at 13:09
      Please, ANSWER this question AT https://stackoverflow.com/questions/32781551/orion-context-broker-check-subscription-expiration

      Question:
      Orion context broker: check subscription expiration?

      Description:
      Is there any way to check if the orion subscription (attribute subscription, not context availability subscription) is currently active or expired? Something similar to discoverContextAvailability for context information.

      Example use case:

      I add a sensor device inside my application
      Register a context and a subscription for that device on Orion
      From that point subscription is running and returning sensor data to my application periodically
      Now, when the subscription expires the data simply stops coming

      What is the recommended way to extend this subscription?
      How can you know that it has expired in the first place?

      The only way I see it is to store the expiration date in my app after creating the subscription, and run a scheduled task to extend it on that date.

      Another way is to extend all subscriptions in fixed intervals (for example: make all subscriptions run for 2 months, and every month run the extension task).

      The best and easiest way would be to register subscriptions without duration (unlimited duration) but I don't see that option anywhere in the documentation.

      A similar problem exists with context registrations too, but I resolved it using the discoverContextAvailability method. Before each queryContext or updateContext I check if the context is expired with discoverContextAvailability. If it is I register it again and continue with query or update requests.

      I know there is subscribeContextAvailabilitybut it has the same problem like attribute subscriptions. Once it expires how do you know it has expired and how do you extend it?

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

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

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 15:19|CREATED monitor | # answers= 1, accepted answer= True
        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
        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

          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: