MQTTSubscribe node
Use the MQTTSubscribe node to subscribe to published data from your message flow.
Purpose
Use the MQTTSubscribe node to receive messages that are published to a topic, on an MQTT server, to which you are subscribed. The message is sent only once.
For more information about MQTT, see MQTT.
The MQTTSubscribe 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 MQTTSubscribe node in a message flow
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 MQTTSubscribe node
Configure the MQTTSubscribe 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 |
---|---|
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. |
Catch | The output terminal to which the message is routed if an exception is thrown downstream and caught by this node. Exceptions are caught only if this terminal is attached. |
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, MQTTSubscribe. | 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 subscribes 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 |
---|---|---|---|---|
Message domain | No | Yes | The name of the domain that is used to parse the incoming message. To enable this property, select a value from the drop-down list or specify a user-defined parser.
The data can be reparsed with a different parser at any point in the flow by using the ResetContentDescriptor node, or by using a parse clause in a Compute node. |
|
Message model | No | Yes | The name of the schema file, or the name or identifier of the message set, in which the incoming message is modeled. To enable this property, set the Message domain property to DFDL or XMLNSC and select a schema file, or set the Message domain property to MRM or IDOC and select a message set. Only message models that are contained in your Integration project, or are contained in a referenced application or library, are available for selection. Qualify this property by specifying a library name if the name of your schema file, or the qualified message name that you selected in the Message property, is not unique within the referenced resources. |
|
Message | No | Yes | The namespace qualified name of the incoming message. To enable this property, set the Message domain property to DFDL or MRM and select a message model. Only message names from the selected message model are available for selection. |
|
Physical format | No | Yes | The physical format name of the incoming message, as specified in the message set. To enable this property, set the Message domain property to MRM or IDOC. |
Property | M | C | Default | Description |
---|---|---|---|---|
Parse timing | No | Yes | On Demand | The timing of when the input message is parsed. The following values are available:
The difference in behavior between the Immediate and Complete values occurs when MRM validation is enabled. |
XMLNSC Parser Options | No | Yes | You can customize the XML parser by selecting any of the following options:
|
|
Opaque elements | No | Yes | The elements that you want to parse opaquely. These elements are not referenced by the message flow. You can add, edit, and delete these elements. Note: If validation is enabled in the Validation tab, no opaque parsing is performed. Any entries in the Opaque elements table are ignored.
|
Property | M | C | Default | Description |
---|---|---|---|---|
Validate | No | Yes | None | The type of validation that you want to use. The following values are available:
Note: If validation is enabled, no opaque parsing is performed. Any entries in the Opaque elements table are ignored
|
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. |