Skip to main content
Very Popular
Go to Latest
interface AmqpConnection
import { type AmqpConnection } from "https://deno.land/x/amqp@v0.6.0/mod.ts";

Represents a live AMQP connection

Methods

close(): Promise<void>

Closes the AMQP connection.

closed(): Promise<void>

Returns a promise that is settled when the connection is closed.

If the connection is unexpectedly closed by the server, it will reject with an error. If the connection is successfully closed by the this client, it will resolve once the close handshake has completed successfully.

This can be useful to detect if the server has crashed or otherwise encountered an irrecoverable exception.

openChannel(): Promise<AmqpChannel>

Opens up a new AMQP channel for operations.