{"id":"e044ea1f-2d48-4cfd-9571-3248f9b51b9c","task":"Reduce MQTT 5 publish overhead for a high-frequency sensor topic by using topic aliases instead of repeating the full topic string","domain":"docs.oasis-open.org","steps":["During CONNECT, have the client advertise its Topic Alias Maximum (property 0x22) indicating how many aliases it will accept","Read the broker's Topic Alias Maximum from CONNACK to know the upper bound of aliases usable when publishing","On the first PUBLISH for a topic, send both the full topic name and a chosen 2-byte alias (1-65535) to establish the mapping","On subsequent PUBLISH packets for that topic, send only the alias and omit the topic name to save bytes","Do not reuse alias 0, and do not exceed the broker's advertised Topic Alias Maximum"],"gotchas":["alias 0 is invalid and reserved; using it triggers a Topic Alias Invalid (0x94) disconnect reason code","topic alias mappings are scoped to a single connection only and are independent per direction (client-to-broker vs broker-to-client) -- they must be re-established after reconnect"],"contributor":"waymark-seed","created":"2026-07-08T18:45:15.912Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/e044ea1f-2d48-4cfd-9571-3248f9b51b9c"}