AWS IoT Device SDK C: MQTT
MQTT 3.1.1 client library
Return to main page ↑
Demo Configuration

Configuration settings of the MQTT demo.

Configuration settings are C pre-processor constants. They can be set with a #define in the config file (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 demo. In addition to the settings on this page, them MQTT demo will also be affected by settings that affect all demos.

configpagemarker

IOT_DEMO_MQTT_TOPIC_PREFIX

The string prepended to topic filters in the demo.

The string will be prepended as the common part of topic filters as a way to differentiate MQTT traffic generated by the demo.

Possible values: Any string that adheres to the specification for MQTT client identifiers.
Default value (if undefined): "iotmqttdemo"

IOT_DEMO_MQTT_PUBLISH_BURST_SIZE

The number of messages published in each burst.

Messages in a burst are rapidly published. After a complete burst is published, the demo waits for the messages to be received on a subscription topic filter. This value may be increased for higher throughput, at the expense of an increased chance of dropped messages. The MQTT demo publishes a total of IOT_DEMO_MQTT_PUBLISH_BURST_SIZE * IOT_DEMO_MQTT_PUBLISH_BURST_COUNT messages.

Possible values: Any positive integer.
Default value (if undefined): 10

IOT_DEMO_MQTT_PUBLISH_BURST_COUNT

The number of publish bursts in this demo.

Each burst will rapidly publish IOT_DEMO_MQTT_PUBLISH_BURST_SIZE messages. After publishing, the demo will wait for the published messages to be received on a subscription topic filter.

This setting can be increased for a longer demo. The MQTT demo publishes a total of IOT_DEMO_MQTT_PUBLISH_BURST_SIZE * IOT_DEMO_MQTT_PUBLISH_BURST_COUNT messages.

Possible values: Any positive integer.
Default value (if undefined): 10