Sha256: 6ddb8294659103dd8bb0302433a241e1f8e1bd199927a5d18ef871a21d9317e8

Contents?: true

Size: 348 Bytes

Versions: 88

Compression:

Stored size: 348 Bytes

Contents

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

require "rubygems"
require "bunny"

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

88 entries across 88 versions & 1 rubygems

Version Path
bunny-1.0.6 examples/guides/getting_started/hello_world.rb
bunny-1.0.5 examples/guides/getting_started/hello_world.rb
bunny-1.1.0.pre2 examples/guides/getting_started/hello_world.rb
bunny-1.1.0.pre1 examples/guides/getting_started/hello_world.rb
bunny-1.0.4 examples/guides/getting_started/hello_world.rb
bunny-1.0.3 examples/guides/getting_started/hello_world.rb
bunny-1.0.2 examples/guides/getting_started/hello_world.rb
bunny-1.0.1 examples/guides/getting_started/hello_world.rb
bunny-1.0.0 examples/guides/getting_started/hello_world.rb
bunny-1.0.0.rc3 examples/guides/getting_started/hello_world.rb
bunny-1.0.0.rc2 examples/guides/getting_started/hello_world.rb
bunny-0.10.8 examples/guides/getting_started/hello_world.rb
bunny-1.0.0.rc1 examples/guides/getting_started/hello_world.rb
bunny-0.10.7 examples/guides/getting_started/hello_world.rb
bunny-0.10.6 examples/guides/getting_started/hello_world.rb
bunny-1.0.0.pre6 examples/guides/getting_started/hello_world.rb
bunny-0.10.5 examples/guides/getting_started/hello_world.rb
bunny-1.0.0.pre5 examples/guides/getting_started/hello_world.rb
bunny-0.10.4 examples/guides/getting_started/hello_world.rb
bunny-0.10.3 examples/guides/getting_started/hello_world.rb