Tag Definition Tab

You subscribe to the tags here and configure the MQTT messages that the MQTT broker (server) is to send to PCo.

Use

On this tab, you define the tags of the MQTT broker (server) that you want to monitor. Moreover, you configure the template for the MQTT messages that are to be sent from the MQTT broker (server) to the source system in PCo to transfer the tag values.

Configure the Subscription

Subscription Settings

Field

Description

Selected Subscription

The tags that you want to monitor are grouped together in one subscription. You can create a subscription here with default settings by choosing Create Subscription.

You can delete the currently selected subscription by choosing Delete Subscription.

You can select an existing subscription from the dropdown box.

Subscription Name

The name of the selected subscription is displayed here. You can change the name.

Topic Filter

In this field, you enter the name of the topic filter to which the selected subscription belongs.

There is a 1:1 relationship between a topic filter and a subscription.

Each time the MQTT server publishes a message for this topic filter, that is, sends a message to PCo, the system checks whether the topic matches the topic filter. If this is the case, the MQTT source system receives the message, parses it, and inserts the tag values in the assigned subscription.

A topic filter is a non-empty UTF-8 string. The topic filter is used to filter topic names.

The topic filter of a subscription can contain special wildcard characters that allow a client to subscribe simultaneously to several topics.

You can use single-level (+) and multilevel wildcards (#):

  • The # character is a multilevel wildcard that corresponds to any number of levels within a topic.

  • The plus sign (+) is a single-level wildcard that can be used on every level in the topic filter.

For more information, see Wildcards in the Topic Filter.

QoS

Quality of service: To make sure that a sent message reaches the recipient, MQTT defines three different quality of service (QoS) levels with which a message can be sent:

  • 0 - At Most Once

    This service quality level is suitable for transferring sensor data. Messages might be lost. The message reaches the recipient at most once.

  • 1 - At Least Once

    This service quality level ensures that the message reaches the recipient. The recipient might receive the message more than once.

  • 2 - Exactly Once

    This level makes sure that the message reaches the recipient exactly once.

Payload Type

Specifies the format of the MQTT messages. The following formats are supported:

  • JSON

  • XML

  • URL-Encoded

  • Formatted String