lib/amqp/channel.rb in amqp-1.1.6 vs lib/amqp/channel.rb in amqp-1.1.7
- old
+ new
@@ -189,12 +189,11 @@
# @param [AMQP::Session] connection Connection to open this channel on. If not given, default AMQP
# connection (accessible via {AMQP.connection}) will be used.
# @param [Integer] id Channel id. Must not be greater than max channel id client and broker
# negotiated on during connection setup. Almost always the right thing to do
- # is to let AMQP gem pick channel identifier for you. If you want to get next
- # channel id, use {AMQP::Channel.next_channel_id} (it is thread-safe).
+ # is to let AMQP gem pick channel identifier for you.
# @param [Hash] options A hash of options
#
# @example Instantiating a channel for default connection (accessible as AMQP.connection)
#
# AMQP.connect do |connection|
@@ -213,11 +212,11 @@
# end
#
# @example Instantiating a channel with a :prefetch option
#
# AMQP.connect do |connection|
- # AMQP::Channel.new(connection, AMQP::Channel.next_channel_id, :prefetch => 5) do |channel, open_ok|
+ # AMQP::Channel.new(connection, :prefetch => 5) do |channel, open_ok|
# # ...
# end
# end
#
#
@@ -1176,16 +1175,10 @@
@connection.release_channel_id(@id) unless auto_recovering?
@channel_is_open_deferrable = AMQP::Deferrable.new
end
- # @return [Boolean] true if this channel uses automatic recovery mode
- def auto_recovering?
- @auto_recovery
- end # auto_recovering?
-
-
# @return [Hash<String, Consumer>]
def consumers
@consumers
end # consumers
@@ -1211,12 +1204,10 @@
# @api public
def synchronize(&block)
@mutex.synchronize(&block)
end
-
-
# @group QoS and flow handling
# Requests a specific quality of service. The QoS can be specified for the current channel
# or for all channels on the connection.
#
@@ -1279,24 +1270,9 @@
self.exec_callback_yielding_self(:after_recovery)
@queues.each { |name, q| q.run_after_recovery_callbacks }
@exchanges.each { |name, e| e.run_after_recovery_callbacks }
end
-
-
- # Called by associated connection object when AMQP connection has been re-established
- # (for example, after a network failure).
- #
- # @api plugin
- def auto_recover
- return unless auto_recovering?
-
- self.open do
- # exchanges must be recovered first because queue recovery includes recovery of bindings. MK.
- @exchanges.each { |name, e| e.auto_recover }
- @queues.each { |name, q| q.auto_recover }
- end
- end # auto_recover
# @endgroup
# Publisher index is an index of the last message since