Skip to content
Browse files

test with rabbit 2.0

  • Loading branch information...
1 parent 1af1079 commit d70166515331742c9b80f72224cdf0d28cbc8939 Amos Elliston committed Dec 9, 2010
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/amqp/queue.rb
View
9 lib/amqp/queue.rb
@@ -1,14 +1,15 @@
module Carrot::AMQP
class Queue
attr_reader :name, :carrot
- attr_accessor :delivery_tag
+ attr_accessor :delivery_tag, :opts
def initialize(carrot, name, opts = {})
@opts = opts
@name = name
@carrot = carrot
+ @opts[:name] = name
server.send_frame(
- Protocol::Queue::Declare.new({ :queue => name, :nowait => true }.merge(opts))
+ Protocol::Queue::Declare.new(@opts.merge(:nowait => true))
)
end
@@ -50,9 +51,9 @@ def consumer_count
status.last
end
- def status(opts = {}, &blk)
+ def status
server.send_frame(
- Protocol::Queue::Declare.new({ :queue => name, :passive => true }.merge(opts))
+ Protocol::Queue::Declare.new(opts)
)
method = server.next_method
return [nil, nil] if method.kind_of?(Protocol::Connection::Close)

0 comments on commit d701665

Please sign in to comment.
Something went wrong with that request. Please try again.