Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AmqpConnection

Once connected to the broker or router, you get a connection. This connection is automatically opened.

Hierarchy

  • AmqpConnection

Index

Methods

close

  • close(): PromiseLike<void>
  • close(done: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): AmqpConnection
  • Closes the AMQP connection, i.e. allows the Close frame to be emitted.

    Returns PromiseLike<void>

  • Closes the AMQP connection, i.e. allows the Close frame to be emitted.

    Parameters

    • done: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>

    Returns AmqpConnection

closeFuture

  • closeFuture(): PromiseLike<void>
  • Returns PromiseLike<void>

createAnonymousSender

  • Creates an anonymous sender.

    Unlike "regular" sender, this sender is not associated to a specific address, and each message sent must provide an address. This method can be used in request-reply scenarios where you create a sender to send the reply, but you don't know the address, as the reply address is passed into the message you are going to receive.

    Returns PromiseLike<AmqpSender>

  • Creates an anonymous sender.

    Unlike "regular" sender, this sender is not associated to a specific address, and each message sent must provide an address. This method can be used in request-reply scenarios where you create a sender to send the reply, but you don't know the address, as the reply address is passed into the message you are going to receive.

    Parameters

    Returns AmqpConnection

createDynamicReceiver

  • Creates a dynamic receiver. The address is provided by the broker and is available in the completionHandler, using the {@link AmqpReceiver#address} method. this method is useful for request-reply to generate a unique reply address.

    Returns PromiseLike<AmqpReceiver>

  • Creates a dynamic receiver. The address is provided by the broker and is available in the completionHandler, using the {@link AmqpReceiver#address} method. this method is useful for request-reply to generate a unique reply address.

    Parameters

    Returns AmqpConnection

createReceiver

  • Creates a receiver used to consume messages from the given address. The receiver has no handler and won't start receiving messages until a handler is explicitly configured.

    Parameters

    • address: string

    Returns PromiseLike<AmqpReceiver>

  • Creates a receiver used to consume messages from the given address. The receiver has no handler and won't start receiving messages until a handler is explicitly configured.

    Parameters

    Returns AmqpConnection

  • Creates a receiver used to consumer messages from the given address.

    Parameters

    Returns PromiseLike<AmqpReceiver>

  • Creates a receiver used to consumer messages from the given address.

    Parameters

    Returns AmqpConnection

createSender

  • Creates a sender used to send messages to the given address. The address must be set. For anonymous sender, check {@link AmqpConnection#createAnonymousSender}.

    Parameters

    • address: string

    Returns PromiseLike<AmqpSender>

  • Creates a sender used to send messages to the given address. The address must be set. For anonymous sender, check {@link AmqpConnection#createAnonymousSender}.

    Parameters

    • address: string
    • completionHandler: ((res: AsyncResult<AmqpSender>) => void) | Handler<AsyncResult<AmqpSender>>

    Returns AmqpConnection

  • Creates a sender used to send messages to the given address. The address must be set. For anonymous sender, check {@link AmqpConnection#createAnonymousSender}.

    Parameters

    Returns PromiseLike<AmqpSender>

  • Creates a sender used to send messages to the given address. The address must be set. For anonymous sender, check {@link AmqpConnection#createAnonymousSender}.

    Parameters

    Returns AmqpConnection

exceptionHandler

  • exceptionHandler(handler: ((res: Throwable) => void) | Handler<Throwable>): AmqpConnection
  • Registers a handler called on disconnection.

    Parameters

    • handler: ((res: Throwable) => void) | Handler<Throwable>

    Returns AmqpConnection

isDisconnected

  • isDisconnected(): boolean
  • Returns boolean

unwrap

  • unwrap(): any
  • Returns any

Generated using TypeDoc