Sha256: 7e86af94c527704220786f6128782a7aa5e1fe208f38cae4ec0fe4159ae7c0b0

Contents?: true

Size: 596 Bytes

Versions: 124

Compression:

Stored size: 596 Bytes

Contents

#!/usr/bin/env ruby
# encoding: utf-8

require "rubygems"
require "bunny"

puts "=> Demonstrating exchange-to-exchange bindings"
puts

conn = Bunny.new
conn.start

ch   = conn.create_channel
x1   = ch.fanout("bunny.examples.e2e.exchange1", :auto_delete => true, :durable => false)
x2   = ch.fanout("bunny.examples.e2e.exchange2", :auto_delete => true, :durable => false)
# x1 will be the source
x2.bind(x1)

q    = ch.queue("", :exclusive => true)
q.bind(x2)

x1.publish("")

sleep 0.2
puts "Queue #{q.name} now has #{q.message_count} message in it"

sleep 0.7
puts "Disconnecting..."
conn.close

Version data entries

124 entries across 124 versions & 1 rubygems

Version Path
bunny-0.10.0 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-1.0.0.pre3 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-0.9.8 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-1.0.0.pre2 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-0.9.7 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-0.9.6 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-0.9.5 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-0.9.4 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-1.0.0.pre1 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-0.9.3 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-0.9.2 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-0.9.1 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-0.9.0 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-0.9.0.rc2 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-0.9.0.rc1 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-0.9.0.pre13 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-0.9.0.pre12 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-0.9.0.pre11 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-0.9.0.pre10 examples/guides/extensions/exchange_to_exchange_bindings.rb
bunny-0.9.0.pre9 examples/guides/extensions/exchange_to_exchange_bindings.rb