File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44require 'hutch/logging'
55require 'hutch/exceptions'
66require 'hutch/publisher'
7- require 'thread'
87
98module Hutch
109 class Broker
@@ -127,16 +126,12 @@ def install_channel_recovery!(ch)
127126 ch . on_error do |channel , close |
128127 next unless close . delivery_ack_timeout?
129128
130- # Reopen performs blocking protocol operations, so run it outside Bunny's
131- # channel error callback thread to avoid timing out waiting for OpenOk.
132- Thread . new do
133- begin
134- channel . reopen
135- connection . recover_channel_topology ( channel )
136- logger . info 'channel recovery succeeded'
137- rescue => ex
138- logger . error "channel recovery failed: #{ ex . class } : #{ ex . message } "
139- end
129+ begin
130+ channel . reopen
131+ connection . recover_channel_topology ( channel )
132+ logger . warn 'recovered consumer channel after a delivery acknowledgement timeout'
133+ rescue => ex
134+ logger . error "channel recovery failed: #{ ex . class } : #{ ex . message } "
140135 end
141136 end
142137 end
You can’t perform that action at this time.
0 commit comments