Skip to content

A Step-by-Step Guide to Using HiveMQ Cloud Starter

by Shashank Sharma
11 min read

We recently released HiveMQ Cloud Starter to address the demand for the fast and cost-effective scaling of IoT projects. HiveMQ Cloud is the first MQTT platform to provide a pay-as-you-grow solution with unlimited connections. This article series will guide IoT developers through the new offering to maximize the exciting features available in HiveMQ Cloud Starter. Here’s how to get going:

1. Sign-up for HiveMQ Cloud

If you are new to HiveMQ Cloud, it is very easy and free to sign-up. If you are an existing user, you can skip to part 2. New users can sign up via the HiveMQ Cloud webpage or HiveMQ pricing page. Choose a sign in option and provide a few details about yourself and your role.HiveMQ Cloud plansClick on Starter Plan to sign up.

How to sign-up for HiveMQ Cloud?Sign up using your work email or a preexisting account.

2. Create your Starter cluster

If you are a new user you will be redirected to the “Create Cluster” tab. Existing users can select “create new cluster” on the cluster overview page.

Configuring Your HiveMQ Cloud PlanThe yellow box highlights where you can create a unique cluster name.

  • Configure your cluster: The first step is to configure your cluster. This includes naming your cluster and selecting your tier and region.

    • The name will be part of the cluster URL and can be used to give context to the cluster, like “production” or “staging”

    • Currently the plan only offers eu-central as region, but additional regions will be announced soon

  • Add billing details: Once you’ve configured your cluster, you will be redirected to add your billing details. HiveMQ Cloud offers every new sign-up $100 in free credits upon the creation of the first cluster on Cloud Starter. These free credits are automatically applied. Your credit card is not charged until you use the free credits.

  • c. Now HiveMQ Cloud spins up a cluster with a dedicated broker for you.

HiveMQ Cloud clusterThe cluster is created and ready to be used in minutes.

3. Create your first credentials

MQTT credentials are authorization values (username and password) used to identify and authorize MQTT clients. They are sent to the MQTT broker during the connection process and are used to determine the client’s access rights. MQTT credentials are essential for securing MQTT client connections. Without them, anyone could connect to your MQTT broker and publish or subscribe to any topic they wanted. With credentials, you can control which clients can access your broker and what they can do once they are connected.

To get started you can create a credential with default roles and permissions. In this example, we created a credential “testuser” with default roles.

Create a credential “testuser” under the Access Management tab in HiveMQ CloudCreate a credential “testuser” under the Access Management tab.

Now you are ready to send messages through an established MQTT connection. We offer 12 different options based on your language preferences and programming skills. You can find our guided onboarding by clicking the “getting started " tab. Here we cover two ways to easily send your first messages - via Web Client and via MQTT Command Line Interface (CLI).

4. Send a message using Web Client

To quickly get started and test out your credentials, you can connect to the web client using the credentials you just created in the previous step.

MQTT client connection settingsThe yellow box highlights the status before clicking on the “connect client” button.

  • Click on “connect client” to establish a connection. The connection status is visible on the right-hand side. The client is connected once you see “web client connected” on the screen.

MQTT client connection settingsThe status turns to green once the web client connects to HiveMQ Cloud.

  • Subscribe to “mytopic/test” under Topic Subscriptions. We will use this test topic structure for both publishing and subscribing to messages.

MQTT topic subscriptionsAn overview of subscriptions is visible below the “Topic Subscriptions” section.

  • Publish to “mytopic/test” under Publish Message. Add “Hello World” to the message section and click on “publish”.MQTT Publish message

A table will appear below where you can see the corresponding message that you subscribe to along with the topic structure, timestamp, and the corresponding Quality of Service (QoS) level.Log of MQTT messages

5. Send a message using MQTT CLI

Another way to send a message is via MQTT CLI. You can access a customized guide under the Getting Started tab.Getting started with MQTT on HiveMQ CloudThe yellow box highlights the MQTT CLI getting started guide among the others available.

  • Install MQTT CLI: To install MQTT CLI simply follow the steps in the guide. For this demonstration we have installed MQTT CLI on Mac. Please skip this step if MQTT CLI is already installed on your system

  • Subscribe to “mytopic/test”: We use the following to subscribe to “mytopic/test”

<mqtt sub -h stepbystep-7rdgup.a01.euc1.aws.hivemq.cloud -p 8883 -s -u testuser -pw -t 'my/test/topic'>`

Sending a message using MQTT CLI from HiveMQ CloudPlease note that both the command above and the screenshot shows the unique credential name as well as the cluster name that we assigned earlier. Your customized onboarding guide will highlight the cluster name and the credentials that you create for yourself. Once you enter the command, you will be asked to enter the password for your credentials.

  • Subscribe “mytopic/test”: Now you can publish to the same topic. To create another client and send messages to your cluster, open a second terminal window (keep your original terminal window open). In this example we use the following command to send “Hello”:

<mqtt pub -h stepbystep-7rdgup.a01.euc1.aws.hivema.cloud -p 8883 -s -u testuser -pw -t 'my/test/topic' -m 'Hello’>

Two terminal windows exchanging messages via HiveMQ Cloud.The two terminal windows exchange messages via HiveMQ Cloud.

The message “Hello” appears immediately in the terminal window of the second MOTT client. You can also use the Web client to subscribe and MQTT CLI to publish and vice versa.

Next Steps

In this step-by-step guide we detailed how to create your Starter cluster, how to create credentials, and how to send your first message. HiveMQ Cloud Starter offers a lot in terms of security features, observability, data integrations, and programmatic workflows.

In the next part of this series, Managing MQTT Security on HiveMQ Cloud Starter, we will take a simple example and explore access credentials, roles, and permissions in detail.

Unlock the full potential of MQTT with HiveMQ Cloud Starter, a complete MQTT platform ideal for testing and small-scale production! Begin your free trial now and enjoy unlimited connections, 99.95% uptime SLA, 24/7 support, data streaming integrations, and more.

Sign-up now with Cloud Starter and grab $100 worth of free credits upon the creation of the first Starter cluster.

Sign-up Now

Shashank Sharma

Shashank Sharma is a product marketing manager at HiveMQ. He is passionate about technology, supporting customers, and enabling developer-centric workflows. He focuses on the HiveMQ Cloud offerings and has previous experience in application software tooling, autonomous driving, and numerical computing.

  • Contact Shashank Sharma via e-mail
HiveMQ logo
Review HiveMQ on G2