[rabbitmq-discuss] duplicate 'messages' queue attribute in HTTP API JSON response?

Brian K. Jones bkjones at gmail.com
Thu Jun 2 15:47:00 BST 2011


Here's the data, only slightly prettified:



[{"memory":7512,
"messages":0,
"consumer_details":[],
"idle_since":"2011-6-2 10:11:16",
"exclusive_consumer_pid":"",
"exclusive_consumer_tag":"",
"messages_ready":0,
"messages_unacknowledged":0,
"messages":0,
"consumers":0,
"backing_queue_status":{"q1":0,"q2":0,"delta":["delta","undefined",0,"undefined"],"q3":0,"q4":0,"len":0,"pending_acks":0,"outstanding_txns":0,"target_ram_count":"infinity","ram_msg_count":0,"ram_ack_count":0,"ram_index_count":0,"next_seq_id":8,"persistent_count":0,"avg_ingress_rate":0.0052629918611936,"avg_egress_rate":0.0052629918611936,"avg_ack_ingress_rate":0.0,"avg_ack_egress_rate":0.0},
"name":"aliveness-test",
"vhost":"/",
"durable":false,
"auto_delete":false,
"owner_pid":"none",
"arguments":{},
"pid":"<rabbit at newhotness.3.461.0>",
"node":"rabbit at newhotness"}, 

{"memory":14664,
"messages":1,
"consumer_details":[],
"idle_since":"2011-6-2 10:19:11",
"exclusive_consumer_pid":"",
"exclusive_consumer_tag":"",
"messages_ready":1,
"messages_unacknowledged":0,
"messages":1,
"consumers":0,
"backing_queue_status":{"q1":0,"q2":0,"delta":["delta","undefined",0,"undefined"],"q3":0,"q4":1,"len":1,"pending_acks":0,"outstanding_txns":0,"target_ram_count":"infinity","ram_msg_count":1,"ram_ack_count":0,"ram_index_count":0,"next_seq_id":1,"persistent_count":1,"avg_ingress_rate":0.0003672439900472369,"avg_egress_rate":0.0,"avg_ack_ingress_rate":0.0,"avg_ack_egress_rate":0.0},
"name":"testq",
"vhost":"/",
"durable":true,
"auto_delete":false,
"owner_pid":"none",
"arguments":{},
"pid":"<rabbit at newhotness.3.233.0>",
"node":"rabbit at newhotness"},

{"memory":12256,
"messages":0,
"consumer_details":[],
"idle_since":"2011-6-2 9:33:46",
"exclusive_consumer_pid":"",
"exclusive_consumer_tag":"",
"messages_ready":0,
"messages_unacknowledged":0,
"messages":0,
"consumers":0,
"backing_queue_status":{"q1":0,"q2":0,"delta":["delta","undefined",0,"undefined"],"q3":0,"q4":0,"len":0,"pending_acks":0,"outstanding_txns":0,"target_ram_count":"infinity","ram_msg_count":0,"ram_ack_count":0,"ram_index_count":0,"next_seq_id":0,"persistent_count":0,"avg_ingress_rate":0.0,"avg_egress_rate":0.0,"avg_ack_ingress_rate":0.0,"avg_ack_egress_rate":0.0},
"name":"test123",
"vhost":"testvhost",
"durable":true,
"auto_delete":false,
"owner_pid":"none",
"arguments":{},
"pid":"<rabbit at newhotness.3.232.0>",
"node":"rabbit at newhotness"}]


-- 
Brian K. Jones
Sent over the internet
My blog: http://www.protocolostomy.com
Follow me: http://twitter.com/bkjones


On Thursday, June 2, 2011 at 10:21 AM, Brian K. Jones wrote:

> Hi all, 
> 
> I'm running RabbitMQ w/ the mgmt plugin and I discovered while using the HTTP API that when I ask for /api/queues, the JSON response is a list of JSON objects that each have *two* instances of the "messages" attribute. Is this a bug? If so, is it fixed somewhere already? Is there any reason for the code I'm writing not to throw away the duplicate? I did a quick test and published a message that went to one of the queues, and confirmed that both instances of "messages" has the same value whether there are messages in the queue or not. 
> 
> I'm using v. 2.4.1 on a mac, if it helps. :) 
> 
> brian
> 
> -- 
> Brian K. Jones
> Sent over the internet
> My blog: http://www.protocolostomy.com
> Follow me: http://twitter.com/bkjones
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110602/8a9c63db/attachment.htm>


More information about the rabbitmq-discuss mailing list