Skip to main content
Version: Next

MQTT Web Client

The Publish & Subscribe tool is the built-in MQTT web client in the Platform UI. Use it to publish and subscribe to topics on a broker without installing an external MQTT client.

After signing in, open the project and broker you want to use. In the sidebar, go to Tools and select Publish & Subscribe. You then connect with an existing client account or create a temporary client for the session.

Connect to client

When you open the Publish & Subscribe tool, you can create a temporary client or connect to an existing one.

To use a temporary client, create it on the connect screen. The platform creates the client in the background, removes it periodically, and assigns the client role so you can publish and subscribe. After creation, the publish and subscribe controls become available.

To connect to an existing client, click Select Existing Client.

Select a client from the list, enter the optional client ID and password, then click Connect. Click Advanced to set additional authentication parameters such as certificate details, protocol, and port.

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 want to subscribe to all topics, click Subscribe to all Topics.

High-volume topic subscriptions

In MQTT, the broker delivers every message that matches a subscription to that client. Topics with a very high publish rate—or broad filters such as # on a busy broker—can send thousands of messages per second to a single subscriber. The Publish & Subscribe tool renders each message in the browser, so such a subscription can overload the session, the broker, and the network. This is especially risky on High Performance (HP) clusters where throughput is already high.

In the Admin Board → Settings, platform administrators can block subscriptions to configured topics in the web client or warn users before they subscribe.

When blocking is enabled, subscription attempts to restricted topics are rejected in the Publish & Subscribe tool. When warning is enabled, users must confirm before subscribing to those topics.

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.