Class: AmqpClient

vertx-amqp-client-js/amqp_client~ AmqpClient

new AmqpClient()

AMQP Client entry point.
Source:

Methods

close(closeHandler)

Closes the client. The client must always be closed once not needed anymore.
Parameters:
Name Type Description
closeHandler function the close handler notified when the operation completes. It can be null.
Source:

connect(connectionHandler) → {AmqpClient}

Connects to the AMQP broker or router. The location is specified in the AmqpClientOptions as well as the potential credential required.
Parameters:
Name Type Description
connectionHandler function handler that will process the result, giving either the connection or failure cause. Must not be null.
Source:
Returns:
Type
AmqpClient

createReceiver(address, receiverOptions, completionHandler) → {AmqpClient}

Creates a receiver used to consumer messages from the given address. This method avoids having to connect explicitly. You can retrieve the connection using AmqpReceiver#connection.
Parameters:
Name Type Description
address string The source address to attach the consumer to.
receiverOptions Object The options for this receiver.
completionHandler function The handler called with the receiver, once opened. Note that the messageHandler can be called before the completionHandler if messages are awaiting delivery.
Source:
Returns:
the connection.
Type
AmqpClient

createSender(address, options, completionHandler) → {AmqpClient}

Creates a sender used to send messages to the given address. The address must be set.
Parameters:
Name Type Description
address string The target address to attach to, must not be null
options Object The options for this sender.
completionHandler function The handler called with the sender, once opened
Source:
Returns:
the client.
Type
AmqpClient