Sha256: f88b746dd70f9346b0e81d413ecbcb8ea804fbbe13281e0c1c99f740aa8b84f3
Contents?: true
Size: 593 Bytes
Versions: 19
Compression:
Stored size: 593 Bytes
Contents
$: << 'lib' require 'hot_bunnies' connection = HotBunnies.connect(:host => 'localhost') channel = connection.create_channel channel.prefetch = 10 exchange = channel.exchange('test', :type => :direct) queue = channel.queue('hello.world') queue.bind(exchange, :routing_key => 'xyz') queue.purge subscription = queue.subscribe(:ack => true, :blocking => false) do |headers, msg| puts msg headers.ack end 100.times do |i| exchange.publish("hello world! #{i}", :routing_key => 'xyz') end subscription.cancel puts "ALMOST ALL DONE!" at_exit do channel.close connection.close end
Version data entries
19 entries across 19 versions & 1 rubygems