Method: Bunny::Queue#status

Defined in:
lib/bunny/queue.rb

#statusHash

Returns A hash with information about the number of queue messages and consumers.

Returns:

  • (Hash)

    A hash with information about the number of queue messages and consumers

See Also:



350
351
352
353
354
# File 'lib/bunny/queue.rb', line 350

def status
  queue_declare_ok = @channel.queue_declare(@name, @options.merge(:passive => true))
  {:message_count => queue_declare_ok.message_count,
    :consumer_count => queue_declare_ok.consumer_count}
end