MQTT Web Client
The MQTT Web Client allows you to publish and subscribe to messages. It is part of the broker management web interface. After signing in, you navigate to the project and broker, that you want to use. Then you select "Publish & Subscribe" to start exchanging messages. First you have to connect to an existing client or create a temporary client for exchanging messages.
Connect to client
The following screen is initially shown:
Here you have the option to create a temporary client. This client is created in the background, will be removed periodically and has a "client" role assigned, to allow you to publish and subscribe. After creating it, the page changes to allow you to publish and subscribe messages.
If you want to connect to an existing client click on the "Select Existing Client" button.
There you have to select a client from the list of existing clients and enter the optional client id. Then enter the password for the client and click on "Connect". If the connection is confirmed, the publish and subscribe options become visible.
Subscribing to a topic
To subscribe to a topic you need to select or enter the topic first. You can either enter a topic in the "Subscribe" edit field or select one from the topic tree (see below), that is display when activating the subscribe field.
The topic tree lists the topics published to or subscribed to within a defined period of time. This period is defined by our broker configuration. The default is 1 hour.
After defining the topic, click on the "Subscribe" button. The topic is added to the subscriptions list. You can subscribe to more than one topic. Whenever a message to the subscribed topic is received, it will be added to the payloads of the topic. The payloads are listed in the section right next to the subscribed topics. The payload list shows the timestamp, QoS and value of the topic. Payloads are shown for the topic, that is selected in the list of subscribed topics on the left side.
If you wand to subscribe to all topics, then simply click on the "Subscribe to all Topics" button.
Publishing to a topic
To publish to a topic, you have to enter or select a valid topic like described above. You can select whether the topic should be retained and select the Quality of Service (QoS) level. Then enter the payload to send. There a two formatting options available. Either just plain text (raw) or Json. If you select Json, a Json editor is opened to support you with syntax problems. Whenever an invalid Json is detected an error hint is shown below the Json editor.
When you are done with defining the payload, push "Publish to" and the message will be published. If you subscribed to it, it should appear in the payload list of that subscribed topic immediately.