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

    Class AMQPWebSocketClient

    WebSocket client for AMQP 0-9-1 servers.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    blocked?: string

    Set when the server has blocked publishing (connection.blocked reason).

    channelMax: number = 0

    Maximum number of channels negotiated with the server.

    channels: AMQPChannel[]

    Open channels, indexed by channel id.

    closed: boolean = true

    Whether the connection is closed.

    closePromise?: [(value?: void) => void, (err: Error) => void]
    connectPromise?: [(conn: AMQPBaseClient) => void, (err: Error) => void]
    frameMax: number

    Maximum frame size in bytes negotiated with the server.

    heartbeat: number

    Heartbeat interval in seconds.

    logger: undefined | Logger

    Logger instance, or undefined to disable logging.

    name?: string

    Connection name, visible in the RabbitMQ management UI.

    ondisconnect?: (error?: Error) => void

    Callback when connection is lost

    Type declaration

      • (error?: Error): void
      • Parameters

        • Optionalerror: Error

          The error that caused the disconnection, if any

        Returns void

    onerror: (error: AMQPError) => void

    Callback for connection-level errors.

    onUpdateSecretOk?: (value?: void) => void
    password: string

    Password for authentication.

    platform?: string

    Platform identifier sent in client properties.

    url: string

    WebSocket URL to connect to.

    username: string

    Username for authentication.

    vhost: string

    Virtual host to connect to.

    Methods

    • Gracefully close the AMQP connection.

      Parameters

      • Optionalreason: string = ""

        might be logged by the server

      • code: number = 200

      Returns Promise<void>

    • Parameters

      • bytes: Uint8Array

        to send

      Returns Promise<void>

      fulfilled when the data is enqueued