MQTT
Use the MQTT job type to schedule the running of publish and subscribe actions on topics managed by an MQTT message broker.
A description of the job properties and valid values are detailed in the context-sensitive help in the Dynamic Workload Console by clicking the question mark (?) icon in the top-right corner of the properties pane.Attribute | Description and value | Required |
---|---|---|
server | The host name of the workstation where the MQTT server is installed. | ✓ |
port number | The TCP/IP port number of the workstation where the MQTT server is listening. | ✓ |
use SSL | The version of the SSL cryptographic protocols that you want to use. Default value is None. | |
user name | The user to be used for accessing the MQTT server. | Required, depending on your MQTT server. |
password | The password to be used for accessing the MQTT server. | Required if you specify a user name. |
keystore file path | The fully qualified path of the keystore file containing the private key that is used to make the connection. | Required, depending on your MQTT server. |
keystore file password | The password that protects the private key and is required to make the connection. | Required only if you specify a keystore file path. |
client id | The unique identifier of the MQTT client that you use to communicate with your MQTT server. The client id is used by the server to store data that is related to the client. | Required, depending on your MQTT server. |
timeout | The amount of time, in seconds, that the job waits for the connection to the MQTT server. Default is 30 seconds. | |
topic | The topic to subscribe to on the MQTT server. Special characters and wildcard characters are supported that allow you to subscribe to multiple topics at the same time. For the set of characters that are supported and the specific instructions about topic subscription, see your MQTT server documentation . | ✓ |
QoS | The quality of service. Defines how hard the
server or client tries to ensure that a message is received. You can
specify:
|
✓ |
subscribe | Select this option if you want to subscribe to a specified topic on the MQTT server. | |
publish | Select this option if you want to publish a message to a topic on the MQTT server. | |
MQTT message | The message that you want to publish to a topic on the MQTT server. | Required if you select the publish option. |
Scheduling and stopping a job in HCL Workload Automation
You schedule MQTT jobs by defining them in job streams. Add the job to a job stream with all the necessary scheduling arguments and submit it.
You can submit jobs using the Dynamic Workload Console, Application Lab, or the conman command line.
After submission, when the job is running and is reported in EXEC status in HCL Workload Automation, you can stop it if necessary by using the kill command. This action also stops the program execution on the MQTT server.
Restarting a job
If the HCL Workload Automation agent stops when you submit the MQTT job, or while the job is running, if it is a subscribe action the job restarts automatically as soon as the agent restarts, and tries again to receive a message.
Job properties
You can see the job properties by running conman sj <job_name>;props, where<job_name> is the MQTT job name.
The only property that you can find in the Extra Information section of the output command is the text of the message received by the subscribe action.
You can also export the text of the message received by the subscribe action to a successive job, in the same job stream instance. For more information, see Table 14.
Job log content
You can see the job log content by running conman sj <job_name>;stdlist, where <job_name> is the MQTT job name.
See also
From the Dynamic Workload Console you can perform the same task as described in
For more information about how to create and edit scheduling objects, see