Sha256: 2c0379a44902c269407e35e58b51fbbd43904cccd36dba54e90ea568f601e54a

Contents?: true

Size: 407 Bytes

Versions: 4

Compression:

Stored size: 407 Bytes

Contents

# encoding: utf-8

$:.unshift(File.expand_path("../../lib", __FILE__))
require 'amqp'

AMQP.start(:host => 'localhost') do |connection|

  # Send Connection.Close on Ctrl+C
  trap(:INT) do
    AMQP.stop do
      puts "Closing and AMQP.channel is #{AMQP.channel.open? ? 'open' : 'closed'}"
      exit
    end
  end

  puts "AMQP.connection is #{AMQP.connection}"
  puts "AMQP.channel is #{AMQP.channel}"

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
amqp-0.7.5 examples/default_channel.rb
amqp-0.7.4 examples/default_channel.rb
amqp-0.7.3 examples/default_channel.rb
amqp-0.7.2 examples/default_channel.rb