MQTTPublish node
Use the MQTTPublish node to publish data from your message flow.
Purpose
Use the MQTTPublish node to publish a message to a topic on an MQTT server.
For more information about MQTT, see MQTT.
The MQTTPublish node is contained within the MQTT drawer of the message flow palette, and is represented in the IBM Integration Toolkit by the following image:
Using the MQTTPublish node in a message flow
The MQTTPublish node publishes the data from message flow. You can subscribe to this published data by using an MQTTSubscribe node, see MQTTSubscribe node.
Before you can use MQTT, you must complete the postinstallation step to set up MQTT, see Completing the postinstallation steps for IBM Integration Bus Manufacturing Pack.
Configuring the MQTTPublish node
Configure the MQTTPublish node by modifying the properties.
Multiple execution group scaling with the same BAR file is not supported. Additional instances of a message flow in a single execution group is supported.
All mandatory properties for which you must enter a value (properties that do not have a default value defined) are marked with an asterisk in the user interface.
Terminals and properties
Terminal | Description |
---|---|
In | The input terminal that accepts a message for processing by the node. |
Failure | The output terminal to which a message is routed if an error occurs during processing. |
Out | The output terminal to which a message is routed if the record is written successfully. The message is unchanged except for status information in the Local Environment. |
The following tables describe the node properties. The column headed M indicates whether the property is mandatory (a mandatory property is marked with an asterisk if you must enter a value when no default is defined); the column headed C indicates whether the property is configurable (you can change the value when you add the message flow to the broker archive (BAR) file to deploy it).
Property | M | C | Default | Description |
---|---|---|---|---|
Node name | Yes | No | The node type, MQTTPublish. | The name of the node. |
Short description | No | No | A brief description of the node. | |
Long description | No | No | Text that describes the purpose of the node in the message flow. |
Property | M | C | Default | Description |
---|---|---|---|---|
Client ID | Yes | Yes | The unique ID of the MQTT client. Provide a unique name of a 1 - 23 byte string for the MQTT client connection. For more information, see MQTT Protocol Specification. | |
Topic name | Yes | Yes | The name of the MQTT topic that the node publishes to. Levels in the hierarchy are delimited by the forward slash (/) character; for example, Hypertension/Alert. For more information, see MQTT Protocol Specification. | |
Host name | Yes | Yes | The host name for the MQTT server; for example, localhost. | |
Port | Yes | Yes | 1883 | The port number to use to connect to the MQTT server; for example 1883. |
Property | M | C | Default | Description |
---|---|---|---|---|
Validate | No | Yes | Inherit | The type of validation that you want to use.
The following values are available:
|
Failure action | No | Yes | Exception | The action to take if the message flow is invalid.
The default value is Exception unless
the value of Validate is
either Content or Content and Value, in which case
the following values are available:
|
Property | M | C | Default | Description |
---|---|---|---|---|
Events | Yes | Yes | Events that you define for the node are displayed
in this tab. By default, no monitoring events are defined on any node in a message flow. Use Add, Edit, and Delete to create, change, or delete monitoring events for the node. For more information, see Configuring monitoring event sources by using monitoring properties in the IBM Integration Bus documentation. You can enable and disable events that are shown here by selecting or clearing the Enabled check box. |