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-2.2.2 examples/guides/getting_started/hello_world.rb
bunny-2.2.1 examples/guides/getting_started/hello_world.rb
bunny-2.2.0 examples/guides/getting_started/hello_world.rb
bunny-1.7.1 examples/guides/getting_started/hello_world.rb
bunny-2.1.0 examples/guides/getting_started/hello_world.rb
bunny-2.0.1 examples/guides/getting_started/hello_world.rb
bunny-2.0.0 examples/guides/getting_started/hello_world.rb
bunny-2.0.0.rc2 examples/guides/getting_started/hello_world.rb
bunny-2.0.0.rc1 examples/guides/getting_started/hello_world.rb
bunny-1.7.0 examples/guides/getting_started/hello_world.rb
bunny-1.6.3 examples/guides/getting_started/hello_world.rb
bunny-1.6.2 examples/guides/getting_started/hello_world.rb
bunny-1.6.1 examples/guides/getting_started/hello_world.rb
bunny-1.6.0 examples/guides/getting_started/hello_world.rb
bunny-1.5.1 examples/guides/getting_started/hello_world.rb
bunny-1.6.0.rc2 examples/guides/getting_started/hello_world.rb
bunny-1.6.0.rc1 examples/guides/getting_started/hello_world.rb
bunny-1.6.0.pre1 examples/guides/getting_started/hello_world.rb
bunny-1.5.0 examples/guides/getting_started/hello_world.rb
bunny-1.5.0.pre2 examples/guides/getting_started/hello_world.rb