edgeport - v1.0.3
    Preparing search index...

    Interface MqttSubscription

    An active subscription that yields MqttMessages as they arrive.

    Iterate it with for await; the loop ends when unsubscribe is called or the session closes. It is an AsyncDisposable, so await using unsubscribes automatically.

    1.0.0

    interface MqttSubscription {
        topicFilter: string;
        "[asyncDispose]"(): PromiseLike<void>;
        "[asyncIterator]"(): AsyncIterator<MqttMessage, any, any>;
        unsubscribe(): Promise<void>;
    }

    Hierarchy

    • AsyncIterable<MqttMessage>
    • AsyncDisposable
      • MqttSubscription
    Index
    topicFilter: string

    The topic filter this subscription matches.

    • Returns PromiseLike<void>

    • Returns AsyncIterator<MqttMessage, any, any>

    • Stops the subscription (UNSUBSCRIBE) and ends the iterator.

      Returns Promise<void>

      Resolves once the UNSUBACK is received.