Connect, disconnect, and reconnect to RabbitMQ servers. When possible, we automatically recover from connection errors, so manual reconnection is not usually necessary.

For those familiar with the AMQP protocol: we manage channels internally, and automatically recover from channel-level errors.

amqp_connect(host = "localhost", port = 5672L, vhost = "/",
  username = "guest", password = "guest", timeout = 10L,
  name = "longears")

# S3 method for amqp_connection
print(x, full = FALSE, ...)

amqp_reconnect(conn)

amqp_disconnect(conn)

Arguments

host

The server host.

port

The server port.

vhost

The desired virtual host.

username

User credentials.

password

User credentials.

timeout

A timeout, in seconds, for operations that support it.

name

A name for the connection that may appear in supported interfaces.

x

An object returned by amqp_connect.

full

When TRUE, print all server and client properties instead of a brief summary.

...

Ignored.

conn

An object returned by amqp_connect.

Value

An amqp_connection object.

Examples

if (FALSE) {
conn <- amqp_connect(password = "wrong")
conn <- amqp_connect()
amqp_disconnect(conn)
}