Validate Message Transfer for a HiveMQ Cloud Broker
After you verify a successful client-broker connection, you can use the WebClient built-in to the platform to validate that the client can subscribe to topics and publish messages to topics routed by the broker. Continue using the Test Connection UI to confirm that messages transfer over the same WebSocket on port 8884 that you used to test the connection between the client and the broker.
Before You Begin
-
Confirm that your HiveMQ Cloud broker is
Running. -
If you disconnected from your broker, reconnect to it as described in Verify a HiveMQ Cloud Broker-WebClient Connection.
Run the Default Messaging Test
-
In Test your connection, scroll down to Messages.
-
In Messages, click Subscribe to all messages.
Your Topic Name and QoS level appear at the top of Test Connection as a row with a
deleteaction available. -
In Messages, click Send a test message.
-
In Messages, confirm that
Topic:Hello QoS:0 MQTTappears in Messages.
Subscribe to Additional Test Topics
-
To receive all messages, in Topic Subscriptions, click Subscribe.
Test Connection ships with the
#wildcard preselected as a default. -
To subscribe to additional topics:
-
Remove
#. -
Type a different wildcard character or topic name in Topic Name.
-
Click Subscribe.
Your Topic Name and QoS level appear at the top of Test Connection as a row with a
deleteaction available. The number next to Topic Subscriptions tracks each subscription that you add or delete.
-
-
Optionally, repeat the previous substeps to subscribe to additional topics.
Create a Non-Default Test Message and Send It
-
In Send Message:
-
In Message, replace
Your messageby typing characters such astest message. -
In Topic, type a topic name such as
test topic. -
In QoS, accept the default level 0 or select a higher level.
The web client subscribes to all topics with Quality of Service level 0 by default.
-
-
Click Send Message.
The number next to Send Message tracks each message that you send in each test session.
Confirm
-
In Messages, confirm that your test topic shows your test message with the selected QoS level.
The number next to Messages increments each time you send a message. The current number represents the number of messages sent in the current session.
-
Optionally, in Messages click Clear all messages to clear the test messages published in the current session.
Next Steps
Use Control Center to monitor activity on your broker during and after your testing. For instructions, see Confirm that your HiveMQ Cloud Broker runs.
For More Information
-
For more information about MQTT over WebSockets, see the HiveMQ MQTT Essentials: MQTT over WebSockets.
-
For more information about publishing and subscribing, see Publish/Subscribe Architecture.