MQTTV3Sample program
Reference information about sample syntax and parameters for the MQTTV3Sample program.
Purpose
The MQTTV3Sample program can be used to publish a message and subscribe to a topic. For information about how to get this sample program, see IBM MQ Telemetry Transport sample programs.MQTTV3Sample syntax
Parameters
- -h
- Print this help text and quit
- -q
- Set quiet mode, instead of using the default mode of false.
- -a
- Set publish or subscribe, instead of assuming the default action of publishing.
- -t
- Publish or subscribe to topic, instead of publishing or subscribing to the default topic
- -m
- Publish message text instead of sending the default publication text, "Hello from an MQTT v3 application".
- -s
- Set QoS instead of using the default QoS, 2.
- -b
- Connect to this host name or IP address instead of connecting to the default host name, localhost.
- -p
- Use this port instead of using the default, 1883.
Run the MQTTV3Sample program
To subscribe to a topic on Windows, use the command:run MQTTV3Sample -a subscribeTo publish a message on Windows, use the command:
run MQTTV3SampleParent topic: IBM MQ Telemetry Transport sample programs