Class: AmqpConnection

AmqpConnection()

new AmqpConnection()

Manages an AMQP connection.
Source:
Fires:

Methods

close(callbackopt)

To close the connection. You can use a callback function to get the result or listen events.
Parameters:
Name Type Attributes Description
callback function <optional>
Properties
Name Type Attributes Description
err Error <nullable>
Source:

connect()

To connect to the message broker. The `AmqpConnection` will report status with Status.
Source:

status() → {Status}

To get the connection status.
Source:
Returns:
Type
Status

Events

error

Connection error event.
Type:
  • Error
Source:

status

Connection status event.
Type:
Source:

AmqpConnection(optsopt)

new AmqpConnection(optsopt)

Parameters:
Name Type Attributes Description
opts Object <optional>
The connection options.
Properties
Name Type Attributes Default Description
uri string <optional>
'amqp://localhost' Connection URI. Use `amqp|amqps://username:password@host:port/vhost` format.
connectTimeoutMillis number <optional>
3000 Connection timeout in milliseconds.
reconnectMillis number <optional>
1000 Time in milliseconds from disconnection to reconnection.
insecure boolean <optional>
false Allow insecure TLS connection.
Source:
Throws:
Wrong arguments.
Type
Error

Methods

close(callbackopt)

To close the connection. You can use a callback function to get the result or listen events.
Parameters:
Name Type Attributes Description
callback function <optional>
Properties
Name Type Attributes Description
err Error <nullable>
Source:

connect()

To connect to the message broker. The `AmqpConnection` will report status with Status.
Source:

status() → {Status}

To get the connection status.
Source:
Returns:
Type
Status

Events

error

Connection error event.
Type:
  • Error
Source:

status

Connection status event.
Type:
Source: