© Softing Industrial Automation GmbH
15
Chapter 4 - IT Settings
4.3 MQTT Broker Configuration
MQTT Introduction
The MQTT protocol knows the following peers:
1.
MQTT Broker
The MQTT Broker is the central instance in an MQTT network. The other participants establish each a TCP or
SLL/TLS connection to the broker. Depending on the MQTT Broker configuration an authentication with user
name and passwords or an SSL certificate is required. The MQTT Broker receives data from MQTT Publishers.
If an individual publisher does not have the required write permissions, the corresponding data is discarded
by the broker. Otherwise the broker provides the data to all MQTT Subscribers that have subscribed to this
data.
2.
MQTT Publisher
The MQTT Publisher creates the MQTT address space (topics) and fills this space with content (data). The
MQTT Publisher sends this data to the MQTT Broker. This is exactly the functionality of the MQTT Publisher
module implemented in the dataFEED Gateway.
3.
MQTT Subscriber
The MQTT Subscribers subscribe to MQTT Topics. For defining the subscribed topics the subscriber may use
the wild card characters
+
and
#
. This means that an MQTT Subscriber using the character
#
for a topic
subscription subscribes to all data from a broker.
The data format is not specified by the MQTT protocol specification but can be specified by the respective MQTT
Publisher. The dataFEED Gateway MQTT Publisher module uses strings as data format.
The
MQTT Broker Configuration
view allows to configure all settings for the connection to the MQTT Broker.
The following settings are provided:
MQTT Broker URI
The broker URI defines the MQTT Broker to be used by the dataFEED Gateway.
It is composed of the transport protocol, the Fully Qualified Domain Name (FQDN), consisting of the host
name and the domain name (see
https://en.wikipedia.org/wiki/Fully_qualified_domain_name
and optionally the port number.
The following transport protocols are supported:
o
tcp:/
/
MQTT uses plain TCP. Often MQTT Brokers offer this service at port 1883.
o
ssl://
MQTT uses SSL or TLS security upon TCP. Often MQTT Brokers offer this service at port 8883.
The
Hostname
is defined by the Fully Qualified Domain Name. Optionally it can be replaced by the
corresponding IPv4 or IPv6 address. (IPv6 addresses are identified by square-brackets).
Client ID
The client ID defined the identifier of the dataFEED Gateway.
The IDs of the various MQTT clients have to be unique for the respective MQTT Broker. If two MQTT clients
are using an identical ID, the connections of theses clients to the MQTT Broker are disconnected. For an
individual client, e.g. the dataFEED Gateway, there is no way to find out whether a specific client ID is
already used by another client or not.
The MQTT Broker configuration allows to determine specific client IDs, identifying the individual clients to
which a connection is accepted.
Clean Session
Some MQTT Brokers require the clean session flag for connecting. Use this check box to enable this feature.
Authentication
Depending on the MQTT Broker configuration the dataFEED Gateway may need to authenticate itself as an
MQTT Client using its user name and password. In this case select the radio button
Username and password
otherwise select the radio button
anonymous
. If user name and password authentication is selected the
user name and password have to be defined in the appropriate input fields. If necessary, define the
corresponding certificate files for this connection at
.
20