MQTTSubscribe policy
Use an MQTTSubscribe policy to control the value of specific MQ Telemetry Transport (MQTT) subscription properties at run time.
An MQTTSubscribe policy can be used to control the values of a specific set of MQTTSubscribe node properties, called operational properties, at run time. If a policy is attached to an MQTTSubscribe node, the property values that are specified in the policy are used at run time. These values override the property values that were specified when the message flow was developed. For information about which operational properties can be controlled by an MQTTSubscribe policy, see the MQTTSubscribe node reference topic.
- IBM Integration Toolkit
- Use the IBM Integration Toolkit to generate a policy document from an existing message flow node. The initial policy document contains the node's operational properties and the current values of those properties, as defined in the Properties view of the Message Flow editor. The operational property values can be edited as required, and the generated policy document can be saved in the Integration Registry. You can also use the IBM Integration Toolkit to attach and detach policies on the node. For more information, see Configuring MQEndpoint, MQTTSubscribe, or MQTTPublish policies with the IBM Integration Toolkit.
- Web user interface (UI)
- Use the web UI to create, retrieve, update, and delete policy documents that are stored in the Integration Registry. In the navigation tree, expand Save As function enables you to save an existing policy with a new name.
You can also use the message flow view to retrieve and update a policy that is attached to a message flow node. In the navigation tree, expand Message Flows, and select the name of the message flow, or subflow, you want to view. Select the Operational Policy tab from the top of the message flow pane, and the message flow, or subflow, is displayed in the Node Policies section. If the message flow, or subflow, includes a node that has an operational policy attached, the following policy icon is displayed on the upper-right corner of the node icon: . Click the policy icon to retrieve and update the policy document.
, where server_name is the name of your integration server, and resource is where you stored your message flow. Then, expandFor information about accessing the web UI, see Accessing the web user interface.
followed by the policy type; for example, expand to see the list of saved policies that relate to nodes. Select a policy name to view the contents of the policy document, and edit the property values as required. The - Representational State Transfer (REST) application programming interface (API)
- Use the REST API to create, retrieve, update, and delete policy documents in the Integration Registry. For more information, see Representational State Transfer (REST) API.
- Command line
- Use the following commands to create, retrieve, update, and delete policy documents:
- To create a policy, use the mqsicreatepolicy command. For more information, see Creating and importing policies.
- To retrieve details of a policy, use the mqsireportpolicy command.
- To update a policy, use mqsichangepolicy command.
- To delete a policy, use the mqsideletepolicy command.
<policy type="MQTTSubscribe">
<policyProperties>
<description>
<shortDesc>Subscribe 01</shortDesc>
<longDesc>MQTT subscribe policy for blood pressure monitor</longDesc>
</description>
<basic>
<clientId>Sub_bloodpressure_1</clientId>
<topicName>Hypertension/Emergency</topicName>
<hostName>localhost</hostName>
<port>1883</port>
<qos>0</qos>
</basic>
</policyProperties></policy>