BLASTA

MQTT broker load testing template

MQTT v3.1.1 and v5 connect handshakes with the CONNACK checked, plus reconnect-storm ramps.

Category MessagingStack Any MQTT brokerJobs 16

About this MQTT broker load test

Load tests an MQTT broker (Mosquitto, EMQX, HiveMQ, VerneMQ): MQTT 3.1.1 and 5 connect handshakes with the CONNACK checked, a TCP accept-only test and a reconnect-storm ramp. It models thousands of devices reconnecting at once after an outage.

It holds 16 ready-made jobs: 4 single scenarios and an enterprise test plan of 12 stages to run in order, 8 of them with pass/fail targets (SLOs). Each job is a plain request pattern you can change before running.

Scenarios include CONNECT v3.1.1, CONNECT v5, reconnect storm ramp and TCP accept only.

How to load test MQTT broker

  1. Open the template in BLASTA.
  2. Set host to point at your own MQTT broker system, ideally a staging copy.
  3. Pick a job and choose the rate and duration.
  4. Start the run and watch requests per second, latency percentiles and errors live; the result is saved to your history.

What you set before running

host
Broker host name
port
MQTT port (1883; 8883 is TLS and is not supported here)

Test scenarios (4)

CONNECT v3.1.1

Read-only

A real MQTT CONNECT (clean session) with the 'connection accepted' CONNACK checked: the cost of every device reconnect. Every request uses the same client id, so a broker that enforces unique ids will drop the previous connection: that is the session-takeover path, and it is expected.

CONNECT v5

Read-only

MQTT 5 CONNECT with empty properties. Only the CONNACK packet type is checked: a v5 CONNACK carries a variable-length property list, so its reason code cannot be matched byte for byte. A broker without v5 support closes the connection or answers with another packet, counted as a failure.

reconnect storm ramp

Read-only

Ramps connections per second to find the accept ceiling: the fleet-reconnect after a broker restart or network blip.

TCP accept only

Read-only

Connection accept with no MQTT traffic: kernel and listener backlog.

Enterprise test plan (12)

Run in order: smoke, baseline, load, stress, spike, soak, breakpoint and failover window, each with pass/fail targets.

MQTT broker (Mosquitto / EMQX / HiveMQ / VerneMQ): 01 smoke

Read-only

Enterprise plan, step 1 of 10. One request a second for 30 seconds. Run this first, every time: it proves the address, credentials and headers are right and that the environment is up before any real load is applied. Gate: zero errors. Reference request: CONNECT v3.1.1.

MQTT broker (Mosquitto / EMQX / HiveMQ / VerneMQ): 06 spike (10x in 10 s)

Read-only

Step 6 of 10. Reaches ten times average within 10 seconds and holds for 2 minutes: a campaign email, a news link, a failover. Checks autoscaling, queue limits and load shedding. Gate: at most 5% errors, because shedding load is acceptable and crashing is not. Reference request: CONNECT v3.1.1.

Frequently asked questions

What does the MQTT broker load test cover?

The MQTT broker template has 16 jobs: 4 single scenarios and an enterprise test plan of 12 stages (smoke, baseline, load, stress, spike, soak, breakpoint and failover window). Scenarios include CONNECT v3.1.1, CONNECT v5, reconnect storm ramp and TCP accept only. 8 of them have pass/fail targets (SLOs), so a run can be judged against limits you set.

How do I load test MQTT broker with BLASTA?

Open the template in BLASTA and set host, then pick a job and start it. Results stream live: requests per second, latency percentiles and errors, and the run is kept in your history. To run from the command line, use blasta preset new mqtt with your address.

Is it safe to run the MQTT broker load test against production?

All 16 jobs in this template are read-only: they request pages or data and do not change anything. Even so, a load test can slow a live system down, so start with a low rate and prefer a staging copy. Only test systems you own or have permission to test.

Related templates

Run a load test

Point BLASTA at something you own, choose how hard to hit it, and press Start test. Results stream in live.

1 What do you want to test? Use a template

Request headers

2 How hard should it hit?

Advanced limits
Pass / fail targets (SLO) optional
The result is marked SLO met or SLO missed. The same targets live in a job file, where blasta run exits 2 on a miss so CI or Kubernetes can gate a release.

Set up this job

Quick check

Please confirm you are not a robot to start your free test.

Clear history

Delete every finished test in your history. Tests still running are kept. This cannot be undone.

Add identity provider

Add user

The account is active at once. Share the password with them securely; they can change it from their menu.

Sign in to use templates

Templates and test history are part of the full app. Sign in, or create a free account, to use them.

Sign inCreate account

Change password