> ## Documentation Index
> Fetch the complete documentation index at: https://docs.antryk.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MQTT Brokers

> Deploy fully managed MQTT brokers on Antryk with secure authentication, scalable infrastructure, automated management, regional deployments, and production-ready messaging for IoT applications.

## What is an MQTT Broker?

An MQTT Broker is the central messaging server that enables communication between IoT devices, applications, sensors, and services using the lightweight MQTT (Message Queuing Telemetry Transport) protocol.

The broker receives messages from publishers and delivers them to subscribed clients, providing efficient, low-bandwidth communication for connected devices.

With Antryk MQTT Brokers, you can deploy production-ready MQTT infrastructure in minutes while Antryk manages provisioning, networking, security, and operational reliability.

***

## MQTT Broker Features on Antryk

* Fully managed MQTT broker deployments
* Multiple MQTT broker version support
* Secure username and password authentication
* Regional broker deployments
* Secure access control
* Connection information dashboard
* Scalable plans for development and production
* Simplified broker administration
* Secure credential management
* Production-ready infrastructure

***

# Deploy an MQTT Broker

<img src="https://mintcdn.com/antryk/dkmFQylRVusXmZEw/images/mqtt-deploy-one.png?fit=max&auto=format&n=dkmFQylRVusXmZEw&q=85&s=90f6dc81c14255edf022433092ff1ec9" alt="MQTT Deploy Form One" width="1338" height="992" data-path="images/mqtt-deploy-one.png" />

<img src="https://mintcdn.com/antryk/dkmFQylRVusXmZEw/images/mqtt-deploy-two.png?fit=max&auto=format&n=dkmFQylRVusXmZEw&q=85&s=885c6829739a8abcdf52288a0ff55338" alt="MQTT Deploy Form Two" width="1251" height="893" data-path="images/mqtt-deploy-two.png" />

Deploying an MQTT Broker on Antryk takes only a few simple steps.

## Step 1: Choose Broker Type

From the deployment dashboard:

1. Click **Create Broker**
2. Select Type of Broker For Example, **Mosquitto MQTT Broker**

***

## Step 2: Select Broker Version

Choose the Mosquitto version you want to deploy.

Example versions may include:

* Mosquitto 2.0
* Mosquitto 2.1
* Latest Stable

Using the latest stable version is recommended for new deployments to receive the latest features, performance improvements, and security updates.

***

## Step 3: Configure Broker Settings

Enter your MQTT broker configuration details.

### Broker Configuration Fields

| Field       | Description                        |
| ----------- | ---------------------------------- |
| Broker Name | Name of your MQTT broker           |
| Username    | Administrator username             |
| Password    | Secure password for authentication |

### Example Configuration

```bash theme={null}
Broker Name: production-mqtt
Username: mqtt_admin
Password: ********
```

***

## Step 4: Select Deployment Region

Choose the deployment region closest to your devices or applications.

Available regions include:

* USA
* ASIA
* EUROPE

Selecting the nearest region reduces latency and improves message delivery performance.

***

## Step 5: Configure Access Control

Antryk provides flexible broker access management.

### Option 1: Allow Specific IP Addresses

Restrict broker access to trusted IP addresses only.

Example:

```bash theme={null}
192.168.1.25
203.0.113.42
```

### Option 2: Allow All IPs

Allow MQTT connections from all IP addresses.

> Recommended only for development or temporary testing environments.

***

## Step 6: Select a Plan

Choose an MQTT Broker plan based on your workload.

Plans may vary depending on:

* CPU
* Memory
* Storage
* Concurrent Connections
* Network Performance

***

## Step 7: Deploy Broker

After completing the configuration:

1. Review all settings
2. Click **Deploy Broker**

Antryk automatically provisions your MQTT Broker and prepares it for secure client connections.

***

# MQTT Broker Overview Page

The **Overview** page provides all essential connection details for your deployed MQTT Broker.

