MQTT client settings

When creating new MQTT client from MQTTBox app, there are wide range of connection settings you can specify. Most of the settings are set by default to most used values, however you may still need to customize settings to test your MQTT clients as per you needs. This document explains each client setting attribute in details to better understanding client connection and in-fact MQTT protocol.

MQTT Client Name: Name to identify MQTT client and display on dashboard. It can be any string value.
e.g: client_test_1
Client Id: The client identifier is an identifier of each MQTT client connecting to a MQTT broker. It should be unique per client for given broker. The broker uses it for identifying the client and the current state of the client. It is auto generated by default. If you try to connect two MQTT clients with same client identifier, connection will be rejected by broker. When you open 2 instances of MQTTBox app, make sure you have unique client id's otherwise your clients will be rejected by broker and may show offline.
e.g: client_id_1
Append timestamp to MQTT client id?: If checked, timestamp will be appended to client Id. This is enabled by default. Many a times, users open multiple instances of MQTTBox app on same or different machines with same MQTT client settings including same client id unknowingly. This causes both client connections to be rejected by broker because of same client id. If this option is enabled, MQTTBox will append timestamp to every client id making it almost unique which helps you to save time debugging unnecessary issues.
Broker is MQTT v3.1.1 compliant?: If you are connecting to a MQTT broker that only supports older versions of MQTT protocol 3.1 or less (v3.1.1 is latest and current standard),you should un-check this option. By default it is checked and assumes MQTT broker is compliant with current MQTT standard v3.1.1 (or higher).
Protocol: Network protocol used by MQTT client to connect with MQTT broker.
MQTTBox supports TCP, SSL/TLS, MQTT, MQTTS, WebSockets(WS) and Secure WebSockets(WSS). Depending on the platform you are using MQTTBox app, all Protocol may not be supported because of platform limitations.
Please check here for list of MQTTBox features supported by each platform.
Host: MQTT host to connect. Make sure you specify right host and port number depending on MQTT connection protocol you selected. MQTT client may not get connected if you mention wrong port number or interchange port numbers.
Clean Session?: The clean session flag indicates the broker whether the client wants to establish a persistent session or not. If you need a persistent session, meaning, that the broker will store all subscriptions for the client and also all missed messages, when subscribing with Quality of Service (QoS) 1 or 2, un-check/No this option. By default this is checked or Yes, which means broker will start new session, won’t store anything for the client and will also purge all information from a previous persistent session.
Auto connect on app launch?: If you Check/Yes this option, client will try to connect to broker automatically when MQTTBox app is launched and can be in "Connected", or "Connection Error" state depending on if client was connected to broker or not. If un-checked/No this option, client will be in "Not connected" state and you need to manually connect client to broker.
You can connect,disconnect, reconnect MQTT clients from MQTTBox dashboard
Username: Username required by broker, if any. MQTT allows to send username for authenticating and authorization of client.
Password: Password required by broker, if any. MQTT allows to send password for authenticating and authorization of client. Please note, all passwords are saved in plain text. Make sure you never save production passwords inside MQTTBox app. Infact, all fields are saved as plain text, make sure you never save any sensitive information/settings inside MQTTBox app.
Reschedule Pings? If checked/yes, reschedules ping messages after sending packets.
Queue outgoing QoS zero messages: If checked/yes, If connection is broken between client and broker, client queue's outgoing QoS zero messages. All these messages will be published when connection is established.
Reconnect Period (in milliseconds): Interval between two reconnections
Connect Timeout (in milliseconds): Time to wait before a CONNACK is received
KeepAlive (in seconds): The keep alive is a time interval, the clients commits to by sending regular PING Request messages to the broker. The broker response with PING Response and this mechanism will allow both sides to determine if the other one is still alive and reachable. By default it is set to 10 seconds, set to 0 to disable.

Will Settings - The will message is part of the last will of MQTT Client. It allows to notify other clients, when a client disconnects ungracefully. A connecting client will provide his will in form of an MQTT message and topic in the CONNECT message. If this clients gets disconnected ungracefully, the broker sends this message on behalf of the client automatically.

Will Settings - Topic: The topic to publish will payload. A simple string, which can have hierarchically structured with forward slashes as delimiters.
e.g: topic_test_1 or home/kitchen/humidity
Will Settings - QoS: Publish payload with QoS set. By default it is 0.
Will Settings - Retain: Retain flag for will payload.
Will Settings - Payload: The message to publish when the client disconnects badly.

Publisher settings

Topic to publish: is the topic to publish to. A simple string, which can have hierarchically structured with forward slashes as delimiters.
e.g: topic_test_1 or home/kitchen/humidity
QoS: A Quality of Service Level (QoS) for this message. The level (0,1 or 2) determines the guarantee of a message delivered.
Retain: This flag determines if the message will be saved by the broker for the specified topic as last known good value. New clients that subscribe to that topic will receive the last retained message on that topic instantly after subscribing.
To delete retain message of topic, send a retained message with a zero byte payload on that topic.
Payload: This is the actual content of the message to publish to topic.

Subscriber settings

Topic: is a String topic to subscribe to.You can specify Single Level(+) and Multilevel(#) subscription to topics.
e.g: topic_test_1 or home/+/humidity or home/#
QoS: A Quality of Service Level (QoS) for this message. The level (0,1 or 2) determines the guarantee of a message delivered.


MQTT load test settings