lib/bunny/session.rb in bunny-2.5.1 vs lib/bunny/session.rb in bunny-2.6.0
- old
+ new
@@ -335,17 +335,17 @@
# Opens a new channel and returns it. This method will block the calling
# thread until the response is received and the channel is guaranteed to be
# opened (this operation is very fast and inexpensive).
#
# @return [Bunny::Channel] Newly opened channel
- def create_channel(n = nil, consumer_pool_size = 1, consumer_pool_abort_on_exception = false)
+ def create_channel(n = nil, consumer_pool_size = 1, consumer_pool_abort_on_exception = false, consumer_pool_shutdown_timeout = 60)
raise ArgumentError, "channel number 0 is reserved in the protocol and cannot be used" if 0 == n
@channel_mutex.synchronize do
if n && (ch = @channels[n])
ch
else
- ch = Bunny::Channel.new(self, n, ConsumerWorkPool.new(consumer_pool_size || 1, consumer_pool_abort_on_exception))
+ ch = Bunny::Channel.new(self, n, ConsumerWorkPool.new(consumer_pool_size || 1, consumer_pool_abort_on_exception, consumer_pool_shutdown_timeout))
ch.open
ch
end
end
end