Class | AMQP::Session |
In: |
lib/amqp/session.rb
|
Parent: | AMQ::Client::EventMachineClient |
AMQP session represents connection to the broker. Session objects let you define callbacks for various TCP connection lifecycle events, for instance:
h2. Key methods
@api public
server_capabilities | [R] |
Server capabilities (usually used to detect AMQP
0.9.1 extensions like basic.nack, publisher confirms and so on)
@return [Hash] @see bit.ly/htCzCX AMQP 0.9.1 protocol documentation (Section 1.4.2.1.3) |
server_locales | [R] |
Locales server supports
@see bit.ly/htCzCX AMQP 0.9.1 protocol documentation (Section 1.4.2.1.3) |
server_properties | [R] |
Server properties (product information, platform, et cetera)
@return [Hash] @see bit.ly/htCzCX AMQP 0.9.1 protocol documentation (Section 1.4.2.1.3) |
Overrides authentication failure exception to one that inherits from AMQP::Error and thus is backwards compatible.
@private @api plugin @return [Class] AMQP::PossibleAuthenticationFailureError
Overrides TCP connection failure exception to one that inherits from AMQP::Error and thus is backwards compatible.
@private @api plugin @return [Class] AMQP::TCPConnectionFailed
Performs recovery of channels that are in the automatic recovery mode.
@see Channel#auto_recover @see Queue#auto_recover @see Exchange#auto_recover @api plugin
Defines a callback that will be executed after TCP connection has recovered after a network failure but before AMQP connection is re-opened. Only one callback can be defined (the one defined last replaces previously added ones).
@api public
Properly close connection with AMQ broker, as described in section 2.2.4 of the {bit.ly/hw2ELX AMQP 0.9.1 specification}.
@api plugin @see close_connection
Defines a callback that will be executed after TCP connection is interrupted (typically because of a network failure). Only one callback can be defined (the one defined last replaces previously added ones).
@api public
Defines a callback that will be executed when connection is closed after connection-level exception. Only one callback can be defined (the one defined last replaces previously added ones).
@api public
Defines a callback that will be run when TCP connection is closed before authentication finishes. Usually this means authentication failure. You can define only one callback.
@api public
Defines a callback that will be executed after AMQP connection has recovered after a network failure.. Only one callback can be defined (the one defined last replaces previously added ones).
@api public
Defines a callback that will be run when initial TCP connection fails. You can define only one callback.
@api public
Defines a callback that will be run when initial TCP connection fails. You can define only one callback.
@api public
Reconnect to the broker using current connection settings.
@param [Boolean] force Enforce immediate connection @param [Fixnum] period If given, reconnection will be delayed by this period, in seconds. @api public