API Reference ex_mqtt_uv v#0.1.0

Copy Markdown View Source

Modules

An Elixir MQTT client library supporting both MQTT 3.1.1 and MQTT 5.0.

:gen_statem-based MQTT client connection process supporting both MQTT 3.1.1 and MQTT 5.0.

Callback behaviour for handling incoming MQTT messages, MQTT 5.0 AUTH challenges, and connection lifecycle events.

Unified Sans-I/O protocol entry point dispatching between MQTT 3.1.1 (V311) and MQTT 5.0 (V5) codecs.

Behaviour implemented by each MQTT protocol version codec (V311, V5).

Unified MQTT Control Packet structs shared by both MQTT 3.1.1 and MQTT 5.0.

MQTT 5.0 AUTH packet for enhanced authentication.

MQTT CONNACK packet (broker -> client).

MQTT CONNECT packet (client -> broker).

MQTT DISCONNECT packet (client -> broker, and broker -> client in 5.0).

MQTT PINGREQ packet.

MQTT PINGRESP packet.

MQTT PUBACK packet (QoS 1 acknowledgement).

MQTT PUBCOMP packet (QoS 2 part 3).

MQTT PUBLISH packet (bidirectional).

MQTT PUBREC packet (QoS 2 part 1).

MQTT PUBREL packet (QoS 2 part 2).

MQTT SUBACK packet (broker -> client).

MQTT SUBSCRIBE packet (client -> broker).

Single topic filter entry inside a SUBSCRIBE packet.

MQTT UNSUBACK packet (broker -> client).

MQTT UNSUBSCRIBE packet (client -> broker).

Last Will and Testament configuration.

MQTT 5.0 Properties serialization, deserialization, value-range validation, and per-packet allowlist validation.

MQTT 3.1.1 Return Codes and MQTT 5.0 Reason Codes bidirectional mapping.

Primitive MQTT wire-format encoding and decoding helpers (UTF-8 strings, binary data, fixed headers, and packet type constants).

MQTT 3.1.1 protocol codec implementing OASIS MQTT 3.1.1 packet encoding and decoding.

MQTT 5.0 protocol codec implementing OASIS MQTT 5.0 packet encoding and decoding.

MQTT Variable Byte Integer encoding and decoding (1 to 4 bytes, max 268,435,455).

Wraps sensitive values (such as broker passwords) inside a zero-arity closure so they are never exposed in crash dumps, :sys.get_state/1, or logs.

Pure functional QoS 1/2 publish state machine and packet identifier manager, supporting strict QoS state transitions, dual-limit flow control (min(max_inflight, server_receive_maximum)), and periodic retry scanning.

MQTT 5.0 bidirectional Topic Alias table.

Telemetry instrumentation for ExMqtt using :telemetry ~> 1.4.

Pluggable transport behaviour for BEAM active: :once non-blocking socket messaging.

Plain TCP transport backed by :gen_tcp.

TLS transport backed by Erlang :ssl.

Zero-dependency RFC 6455 WebSocket transport (ws:// and wss://) for MQTT over WebSocket.

Parses MQTT connection URIs into ExMqtt.start_link/1 keyword options.