@cloudamqp/amqp-client
    Preparing search index...

    Class AMQPMessage

    AMQP message.

    Index

    Constructors

    Properties

    body: null | Uint8Array<ArrayBufferLike> = null

    Raw message body as bytes from the wire.

    bodyPos: number = 0
    bodySize: number = 0

    Byte size of the body.

    channel: AMQPChannel

    Channel this message was delivered on.

    consumerTag: string = ""

    Consumer tag, if delivered to a consumer.

    deliveryTag: number = 0

    Server-assigned delivery tag for ack/nack/reject.

    exchange: string = ""

    Exchange the message was published to.

    messageCount?: number

    Number of messages remaining in the queue (only set by basicGet).

    properties: AMQPProperties = {}

    Message metadata (content-type, headers, etc.).

    redelivered: boolean = false

    Whether the message has been redelivered by the server.

    replyCode?: number

    Reply code if the message was returned.

    replyText?: string

    Reason the message was returned.

    routingKey: string = ""

    Routing key the message was published with.

    Accessors

    • get isAcked(): boolean

      True if the message has already been acked, nacked, or rejected.

      Returns boolean

    Methods

    • Acknowledge the message

      Parameters

      • multiple: boolean = false

      Returns Promise<void>

    • Converts the message (which is deliviered as an uint8array) to a string

      Returns null | string

    • Negative acknowledgment (same as reject)

      Parameters

      • requeue: boolean = false
      • multiple: boolean = false

      Returns Promise<void>

    • Reject the message

      Parameters

      • requeue: boolean = false

      Returns Promise<void>