Sha256: 96b5cc9341a6c0c4068cbf6e16667932781e264894e3fa7d60d1c8356516b4ba

Contents?: true

Size: 460 Bytes

Versions: 1

Compression:

Stored size: 460 Bytes

Contents

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

require "rubygems"
require "amqp"

# Declaring a temporary exclusive queue
AMQP.start("amqp://guest:guest@dev.rabbitmq.com") do |connection, open_ok|
  AMQP::Channel.new do |channel, open_ok|
    AMQP::Queue.new(channel, "", :auto_delete => true, :exclusive => true) do |queue, declare_ok|
      puts "#{queue.name} is ready to go."

      connection.close {
        EventMachine.stop { exit }
      }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
amqp-0.8.0.rc13 examples/guides/queues/03a_declaring_a_temporary_exclusive_queue.rb