<img src="https://mintcdn.com/antryk/dkmFQylRVusXmZEw/images/mqtt-overview.png?fit=max&auto=format&n=dkmFQylRVusXmZEw&q=85&s=438a6bb42ef410c18064c859c46b2415" alt="MQTT Broker Overview Page" width="1527" height="955" data-path="images/mqtt-overview.png" />

## Available Information

### Broker Endpoint

The hostname used by MQTT clients.

Example:

```bash theme={null}
test.ap-south-1.ds.onantryk.com
```

### Port

Common MQTT ports include:

```bash theme={null}
1883
```

For secure MQTT over TLS:

```bash theme={null}
8883
```

### Username

Authentication username for broker access.

### Password

Secure credentials used for MQTT authentication.

***

# MQTT Broker Settings Page

<img src="https://mintcdn.com/antryk/dkmFQylRVusXmZEw/images/mqtt-settings.png?fit=max&auto=format&n=dkmFQylRVusXmZEw&q=85&s=1ceab0518594d96b815917a9bddd29d8" alt="MQTT Broker Settings Page" width="1457" height="958" data-path="images/mqtt-settings.png" />

The **Settings** page allows you to manage your broker configuration and security.

## Available Settings

### Change Broker Password

Rotate authentication credentials securely.

### Rename Broker

Update the broker name without redeploying.

### Update Access Control

Modify IP allowlists or enable/disable public access.

### Delete Service

Permanently remove the MQTT Broker deployment.

> Warning: Deleting a service permanently removes the broker configuration.

***

# Security Features

Antryk MQTT Broker deployments include enterprise-grade security controls.

## Built-In Security

* Username and password authentication
* IP-based access control
* Secure TLS support
* Credential management
* Secure infrastructure isolation
* Encrypted client connections

***

# Common MQTT Broker Use Cases

MQTT Brokers power a wide variety of real-time messaging applications.

## Popular Use Cases

* IoT device communication
* Smart home automation
* Industrial IoT (IIoT)
* Vehicle telemetry
* Remote monitoring systems
* Sensor data collection
* Real-time notifications
* Connected healthcare devices
* Smart agriculture
* Edge computing

***

# Connecting to an MQTT Broker

Use the connection details available on the Overview page to connect your applications or devices.

## Node.js Example

```javascript theme={null}
const mqtt = require("mqtt");

const client = mqtt.connect("mqtt://username:password@broker.example.com:1883");

client.on("connect", () => {
  console.log("Connected to MQTT Broker");

  client.subscribe("devices/temperature");

  client.publish("devices/temperature", "25°C");
});

client.on("message", (topic, message) => {
  console.log(`${topic}: ${message.toString()}`);
});
```

***

## Python Example

```python theme={null}
import paho.mqtt.client as mqtt

broker = "broker.example.com"
port = 1883

client = mqtt.Client()

client.username_pw_set("username", "password")

client.connect(broker, port)

print("Connected to MQTT Broker")

client.publish("devices/temperature", "25")

client.loop_start()
```

***

# MQTT Topics Example

MQTT uses topics to organize messages.

Example topics:

```text theme={null}
devices/temperature
devices/humidity
factory/machine01/status
factory/machine01/alerts
home/livingroom/light
```

Subscribers automatically receive messages published to the topics they subscribe to.

***

# Best Practices

## Recommended Production Configuration

* Restrict broker access using IP allowlists
* Use strong authentication credentials
* Enable TLS whenever possible
* Rotate credentials regularly
* Deploy in the closest region to connected devices
* Monitor active client connections
* Organize topics with a consistent naming structure

***

# Why Choose MQTT Brokers on Antryk?

Antryk simplifies MQTT infrastructure management so developers can focus on building connected applications instead of managing messaging servers.

## Benefits

* Fast MQTT broker deployment
* Simplified operations
* Secure infrastructure
* Regional deployments
* Low-latency messaging
* Production-ready performance
* Developer-friendly management
* Built for scalable IoT workloads
