Sha256: 9f92bc366d5ab79b1de914ad55a00f321e3a6107a5a1ff806f46b2e4e7203520

Contents?: true

Size: 368 Bytes

Versions: 37

Compression:

Stored size: 368 Bytes

Contents

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

require "rubygems"
require "bunny"

STDOUT.sync = true

conn = Bunny.new
conn.start

ch = conn.create_channel
q  = ch.queue("bunny.examples.hello_world", :auto_delete => true)

q.subscribe do |delivery_info, properties, payload|
  puts "Received #{payload}"
end

q.publish("Hello!", :routing_key => q.name)

sleep 1.0
conn.close

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
bunny-2.17.0 examples/guides/getting_started/hello_world.rb
bunny-2.16.1 examples/guides/getting_started/hello_world.rb
bunny-2.15.0 examples/guides/getting_started/hello_world.rb
bunny-2.14.4 examples/guides/getting_started/hello_world.rb
bunny-2.14.3 examples/guides/getting_started/hello_world.rb
bunny-2.14.2 examples/guides/getting_started/hello_world.rb
bunny-2.14.1 examples/guides/getting_started/hello_world.rb
bunny-2.13.0 examples/guides/getting_started/hello_world.rb
bunny-2.12.1 examples/guides/getting_started/hello_world.rb
bunny-2.12.0 examples/guides/getting_started/hello_world.rb
bunny-2.12.0.rc1 examples/guides/getting_started/hello_world.rb
bunny-2.11.0 examples/guides/getting_started/hello_world.rb
bunny-2.11.0.pre1 examples/guides/getting_started/hello_world.rb
bunny-2.10.0 examples/guides/getting_started/hello_world.rb
bunny-2.9.2 examples/guides/getting_started/hello_world.rb
bunny-2.9.1 examples/guides/getting_started/hello_world.rb
bunny-2.6.7 examples/guides/getting_started/hello_world.rb
bunny-2.7.4 examples/guides/getting_started/hello_world.rb
bunny-2.8.1 examples/guides/getting_started/hello_world.rb
bunny-2.9.0 examples/guides/getting_started/hello_world.rb