Skip to content

Record topology only for actual declarations - #752

Merged
michaelklishin merged 1 commit into
mainfrom
no-declare-topology-recovery
Oct 6, 2026
Merged

michaelklishin merged 1 commit into
mainfrom
no-declare-topology-recovery

Conversation

@eglitobias

@eglitobias eglitobias commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #751. Topology recovery recorded Bunny::Queue/Bunny::Exchange handles in addition to the actual declarations, so a no_declare: true handle got redeclared with default properties and could overwrite the real recorded declaration. Now only queue_declare/exchange_declare record, which also covers passive without separate guards.

Repro (run rabbitmqctl close_all_connections during the sleep):

require "bunny"

# The quorum queue already exists, declared by someone else
setup = Bunny.new.start
setup.create_channel.quorum_queue("repro.qq")
setup.close

conn = Bunny.new(network_recovery_interval: 1).start
ch = conn.create_channel
ch.queue("repro.qq", no_declare: true).subscribe { |*| }

puts "Now run: rabbitmqctl close_all_connections"
sleep 10

puts "Channel open after recovery: #{ch.open?}"
  • main: PRECONDITION_FAILED - inequivalent arg 'x-queue-type', then false
  • this branch: true

no_declare handles were recorded and redeclared on recovery. Closes #751.
@eglitobias
eglitobias force-pushed the no-declare-topology-recovery branch from c55a417 to 0349932 Compare October 5, 2026 11:38
@michaelklishin michaelklishin added this to the 3.5.0 milestone Oct 6, 2026
@michaelklishin
michaelklishin merged commit 706f7a4 into main Oct 6, 2026
17 checks passed
@michaelklishin

Copy link
Copy Markdown
Member

Thank you.

@michaelklishin
michaelklishin deleted the no-declare-topology-recovery branch October 6, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

no_declare: true is ignored by recovery in 3.x

2 participants