Administration

In addition to key information about your HiveMQ deployment, the HiveMQ Control Center provides quick access to several useful administrative functions.

Disconnect a Client

To disconnect a specific client, open the Clients overview of your control center and select the client that you want to disconnect. The Client Detail page opens.
On the Client Detail, select Disconnect Client.

disconnect client with disconnect button

A confirmation dialog opens.
To immediately disconnect the selected client and delete all session data, select Disconnect.
To publish the last will message of the client at disconnect, select Publish LWT.
If the client did not set a last-will message during connection establishment, the Publish LWT option is disabled.

Disconnect client


Remove a Client Session

To remove the session of a specific client, open the Clients overview of your control center. Select the client for which you want to end a persistent online/offline session. The Client Detail page opens.
On the Client Detail, select Remove Session.

remove client session

A confirmation dialog opens.

To immediately disconnect the selected client and delete all session data including queued messages and subscriptions, select Remove.

If the selected client is currently connected, the client is disconnected and allowed to publish a Will message before the session is removed.

Confirm remove session


Manage Subscriptions

To add or remove a subscription or shared subscription for a specific client, open the Clients overview of your control center. Select the client for which you want to manage subscriptions. The Client Detail page opens.

To add a regular subscription for the selected client, enter the topic name and the desired quality of service level in the Add Subscription to Client field. Select Add Subscription.
The subscription is immediately added.

To add a shared subscription for the selected client, enter the topic name, shared-group name, and the quality of service level in the Add Shared Subscription to Client field. Select Add Subscription.
The subscription is immediately added.

To remove an existing regular or shared subscription, click the symbol in the Unsubscribe column of the desired topic.

A confirmation dialog opens.

To immediately unsubscribe the client from the selected topic, select Unsubscribe.

Connection information
For more information on successful subscription management in your MQTT deployment, see our MQTT topic best practises.


Audit Log

Your HiveMQ audit log automatically records all administrative actions that occur in the control center. The audit log provides a single, unified log for tracking audit-relevant data. For more information and audit-log use cases, see audit log.


MQTT Best Practises

Here are some best practises for MQTT deployments that we have identified over many years of customer support:

Best Practice Explanation

Never use a leading forward slash

In MQTT, forward slashes separate the levels of a topic. Use of a leading forward slash introduces an unnecessary topic level at the start of the topic that does not contain any character.

Do not use spaces in a topic

Empty spaces can make it much harder to read and debug topics

Keep the topic short and concise.

Each topic is included in every message in which it is used. Extra characters or levels create undesirable overhead.

Use only ASCII characters (avoid non-printable characters)

Because non-ASCII UTF-8 characters often display incorrectly, it can be difficult to identify typos or issues related to the character set. Unless it is absolutely necessary, we do not recommend the use of non-ASCII characters in a topic.

Embed a unique identifier or the ClientId into the topic

It can be very helpful to include the unique identifier of the publishing client in the topic. The unique identifier in the topic helps you identify who sent the message. The embedded ID can be used to enforce authorization. Only a client that has the same client ID as the ID in the topic is allowed to publish to that topic.

Do not subscribe to #

Sometimes, it is necessary to subscribe to all messages that are transferred over the broker. For example, to persist all messages into a database. Do not use an MQTT client and subscribe to a multi-level wildcard. Frequently, the subscribing client is not able to process the load of messages that are the result. Our recommendation is to implement an extension in the MQTT broker. For example, use the HiveMQ plugin system to add an asynchronous routine to process incoming messages and persist them to a database.