MQTTAsync_successData5(3)

πŸ’– MQTTAsync_successData5 πŸ’–

okay bestie, welcome to the MQTTAsync_successData5 page from the Library Functions Manual πŸŽ€ this is a lil struct that shows up when your async MQTT call goes off without a hitch. no cap. let's get into it ✨


✨ SYNOPSIS ✨

#include <MQTTAsync.h>

🌸 Data Fields 🌸

char struct_id [4]
int struct_version
MQTTAsync_token token
enum MQTTReasonCodes reasonCode
MQTTProperties properties
union {
   struct {
      int reasonCodeCount
      enum MQTTReasonCodes * reasonCodes
   } sub
   struct {
      MQTTAsync_message message
      char * destinationName
   } pub
   struct {
      char * serverURI
      int MQTTVersion
      int sessionPresent
   } connect
   struct {
      int reasonCodeCount
      enum MQTTReasonCodes * reasonCodes
   } unsub
} alt

πŸ’… Detailed Description πŸ’…

The data returned on completion of a successful API call in the response callback onSuccess. so like, when your call ate and everyone's happy, this is the lil goodie bag you get handed 🫢


πŸ¦‹ Field Documentation πŸ¦‹

  • char struct_id[4] β€” the eyecatcher for this structure. Will be MQSD. it's giving ✨name tag✨ so the lib knows what it's looking at.
  • int struct_version β€” the version number of this structure. Will be 0.
  • MQTTAsync_token token β€” a token identifying the successful request. can be used to refer to the request later πŸ”₯ (iykyk β€” hold onto it).
  • enum MQTTReasonCodes reasonCode β€” MQTT V5 reason code returned.
  • MQTTProperties properties β€” MQTT V5 properties returned, if any.
  • int reasonCodeCount β€” the number of reason codes in the reasonCodes array.
  • enum MQTTReasonCodes* reasonCodes β€” an array of reasonCodes.
  • struct { ... } sub β€” For subscribeMany, the list of reasonCodes returned by the server.
  • MQTTAsync_message message β€” the message being sent to the server.
  • char* destinationName β€” the topic destination for the message.
  • struct { ... } pub β€” For publish, the message being sent to the server.
  • char* serverURI β€” the connection string of the server.
  • int MQTTVersion β€” the version of MQTT being used.
  • int sessionPresent β€” the session present flag returned from the server.
  • struct { ... } connect β€” πŸ‘€ the connect one, bestie.
  • struct { ... } unsub β€” For unsubscribeMany, the list of reasonCodes returned by the server.
  • union { ... } alt β€” a union of the different values that can be returned for subscribe, unsubscribe and publish. it's giving πŸ’€ pick a lane energy β€” it's a union, so only one of them is actually real at a time.

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Paho Asynchronous MQTT C Client Library from the source code.


and that's the whole page, periodt πŸ’œ no notes. this lil slice of the Paho Asynchronous MQTT C Client Library docs is stamped Tue Jun 2 2026 00:00:00 β€” go forth and slay your callbacks, bestie 🌈⭐

πŸ“¦ where this page comes from