WebSocket client for AMQP 0-9-1 servers

Hierarchy

  • AMQPBaseClient
    • AMQPWebSocketClient

Constructors

  • Parameters

    • url: string

      to the websocket endpoint, example: wss://server/ws/amqp

    • Optionalvhost: string
    • Optionalusername: string
    • Optionalpassword: string
    • Optionalname: string
    • OptionalframeMax: number
    • Optionalheartbeat: number

    Returns AMQPWebSocketClient

  • Parameters

    • init: AMQPWebSocketInit

    Returns AMQPWebSocketClient

Properties

blocked?: string
bufferPool: AMQPView[] = []
channelMax: number = 0
channels: AMQPChannel[]
closed: boolean = true
closePromise?: [(value?: void) => void, (err: Error) => void]
connectPromise?: [(conn: AMQPBaseClient) => void, (err: Error) => void]
frameMax: number
heartbeat: number
logger: undefined | null | Logger = console
name?: string
onerror: (error: AMQPError) => void
onUpdateSecretOk?: (value?: void) => void
password: string
platform?: string
textEncoder: TextEncoder = ...

Used for string -> arraybuffer when publishing

url: string
username: string
vhost: string

Methods

  • Gracefully close the AMQP connection

    Parameters

    • Optionalreason: string = ""

      might be logged by the server

    • code: number = 200

    Returns Promise<void>

  • Establish a AMQP connection over WebSocket

    Returns Promise<AMQPBaseClient>

  • Parameters

    • bytes: Uint8Array

      to send

    Returns Promise<void>

    fulfilled when the data is enqueued

  • Parameters

    • newSecret: string
    • reason: string

    Returns Promise<unknown>