IBM App Connect Enterprise, Version 11.0.0.2 Operating Systems: Windows, Linux


MQTTPublish policy

Attach an MQTTPublish policy to one or more MQTTPublish nodes in a message flow to control the value of specific MQ Telemetry Transport (MQTT) publishing properties at run time.

You use the MQTTPublish node to publish messages that are generated in your message flow to a topic that is hosted on an MQTT server. The published messages are then delivered by the MQTT server to all topic subscribers. You can attach an MQTTPublish policy to an MQTTPublish node to control, at run time, how the node publishes messages to the MQTT server.

Note: MQTT policy documents are specific to the type of MQTT node. For example, you can attach an MQTTPublish policy to any instance of an MQTTPublish node, but not to an MQTTSubscribe node.

To attach an MQTTPublish policy to an MQTTPublish node, set the Policy property of the MQTTPublish node to the name of the policy, in the format {policyProjectName}:policyName. You must deploy this policy before the associated message flow is started.

The properties of this policy are described in the following table.
Table 1. Properties of the MQTTPublish policy
Property Property name in .policyxml file Value
Client ID clientId This property specifies the unique name of the client.

The client ID is a string of 1 - 23 characters that identifies an MQTT client to an MQTT server. If you specify a client ID that is longer than 23 characters, only the last 23 characters are used when the MQTT node connects to the MQTT server. Each client that is connecting to a single server must use a unique client ID. If a client attempts to connect to an MQTT server with a client ID that is already in use, the server disconnects the first client connection, and accepts the new connection instead. Therefore, at deployment time, you must ensure that any MQTT nodes that are connecting to the same server have unique client IDs.

Value type: String

Topic name topicName This property specifies the name of the MQTT topic where the MQTTPublish node publishes messages.

Value type: String

Host name hostName This property specifies the host name for the MQTT server where the MQTTPublish node publishes messages.

Value type: String

Port number port This property specifies the port number that is used to connect to the MQTT server. This property has a default port number of 1883.

Value type: Integer

Quality of service (QoS) qos This property specifies the quality of service level for the delivery of MQTT messages (see Quality of service and connection management). The following values are valid:
  • 0 (the default): Messages are delivered once at most, which is also known as "fire and forget".
  • 1: Messages are delivered at least once, which is also known as "acknowledged delivery".
  • 2: Messages are delivered exactly once, which is also known as "assured delivery".

Value type: Integer

Security identity (DSN) securityIdentity This property specifies the name of the security identity object that is created by the mqsisetdbparms command. The security identity contains the user ID and password that is used to authenticate the connection to the MQTT server (see mqsisetdbparms command).

Value type: String

Use SSL useSSL This property specifies whether the connection between the MQTTPublish node and the MQTT server is secured by using SSL (see Securing MQTT connections). This property has a default value of False, which means that SSL is not used.

Value type: Boolean


py00120_.htm | Last updated 2018-11-02 14:46:47