MQTTAsync_createOptions(3)
π MQTTAsync_createOptions π
okay so bestie, we're in the Library Functions Manual and today's main character is literally MQTTAsync_createOptions β she's a struct, she's an icon, she's the whole vibe. π
β¨ NAME β¨
MQTTAsync_createOptions β the options struct you hand over to MQTTAsync_createWithOptions. no cap. π
πΈ SYNOPSIS πΈ
#include <MQTTAsync.h>
π¦ Data Fields π¦
char struct_id [4]
int struct_version
int sendWhileDisconnected
int maxBufferedMessages
int MQTTVersion
int allowDisconnectedSendAtAnyTime
int deleteOldestMessages
int restoreMessages
int persistQoS0
π Detailed Description π
These are the options for the MQTTAsync_createWithOptions call. that's the whole assignment. slay. π
π§ Field Documentation π§
char struct_id[4]
the eyecatcher for this structure. it must be MQCO. like, it has to be, that's the rules, don't argue with her. β
int struct_version
the version number of this structure. it must be 0, 1, 2 or 3. let's break it down bestie:
0means noMQTTVersion1means noallowDisconnectedSendAtAnyTime,deleteOldestMessages,restoreMessages2means nopersistQoS0
pick your era, they're all valid. π
int sendWhileDisconnected
whether to allow messages to be sent when the client library is not connected. yes, sending while the connection's ghosting you. it's giving chaos but it's allowed. π₯
int maxBufferedMessages
the maximum number of messages allowed to be buffered. the tea here: this is intended to be used to limit the number of messages queued while the client is not connected β but it also applies when the client is connected, so it has to be greater than 0. like, zero is not it. don't do zero. π
int MQTTVersion
whether the MQTT version is 3.1, 3.1.1, or 5. to use V5, this must be set. and here's why, bestie: MQTT V5 has to be chosen here, because during the create call the message persistence is initialized, and we want to know whether the format of any persisted messages is appropriate for the MQTT version we are going to connect with. selecting 3.1 or 3.1.1 and then attempting to read 5.0 persisted messages will result in an error on create. π«Ά so yeah, choose wisely, the create call is watching. π
int allowDisconnectedSendAtAnyTime
allow sending of messages while disconnected before a first successful connect. so even before you've ever connected once, you can still send. main character energy fr fr. π
int deleteOldestMessages
no description given in the docs, bestie. she's mysterious. she's just... there. π
int restoreMessages
also no description. iconic silence, honestly. π
int persistQoS0
no description either. the mystery continues. π
π Author π
generated automatically by Doxygen for the Paho Asynchronous MQTT C Client Library from the source code. the robots wrote this one, not me. π€β¨
ngl, the vibe check on this page: struct fields, version gates, and one very important "choose your MQTT version at create time or regret it" warning. that's the whole plot. π
Paho Asynchronous MQTT C Client Library, dated Tue Jun 2 2026 00:00:00 β that's the source, the version and the date, all wrapped up in a lil sign-off. love that for us. mwah. π π¦πΈ
π¦ where this page comes from
- fedora 44: paho-c-devel 1.3.16-1.fc44 Β· BSD-3-Clause AND EPL-2.0
- fedora 44: paho-c-devel 1.3.16-1.fc44 Β· BSD-3-Clause AND EPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms