MQTTSubscribe_options(3)
π MQTTSubscribe_options(3) π
okay bestie, so this is a page from the Library Functions Manual and it's all about MQTTSubscribe_options β literally the glow-up that MQTT V5 gave us. periodt. β¨
β¨ NAME β¨
MQTTSubscribe_options β the struct holding all your MQTT V5 subscribe options, no cap πΈ
π¦ SYNOPSIS π¦
#include <MQTTSubscribeOpts.h>
π Data Fields π
char struct_id [4]
int struct_version
unsigned char noLocal
unsigned char retainAsPublished
unsigned char retainHandling
π Detailed Description π
ngl, this is just the MQTT V5 subscribe options β everything except QoS, because QoS was already a whole thing before V5 existed. she's the new girl on the block, and she ate. π
π Field Documentation π
char struct_id[4]
the eyecatcher for this structure, iykyk. it Must be MQSO. like, no other option, bestie. it's the vibe check for your struct. π
int struct_version
the version number of this structure. it Must be 0. that's it. that's the whole field. iconic. β
unsigned char noLocal
you want to NOT receive your own publications? set this to 1. π«Ά
set it to 0 and you get the original MQTT behaviour β all messages matching the subscription are received, including your own lil messages coming home to roost. π
unsigned char retainAsPublished
want to keep the retain flag exactly as it was on the original publish message? set to 1. π
if you set 0, it defaults to the original MQTT behaviour, where the retain flag is only set on publications sent by a broker if in response to a subscribe request. lowkey a whole different vibe.
unsigned char retainHandling
okay so this one has three moods, and you gotta pick one:
0β send retained messages at the time of the subscribe (this is the original MQTT behaviour, the classic) β¨1β send retained messages on subscribe only if the subscription is new π2β do not send retained messages at all. simply no. not today. π
bestie pls remember:struct_idmust beMQSOandstruct_versionmust be0. these aren't suggestions, they're the rules, fr fr. π₯
π Author π
Generated automatically by Doxygen for the Paho MQTT C Client Library, straight from the source code. not a human, just a lil robot doing its thing. π€πΈ
mwah, that's the whole page bestie π«Ά β brought to you by the Paho MQTT C Client Library, dated Tue Jun 2 2026 00:00:00, and page number MQTTSubscribe_options(3) because we keep it cutesy and catalogued. bye now, go subscribe to something. πβ¨π
π¦ 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