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)
| 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 |
| full | When |
| ... | Ignored. |
| conn | An object returned by |
An amqp_connection object.
if (FALSE) { conn <- amqp_connect(password = "wrong") conn <- amqp_connect() amqp_disconnect(conn) }