@qualithm/mqtt-wire - v0.1.5
    Preparing search index...

    Function isValidTopicName

    • Validates a topic name (used in PUBLISH packets).

      Topic names:

      • Must be at least 1 character
      • Must not exceed 65535 UTF-8 bytes
      • Must not contain wildcards (+ or #)
      • Must not contain null characters (validated separately via UTF-8)

      Parameters

      • topic: string

        The topic name to validate

      Returns boolean

      true if valid, false otherwise

      MQTT 5.0 ยง4.7.1