WuKongIM Docs

MQTT

Access existing users, channels and messages over MQTT 5 TCP or WebSocket, with explicit preview boundaries.

MQTT is an IM entry protocol for WuKongIM. It shares UIDs, device tokens, channels, membership permissions and messages with HTTP and WKProto SDKs. Your application still owns login, business authorization and payload formats.

Development preview

The MQTT listener is disabled by default and supports MQTT 5 TCP and an optional separate WebSocket listener. Complete Linux, fault and load qualification remains outstanding. Use a matching development candidate containing the MQTT implementation; do not assume current released packages or images support it.

Start here

Supported capabilities

CapabilityCurrent behavior
Version and transportMQTT 5.0 over raw TCP or WebSocket; other versions unsupported; TLS terminates upstream
BrowsersMQTT.js can connect directly to a separate /mqtt listener; the mqtt subprotocol and binary messages are required
Publish QoS0 and 1; no QoS 2 publication
Subscription QoS0 and 1; a request for 2 may be granted 1; inspect SUBACK
TopicsExact personal inbox and group-message topics; no arbitrary business topics
RetainUnsupported; Retain Available is 0 in CONNACK
Wildcards and shared subscriptionsNo +, # or $share/
Topic AliasUnsupported; Topic Alias Maximum is 0; send full topics
AuthenticationCONNECT User Name / Password; no enhanced AUTH negotiation
SessionsClean Start, Session Expiry, Session Present; maximum offline lifetime 24 hours, configurable downward
Subscription optionsNo Local and Subscription Identifier supported; identifiers must be nonzero and not duplicated
WillQoS 0/1 and Will Delay; no retain; current permissions checked at execution

Inspect capabilities in CONNACK and each subscription's SUBACK. Client-library support does not establish server support.

Integration model

Your trusted backend prepares user tokens and group membership. Clients then connect and subscribe to exact topics. SUBSCRIBE establishes reception intent for a ClientID; it neither creates an account nor joins a group.

Successful PUBACK, SDK SENDACK and HTTP reason=1 acknowledge message commit. None proves recipient reception, reading or business completion. Every deployment retains cluster semantics. A single-node cluster also uses Slots and durable paths, with 256 hash slots by default.

The OASIS MQTT 5.0 specification defines the base protocol. This topic adds WuKongIM authentication, topic and IM mapping conventions.

On this page