Object -
rabbitmq
:
Connection
Represents a single network connection to the RabbitMQ broker.
Constructor
__init
(ConnectionConfiguration connectionConfiguration)
- connectionConfiguration ConnectionConfiguration
-
Configurations required to initialize the
rabbitmq:Connection
Methods
rabbitmq:Connection
and all its rabbitmq:Channel
s.
rabbitmq:Connection
and all its rabbitmq:Channel
s.
close
was already called.
Closes the rabbitmq:Connection
and all its rabbitmq:Channel
s.
It waits with a provided timeout for all the close operations to complete.
When the timeout is reached, the socket is forced to close.
rabbitmq:Error? closeResult = newConnection.close();
Parameters
- closeCode int? (default ())
-
The close code (for information, go to the "Reply Codes" section in the [AMQP 0-9-1 specification] (#https://www.rabbitmq.com/resources/specs/amqp0-9-1.pdf))
- closeMessage string? (default ())
-
A message indicating the reason for closing the connection
- timeoutInMillis int? (default ())
-
Timeout (in milliseconds) for completing all the close-related operations. Use -1 for infinity
-
Return Type
(Error?) A
rabbitmq:Error
if an I/O error is encountered or else()
Aborts the rabbitmq:Connection
and all its rabbitmq:Channel
s.
Forces the rabbitmq:Connection
to close and waits for all the close operations to complete. When the timeout is reached,
the socket is forced to close. Any encountered exceptions in the close operations are discarded silently.
connection.abortConnection(320, "Channel Aborted");
Parameters
- closeCode int? (default ())
-
The close code (for information, go to the "Reply Codes" section in the [AMQP 0-9-1 specification] (#https://www.rabbitmq.com/resources/specs/amqp0-9-1.pdf))
- closeMessage string? (default ())
-
A message indicating the reason for closing the connection
- timeoutInMillis int? (default ())
-
Timeout (in milliseconds) for completing all the close-related operations. Use -1 for infinity