Skip to main content
Skip table of contents

MQTT Connector: Functionality and Operation

The adapter combines the functionality of the MQTT Subscriber and Publisher and thus enables the following:

  • to subscribe to a topic in an MQTT broker

  • to publish messages in an MQTT broker

Properties

Operation

Operation performed by the adapter

Possible values:

  • Publish: Publish a message in an MQTT broker

Parameters

Adapter

Main adapter class (do not change!)

Possible values: de.softproject.x4.plugins.adapter.MqttPublishAdapter: Main class (Default)

clientId

ID of the client with which the message is published

Possible values:

Client ID (integer)

The parameter clientId can also be set in the configuration file.

During X4 Server startup, the subscriber clients are registered with their current workspace (e.g. 1) and projectName (e.g. ESBProject_1).

workspace

This parameter is set automatically with the information contained in the configuration file.

projectName

This parameter is set automatically with the information contained in the configuration file.

clientTimeout

Value for how long the client connection should be maintained or after what time the connection should be disconnected in seconds.

The parameter clientId can also be set in the configuration file.

Possible values: Integer greater than 0

cleanSession

Determines whether or not data is deleted after a session.

The parameter cleanSession can also be set in the configuration file.

Possible values:

  • true

  • false (default)

server

Protocol, host and port for the connection from the client to the broker.

Possible values:

  • tcp://hostname:port: If no SSL/TLS connection is used.

  • ssl://hostname:port: If a SSL/TLS connection is used.

This parameter is not required if the clientId is defined in the configuration file or if the values for the clientId have already been used to establish a connection.

loginUsername

User name used to establish a connection to a broker that requires access data.

Possible values: Any string with the user name , e.g. user

This parameter is not required if the clientId is defined in the configuration file or if the values for the clientId have already been used to establish a connection.

loginPassword

Password used to establish a connection to a broker that requires access data.

Possible values: Any string with the password , e.g. p4ssw0rd

This parameter is not required if the clientId is defined in the configuration file or if the values for the clientId have already been used to establish a connection.

keystorePath

Path to Keystore. If no SSL/TLS configuration is required to establish a connection to the broker, the parameter value can be empty.

Possible values: File path

This parameter is not required if the clientId is defined in the configuration file or if the values for the clientId have already been used to establish a connection.

keystorePassword

Password for the keystore specfied for KeystorePath.

Possible values: Any string

This parameter is not required if the clientId is defined in the configuration file or if the values for the clientId have already been used to establish a connection.

Status values

1

The operation was executed successfully.

-1

There was an error while connecting, disconnecting, publishing or subscribing

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.