Developing Data Subscription Jobs


The EnOS Data Subscription service improves the performance of API calls with active data push. It supports multi-data source subscription, subscription task management, and calling the Data Subscription SDK. With this data subscription service, applications do not need to call APIs repeatedly and frequently to get asset data. greatly improving API performance and reducing costs.

Data Subscription Workflow

This article describes the steps to develop data subscription jobs in EnOS Cloud and EnOS Edge. The general use path is as follows:

_images/data_subscription_process.png

Note

EnOS Cloud supports the data subscription service for multiple OUs, each of which can create data subscription jobs with a maximum of 15.

Creating a Subscription Job

Procedure

  1. Log in to the EnOS Application Portal > Developer Console and select the Data Subscription module. On the Data Subscription page, click the New Subscription button to open the subscription configuration page.

  2. Select the data subscription type, which determines the data source to be subscribed to. For more information about the data source, see Configuration List.

  3. In the ID field, enter an ID for the subscription job or click Generate to use the system-generated ID. The supported Subscription ID format allows: English letters, numbers, underscores, and hyphens.

  4. From the SA drop down list, select the SA (service account) that is used for client and data authentication. Each subscription topic must have an associated SA. When an SA is deleted, the data subscription configuration will be automatically disabled. For more information about authorizing the SA account, see Getting the Service Accounts.

  5. Select a Message Channel for the subscribed data. Either real-time channel or offline channel is supported.

  6. In the Description field, enter a short description of the data subscription job.

  7. For the Clients section, choose the clients whose data you want to subscribe to based on the data access permission of the selected SA (associated with purchased applications).

  8. For different data subscriptions, complete the related data filtering configurations. When a subscribed data source (model or measurement point) is deleted, the system will keep the data subscription configuration, but an error message will be displayed, reporting that the configured data source is an unknown object.

Configuration List

Data source

Description

Message channel

Data filtering configuration

Time Series Data

Ingested from assets or generated after calculation (including real-time and offline data)

  • Real-Time

  • Offline

  • Model: Device Model
    • Organization Structure: Select organization Structure.

    • Model Filter: Filter by model ID/Name and point ID/Name.

    • Device Tags (optional): Add device tags (up to 5) to subscribe to real-time data from specified devices

Alert Data

Generated according to specific alert rules defined for real-time data

  • Basic Alert Service (V2.0)

  • Advanced Alert Service (V3.0)

  • Model Filter: the alert data of specific measurement points

  • Device Tags: the alert data of specific devices

  • Asset Tree Tags: the alert data of specific asset trees

Device Management Event

Events that happened within the EnOS IoT Hub service, such as device registration, deletion, topology relationship changes, OTA firmware upgrade, etc

None

Event Type Filter: Select subscribed event types for Asset model, Device assets, Logical assets, OTA firmware, OTA jobs (including specific events under each type).

Device Event Report

Event information reported by the device model in the EnOS IoT hub, including Info, Warn, and Error

None

  • Models: Select event data reported by specified models (multiple models can be selected)

  • Event type: Choose event types to subscribe to. If it is not selected, all event types will be subscribed

Enabling the Subscription Job

After the subscription job is configured, find the saved topic on the Data Subscription page, and click the Enable icon to run the subscription job. The data producer will start writing data on the topic.

Managing the Subscription Job

Editing the Subscription Job

You can edit a subscription job by clicking the edit button on the Data Subscription page. And save your configuration after editing.

Deleting the Subscription Job

You can choose to delete a subscription job on the Data Subscription page. Note that jobs in running status cannot be deleted and the deleted jobs cannot be restored.