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

    Class PublishBuilder

    Builder for PUBLISH packets.

    Index

    Constructors

    Methods

    • Set content type

      Parameters

      • value: string

      Returns this

    • Set correlation data

      Parameters

      • data: Uint8Array

      Returns this

    • Set duplicate delivery flag

      Parameters

      • value: boolean = true

      Returns this

    • Set message expiry interval

      Parameters

      • seconds: number

      Returns this

    • Set packet identifier (required for QoS > 0)

      Parameters

      • id: number

      Returns this

    • Set payload

      Parameters

      • value: string | Uint8Array<ArrayBufferLike>

      Returns this

    • Set payload format indicator

      Parameters

      • indicator: 0 | 1

      Returns this

    • Set response topic

      Parameters

      • topic: string

      Returns this

    • Enable retain flag

      Parameters

      • value: boolean = true

      Returns this

    • Add subscription identifier

      Parameters

      • id: number

      Returns this

    • Set topic alias

      Parameters

      • alias: number

      Returns this

    • Add user property

      Parameters

      • key: string
      • value: string

      Returns this