Changes between Bunny 2.23.0 and 2.24.0 (March 23, 2025)
An Option that Will Cancel Consumers Before a Channel Closing is Initiated
Sometimes it makes more sense to avoid any possible in-flight deliveires
rather than trying to deal with them in a reasonable way, even though
all outstanding deliveries that were not confirmed will be requeued after
a channel closure event.
Here is how this setting is supposed to be used:
c = Bunny.new; c.start
ch = c.create_channel.configure do |new_ch|
new_ch.prefetch(10)
new_ch.cancel_consumers_before_closing!
end
q = ch.quorum_queue("a.queue")
This setting is opt-in and disabled by default.