Package-level declarations
Public MQTT 5.0 client API. Everything consumers need to connect, subscribe, publish, and observe messages.
Key entry points:
MqttClient — the top-level client.
MqttConfig — builder-style configuration.
MqttEndpoint — TCP vs WebSocket, with
parse(uri)fortcp://,tls://,ws://,wss://URIs.MqttMessage — immutable message model backed by kotlinx.io.bytestring.ByteString.
QoS — quality-of-service levels.
MqttException — sealed error hierarchy.
MqttLogger — pluggable logging SAM.
Types
Represents an authentication challenge received from the broker during enhanced authentication (§4.12).
Observable connection lifecycle state for MqttClient.
MQTT 5.0 client for Kotlin Multiplatform.
Configuration for an MQTT 5.0 client connection.
DSL marker for MQTTastic builder scopes.
Describes how to reach an MQTT broker.
Base exception for all MQTT client errors.
Logging interface for MQTTastic library consumers.
Log levels for the MQTTastic library, ordered from most verbose to least verbose.
Represents a received or outgoing MQTT message with full MQTT 5.0 properties.
Outcome of a one-shot connectivity probe issued via MqttClient.probe.
Curated, public-API subset of the broker capabilities advertised in CONNACK properties (§3.2.2.3), surfaced via ProbeResult.Success. Mirrors the internal MqttProperties shape but exposes only fields that are actionable for a probe diagnostic UI.
MQTT 5.0 properties that can accompany a PUBLISH packet (§3.3.2.3).
MQTT 5.0 reason codes per §2.4.
Controls when the broker sends retained messages for a subscription (§3.8.3.1).
Configuration for an MQTT 5.0 Will Message (§3.1.3.2).
Functions
Returns a Flow of messages filtered to a specific topic.
Returns a Flow of messages whose topic matches the given MQTT topicFilter.
Creates an MqttClient with the given clientId and optional configuration.
Run a one-shot connectivity probe against endpoint without disturbing any live client.
Connect, execute block, then close — structured resource management.