AWS IoT Device SDK C:
MQTT
MQTT 3.1.1 client library
|
Return to main page ↑ |
Configuration settings of the MQTT tests.
Configuration settings are C pre-processor constants. They can be set with a #
in the config file (define
iot_config.h
) or by using a compiler option such as -D
in gcc. If a configuration setting is not defined, the library will use a "sensible" default value (unless otherwise noted). Because they are compile-time constants, a library must be rebuilt if a configuration setting is changed.
The settings on this page only affect the MQTT tests. In addition to the settings on this page, them MQTT tests will also be affected by settings that affect all tests.
The MQTT client identifier to use for the tests.
No two clients may connect using the same client identifier simultaneously. If this setting is undefined, the tests will generate a unique client identifier to use.
Possible values: Any string representing an MQTT client identifier. MQTT client identifiers may be subject to certain constraints; for example, servers are not obligated to accept client identifiers longer than 23 characters or client identifiers containing non-alphanumeric characters.
Default value (if undefined): The tests will generate a unique client identifier if this setting is undefined.
Test the MQTT library against the a Mosquitto test server.
When this setting is 1
, the MQTT tests will be built to test against an unsecured a Mosquitto test server. This allows the MQTT library to be tested against a fully-compliant MQTT server. Because the connection is unsecured, no credentials are needed for testing against Mosquitto. A Mosquitto test server may also be installed locally.
Possible values: 0
(use AWS IoT MQTT server) or 1
(use public Mosquitto server)
Default value (if undefined): 0
Timeout in milliseconds for MQTT operations.
This value will be passed as timeoutMs
to all calls to IotMqtt_Wait (and similar functions requiring a timeout). Ensure that this value is large enough to accommodate delays caused by the network.
Possible values: Any non-negative integer.
Recommended values: This setting should be at least 1000
.
Default value (if undefined): 5000
The number of connection attempts for the MQTT system tests.
The MQTT system tests require a network connection to an MQTT server. If the network is unreliable, this setting may be used to enable retries when connecting to the MQTT server.
This value represents a limit on the number of retries. When set to 1, the tests will perform one connection attempt. When set to a value greater than 1, the tests will attempt to reconnect with an exponential back-off strategy, up to the limit specified by this setting.
Possible values: Any integer of at least 1.
Default value (if undefined): 1