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:

MQTTPublish node

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

The MQTTPublish node terminals are described in the following table.
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).

The Description properties for the MQTTPublish node are described in the following table.
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.
The Basic properties for the MQTTPublish node are described in the following table.
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.
The Validation properties for the MQTTPublish node are described in the following table.
Property M C Default Description
Validate No Yes Inherit The type of validation that you want to use. The following values are available:
  • None: Does not validate the message.
  • Content and Value: Validates the message content and value checks, such as whether the value conforms to data type, length, range, and enumeration.
  • Content: Validates the content and message composition.
  • Inherit: Uses all the validation options that are provided with the input message tree in preference to any supplied on the node. Inherit therefore resolves to None, Content, or Content and Value. If Inherit is selected, the other validation properties on the tab are not 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:
  • User Trace: Logs all validation failures to user trace, even if user tracing of the message flow is not requested. Use this setting if you want processing of the message to continue regardless of validation failures.
  • Local Error Log: Logs all validation failures to the system log. Use this setting if you want processing of the message to continue regardless of validation failures.
  • Exception: Throws an exception on the first validation failure. If you asked for user tracing of the message flow, the failure is also logged in the user trace and validation stops. Use this setting if you want processing of the message to halt as soon as a failure happens.
  • Exception List: Throws an exception if validation failures happen, but only when the current parsing or writing operation completes. If you asked for user tracing of the message flow, each failure is also logged in the user trace and validation stops. Use this setting if you want processing of the message to halt if a validation failure occurs, but you want to see the full list of failures.
The Monitoring properties for the MQTTPublish node are described in the following table.
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.

Notices | Trademarks | Downloads | Library | Support

Copyright IBM Corporation 2016 Copyright IBM Corporation 2016.

		
		Last updated
		
	Last updated : 2016-07-30 06:30:51


Reference topicReference topic | Version 1.0.0.2 | ma00450