Class: Qrack::Queue

Inherits:
Object
  • Object
show all
Defined in:
lib/ext/bunny-0.6.0/lib/qrack/queue.rb

Overview

Queue ancestor class

Direct Known Subclasses

Bunny::Queue, Bunny::Queue09

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



6
7
8
# File 'lib/ext/bunny-0.6.0/lib/qrack/queue.rb', line 6

def client
  @client
end

#delivery_tagObject

Returns the value of attribute delivery_tag.



7
8
9
# File 'lib/ext/bunny-0.6.0/lib/qrack/queue.rb', line 7

def delivery_tag
  @delivery_tag
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/ext/bunny-0.6.0/lib/qrack/queue.rb', line 6

def name
  @name
end

#subscriptionObject

Returns the value of attribute subscription.



7
8
9
# File 'lib/ext/bunny-0.6.0/lib/qrack/queue.rb', line 7

def subscription
  @subscription
end

Instance Method Details

#consumer_countObject

DESCRIPTION:

Returns consumer count from Queue#status.



17
18
19
20
# File 'lib/ext/bunny-0.6.0/lib/qrack/queue.rb', line 17

def consumer_count
  s = status
s[:consumer_count]
end

#message_countObject

DESCRIPTION:

Returns message count from Queue#status.



30
31
32
33
# File 'lib/ext/bunny-0.6.0/lib/qrack/queue.rb', line 30

def message_count
  s = status
s[:message_count]
end

#publish(data, opts = {}) ⇒ Object

DESCRIPTION:

Publishes a message to the queue via the default nameless ” direct exchange.

RETURNS:

nil



47
48
49
# File 'lib/ext/bunny-0.6.0/lib/qrack/queue.rb', line 47

def publish(data, opts = {})
  exchange.publish(data, opts)
end