Permalink
Browse files

A slightly modified example provided in #121

  • Loading branch information...
1 parent 7c48422 commit da7dfbe49bb27c34d026b778d47b1580f42cd6f2 @michaelklishin michaelklishin committed Feb 15, 2012
Showing with 23 additions and 0 deletions.
  1. +23 −0 examples/issues/issue_121.rb
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+# encoding: utf-8
+
+require "bundler"
+Bundler.setup
+
+$:.unshift(File.expand_path("../../../lib", __FILE__))
+
+
+
+require 'amqp'
+require 'amqp/extensions/rabbitmq'
+AMQP.start(:user => 'guest',:pass => 'guest',:vhost => '/') do |connection|
+ channel = AMQP::Channel.new(connection)
+ channel.queue("shuki_q",{:nowait => true,:passive=>false, :auto_delete=>false, :arguments=>{"x-expires"=>5600000}}) do |queue|
+ queue.bind('raw.shuki',:routing_key => 'ShukiesTukies')
+ puts "before subscribe"
+ queue.subscribe(:ack => true) do |header, payload|
+ puts "inside subscribe"
+ p header.class
+ end
+ end
+end

0 comments on commit da7dfbe

Please sign in to comment.