how to get the number of messages in a queue?

21 views
Skip to first unread message

joel

unread,
Feb 11, 2009, 7:11:41 PM2/11/09
to AMQP
Hey folks,

I can't for the life of me figure out how to get the number of
messages in a queue. I've looked at the rdoc and the code and have
come up empty.

From the 0.6.0 release announcement:
" - queue status api to get # of consumers and messages in the
queue "

-Joel

Aman Gupta

unread,
Feb 11, 2009, 7:54:33 PM2/11/09
to ruby...@googlegroups.com
MQ.queue('name').status{ |num_messages, num_consumers|
puts num_messages
}

Aman

Joel Wood

unread,
Feb 11, 2009, 8:03:25 PM2/11/09
to ruby...@googlegroups.com
Thank you.

-Joel
Reply all
Reply to author
Forward
0 new messages