edgeport - v1.0.3
    Preparing search index...

    Interface StompMessage

    A message delivered to a StompSubscription.

    For client / client-individual ack modes the broker supplies an ack header, and this object exposes StompMessage.ack / StompMessage.nack to settle it; in auto mode those are absent.

    1.0.0

    interface StompMessage {
        body: Uint8Array;
        destination: string;
        headers: Record<string, string>;
        messageId: string;
        ack?(): Promise<void>;
        json<T = unknown>(): T;
        nack?(): Promise<void>;
        text(): string;
    }
    Index
    body: Uint8Array

    The raw message body bytes.

    destination: string

    The destination the message was published to.

    headers: Record<string, string>

    The decoded MESSAGE headers.

    messageId: string

    The broker's message-id for this message.

    • Acknowledges the message (client / client-individual modes only).

      Returns Promise<void>

    • Decodes the body as UTF-8 then parses it as JSON.

      Type Parameters

      • T = unknown

        The expected shape of the decoded value.

      Returns T

      The parsed value.

      If the body is not valid JSON.

      1.0.2

    • Negatively acknowledges the message (client / client-individual modes only).

      Returns Promise<void>

    • Decodes the body as UTF-8 text.

      Returns string

      The body as a string.

      1.0.2