Skip to main content
Version: Next

MQTT Web Client

Publish & Subscribe is the in-browser MQTT test client for this broker. Use it to connect a client, subscribe to topics, publish payloads, and inspect received messages.

Publish & Subscribe landing

Open Publish & Subscribe

  1. Open a project, then open a broker.
  2. In the broker sidebar under TOOLS, click Publish & Subscribe.

The page title is Publish & Subscribe. Until a client is connected, the page shows connection choices and the note You have to first connect your client to be able to publish and subscribe.

Connect a temporary client

The fastest way to try the page is to create a temporary Dynamic Security client and connect it:

  1. Click Create temporary client and connect.
  2. Wait until the button changes to Disconnect and the client fields show a username such as pf_pubsub_….
Connected temporary client
note

Temporary clients are created for this session. Prefer them for quick tests so you do not need an existing password. For production-style tests, use a real client account with the right ACLs (see below).

Connect with a selected client

To connect as an existing Dynamic Security client:

  1. Click Select existing client.
  2. Choose a client from Client (or type a username if no clients are listed).
  3. Optionally set Client ID.
  4. Enter the client Password.
  5. Optionally click on advanced settings to enter additional authentication details.
  6. Click Connect.
Select existing client

When the session is up, the button changes to Disconnect and the selected username stays in Client.

Connected with selected client
note

The client must have a password set and roles/ACLs that allow the topics you subscribe to and publish on. Not authorized errors usually mean the role or ACLs need adjustment under Client Accounts or Client Roles. Optional Advanced settings (TLS certificate, protocol, port, CA) are available on this form when you need them.

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.

Publish a message

  1. Under Publish New Message, enter the topic in Publish to (for example docs/pubsub/test).
  2. Enter a Payload (raw text or JSON).
  3. Optionally enable Retain and set QoS.
  4. Click Publish to.

On success, the platform shows Message to Topic: "…" was published! The message appears under Published Messages. If you are subscribed to the same topic, it also appears under Payloads.

Published message and payloads

Wildcards (#, +) are not allowed in publish topics.

Select a topic from the Topic Tree

Instead of typing a publish topic, you can pick one from the broker’s live Topic Tree:

  1. Click the Publish to field so it is focused.
  2. A Topic Tree popover opens under (or above) the field, with Published Topics and Subscribed Topics.
  3. Expand path segments as needed, then click a topic row.

The selected topic fills Publish to, and the popover closes. Enter a payload and click Publish to as usual.

Topic Tree selection on Publish to

The same Topic Tree picker is available on the Subscribe field.

Subscription monitor overlay

While at least one topic is subscribed, the broker header shows a chip such as 1 Subscription (or N Subscriptions).

  1. Click 1 Subscription (or N Subscriptions) in the broker header.
  2. A right-hand overlay opens with the active client name, a Disconnect control, Subscribed Topics, and Payloads.
Subscription monitor overlay

The overlay stays available as you move to other broker pages (for example Home), so you can keep watching payloads without staying on Publish & Subscribe. Click the chip again to hide it. When the last subscription is removed, the chip disappears and the overlay closes.

Disconnect

Click Disconnect to close the MQTT session. Publish and subscribe controls return to the disconnected state. You can connect again with Create temporary client and connect or Select existing client.

note

If the page cannot reach a public broker connection, follow Go to settings on the error and fix the connection on broker Home. Not authorized errors usually mean the client role or ACLs need adjustment under Client Accounts / Roles.