Sha256: d963e6cb3cef3215449ec788bd62359fbe1a5f10a591c9387f818a161843dec9
Contents?: true
Size: 542 Bytes
Versions: 1
Compression:
Stored size: 542 Bytes
Contents
#!/usr/bin/env ruby # encoding: utf-8 require "rubygems" require "amqp" # Binding a queue to an exchange AMQP.start("amqp://guest:guest@dev.rabbitmq.com:5672") do |connection, open_ok| AMQP::Channel.new do |channel, open_ok| exchange_name = "amq.fanout" channel.queue("", :auto_delete => true, :exclusive => true) do |queue, declare_ok| queue.bind(exchange_name) do |bind_ok| puts "Just bound #{queue.name} to #{exchange_name}" end connection.close { EM.stop { exit } } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
amqp-0.8.0.rc12 | examples/guides/queues/06_biding_a_queue_using_exchange_name_string.rb |