[rabbitmq-discuss] status Active in Management web portal

MattH matt.higgins at gmail.com
Thu Mar 15 12:57:57 GMT 2012

Thanks Simon,

Looks like the idol_since is what I was looking for. I can see that in
the http API call. I did realize I would be geting out of AMQP land to
get this data, however your concern is valid and I am also not
thrilled with this solution.

My application acts like a chat room where one user creates a room
(exchange) with say 5 users and a set of queues is created for each
user in the room at the time the room is created (queues bound to the
exchange). I could have many client endpoints, some could connect
directly to the queue (AMQP, STOMP) others may long poll a web
services that will pull messages off the queue, format and send back
to the client over HTTP.  If the client user goes idol I want to
reflect that in the UI and if a user never connected they will remain
idol from the time the room was created. In essence I am attempting to
represent presence through activity on the queue.

Another method may be to simply not create the queue in the first
place and force users to create a queue as they connect. This would
then require that I find all queues bound to a given exchange, if an
exchange has a queue for a given users then they are "active". This is
not as fine grained a presence indicator but may work. This is still
out of the scope of AMQP however.

I did look at XMPP for this part of the app but did not want to add
yet another server and deal with managing rosters etc since the bulk
of the app deals in much more traditional message paradigms.


On Mar 15, 6:50 am, Simon MacMullen <si... at rabbitmq.com> wrote:
> On 14/03/12 19:59, MattH wrote:
> > I have a queu and a client that will continuously poll the queu so at
> > any given moment I do not have an active consumer. However the web
> > management portal still shows the queue as as active which is correct
> > given my application. The question is how dose the portal determine
> > this and can I get access to this status programmatically?
> > I am using Spring AMQP but I can dial back to the real rabbit api if
> > needed. I alos looked a the HTTP API and did not see any equivalent to
> > the Status active which is displayed in the web portal.
> This information is far too obscure and implementation-specific to make
> available via AMQP :-)
> Via the management API, check if there's an idle_since key in the queue.
> If not, it's active.
> FTR, this just means "has the queue done *anything* in the last few
> seconds?". If the queue is idle for a while it hibernates, which cuts
> memory use and takes a little while to come back out of.
> I would be very wary of using this in an application though - queues can
> be woken up for all sorts of reasons. What were you planning on doing
> with the information?
> Cheers, Simon
> --
> Simon MacMullen
> RabbitMQ, VMware
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

More information about the rabbitmq-discuss mailing list