Examples are given to describe how to connect and consume MQ messages via MQTT.fx.
Add a message queuing service instance and create a topic and subscription.
In this example:
Instance name: mq-for-test, topic name: topic-test, and subscription name: test-sub
Open MQTT.fx client and go to the configuration page.
Set Profile Name, i.e. MQ in this example.
Set access address and port, username and password, where:
username is set as instance name and password is shown in Access Authentication, Here is an example of password:
version=2018-10-31&method=sha1&sign=%2FRdtyYy4l27DUwFKl74sqZelmV0%3D&res=mqs/mq-for-test&et=1564718131
Click SSL/TLS to proceed to the encryption settings.
Select CA certificate file to import a certificate
Click OK to finish the configuration.
Click the arrow down icon to select profile MQ.
Click Connect to connect to the message queuing service.
Select Subscribe configuration and enter a subscription name. The rules for naming your subscription are as follows:
$sys/pb/consume/$instance nam/$TOPIC/$SUB
In this example, the subscription name is:
$sys/pb/consume/mq-for-test/topic-test/test-sub
Select QoS1 and click Subscribe to finish MQTT subscription.