# MQTT Max Client **MQTT client based on libmosquitto** In Memoriam W protocol This object provides a Max interface to a treaded instance of the [libmosquitto](http://mosquitto.org/man/libmosquitto-3.html) client. v20210101 was developped, tested and signed on macOS 10.14.6 with a mosquitto broker running on debian in a well-connected north american data center. It covers the features our application required; more work to follow (see below). It bundles a static libmosquitto binary (TLS stuff was raising errors so it was disabled through CMake). You can probably swap the .a in the .mxo with your own signed library if you wish. (Not sure how the Xcode project will present itself to someone else vs signing identities). ## TODO Max interface: - ~~QOS, persistence~~ - will - ~~complete attribute support~~ - re-connect on attribute change when required - complete max type support on publish (how to allow arbitrary length vs QOS/persistence?) - ~~auto-connection on object creation if attributes are set~~ - "enable" toggle (to "mute" traffic at the max level) Bundled library: - TLS support - (maybe) auto-discovery of dynamic system-level dylib support, vs bundled as fallback (?) - ... or should the MQTT CMake-based source be included & compiled with the object? Best practice vs open source Max objects? Other features: - thorough MQTT callback and message support (double-check MQTT error messages; sometimes they're weird) - support for MQTT ping - max package; better examples/docs - scan payloads for binary or structured data (jitter matrices, msp vectors, json dicts) - ... otherwise preprocess as a list (string, float, int) to spare large gensym()s and reduce pressure on [fromsymbol] - "setup" of higher-level strategy (topic structure for parameters) - optimize lifecycle of the mosquitto instance? (re-use vs re-create) Windows version: - compile a libmosquitto lib, and the .mxe Linux version: - as soon as Max4Linux comes out of alpha