First Steps
This is an onboarding guide for setting up your Pro Mosquitto cloud broker. To follow this guide, you will need an existing subscription or trial to access our Pro Mosquitto cloud broker. If you do not have a subscription yet, please create an account on our website and start a cloud trial. This trial can be used on the main broker overview page to get you started with the most important first steps.
This guide can also be used for first steps on the on-premise version of the Cedalo platform.
Create Your First Client Account
To connect to the broker, you need to create a Client Account. This account manages the authorization and authentication required for broker access. Follow these steps to set up your Client Account:
Step 1: Add a New Client Account
- In the sidebar navigation, go to the Security section and choose Client Accounts.
- Click the Add Client button to create a new Client Account.
Step 2: Set Up Client Account Details
- Name: Enter a name of your choice for this Client Account.
- Client ID: (Optional) Enter a specific Client ID to restrict access to this ID. Leaving this field empty allows the Client Account to connect using any Client ID, which is suitable for most use cases.
- Choose a Client Role:
- Select the client role from the dropdown to allow the account to publish and subscribe to all regular topics.
- You can define your roles under the Client Roles menu if needed.
- If you do not select a role, the Client Account will default to the default access control settings specified in the Client Roles menu. By default, these settings do not permit any publish or subscribe actions.
- Click the Save button to save the Client Account and set a password.
You can now use your Client Account to connect to the broker and manage your topics.
Subscribe to an MQTT Topic
Step 1: Open the Publish & Subscribe Tool
- In the sidebar navigation, go to the Tools section and select Publish & Subscribe.
- The Publish & Subscribe tool allows you to connect to the broker using your existing Client Accounts. Follow these steps to establish a connection and subscribe to topics.
Step 2: Connect to the Broker
- Enter the credentials for the Client Account you just created:
- Client Name: Enter the name you assigned to the Client Account.
- Client ID: (Optional) Enter the Client ID specified during setup.
- Password: Enter the password you defined during the Client Account creation process.
- Click the Connect button to connect with the broker.
Step 3: Subscribe to Topics
- In the Subscribe field, enter the specific topic you wish to subscribe to.
- Alternatively, you can Subscribe to all topics (#). Using
#
as a wildcard subscribes you to all incoming topics.
View Incoming Messages
- After subscribing, all incoming messages will appear in the bottom right corner of the screen.
Publish to an MQTT Topic
The Publish & Subscribe tool allows you to publish messages to specific topics.
Step 1: Select a Topic
- In the Publish to field, enter the topic you want to publish to. Ideally, you should use a topic that you have already subscribed to.
- Note: Unlike subscribing, you can only publish to one topic at a time.
Step 2: Define the Payload
- Enter any payload for your message. For a quick test, a simple "Hello world" message works well.
Step 3: Publish the Message
- Click the Publish button. The outgoing message will appear in the subscription field below.
- You can also set the Retain flag and define the Quality of Service (QoS) level for your message.
Connect an External Client
The Publish & Subscribe tool is pre-configured to connect to the broker. To connect an external client, follow these steps:
- Navigate to the Home page in the sidebar.
- Under the Connection section, find the Broker Domain field with the broker's URL.
- In the detail view, you will see the available ports. Click Copy to copy the connection string for a specific port.
Use the broker's URL and the Client Account credentials you just created to connect from an external client.