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

FIWARE.Question.Tech.Data.OrionContextBroker.HowToCheckSubscriptionExpiration

    Details

      Description

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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        12d 7h 25m 1 Fermín Galán 07/Oct/15 10:30 PM
        In Progress In Progress Answered Answered
        6s 1 Fermín Galán 07/Oct/15 10:30 PM
        Answered Answered Closed Closed
        1s 1 Fermín Galán 07/Oct/15 10:30 PM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        mev Manuel Escriche made changes -
        HD-Enabler Orion [ 10875 ]
        HD-Chapter Data [ 10838 ]
        oriondev TID Orion Developer made changes -
        Summary FIWARE.Question.Lab.Orion context broker: check subscription expiration? FIWARE.Question.Tech.Data.OrionContextBroker.HowToCheckSubscriptionExpiration
        fermin Fermín Galán made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        fermin Fermín Galán made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        fermin Fermín Galán made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        mev Manuel Escriche made changes -
        Assignee Fermín Galán [ fermin ]
        mev Manuel Escriche made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2015-09-25 15:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2015-09-25 15:05|CREATED monitor | # answers= 0, accepted answer= False
        backlogmanager Backlog Manager created issue -

          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: