Skip to content

Subscription id not available in the notification handler #1086

@MichelSc

Description

@MichelSc

I use version 2.16 of the iotagent-node-lib library.

The notification handler receives the device (OK) and the subscribed attributes (param data, OK):
function mockedHandler(device, data, callback)

But the subscription id is not available: NOK.

This is a problem. I could have for a same device different subscriptions (different conditions and/or different subscribed attributes). These different subscriptions have therefore different meanings and I want to implement a specific behavior for every of these different subscriptions for the same device. As the subscription id, which is present in the http request, is not made available in the notification handler, I cannot identify the subscription responsible for the received notification: NOK.

Note that the workaround of making 1 subscription for all notifications of a given device is not a solution:

  • I must write more code for aggregating the different subscriptions: code without value
  • it is not possible to add a new subscription, as I would need to update the aggregated subscription, and the latter is not possible due to issue Not possible to update a subscription #1085

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions