Description of problem: qpid-stat -q reports a given queue n times for an n node cluster Version-Release number of selected component (if applicable): qpid trunk r980198 How reproducible: 100% Steps to Reproduce: 1. start n node cluster (where n > 1) 2. add a queue (e.g. qpid-config add queue my-queue) 3. qpid-stat -q Actual results: The created queue appears n times. Expected results: The created queue should really only appear once.
It seems that qpid-stat is designed to act this way. When qpid-stat connects to the target broker, it sends a query for the package "cluster", and, if present, it then queries for a list of cluster objects. Using that list of cluster objects, it builds up a list of ip-address:port addresses for each broker in the cluster. It then sends a separate query to each of these brokers, which results in the duplicate entries. It would be trivial to disable this behavior by default, and add a command line option if the old behavior is desired.
Created attachment 435445 [details] proposed fix Changes the behavior of qpid-stat to ignore cluster configuration, unless the option "-C | --cluster" is supplied.
Comment on attachment 435445 [details] proposed fix Looks good to me, and would lead to more intuitive behaviour by default without sacrificing the full (redundant) listing where desired. Ted, what do you think?
Submitted above patch upstream: Committed revision 980766.
Merged to mrg_1.3.x: http://mrg1.lab.bos.redhat.com/git/?p=qpid.git;a=commitdiff;h=a1119ab2626f9d91fa0df2fa1d4ac7cd792075a9
Verified on qpid-tools-0.7.946106-10.el5 # qpid-stat -q | awk '{print $1}' | sed 1,3d | sort | uniq -c 1 my-queue 1 qmfc-v2-hb-slanina.24315.1 1 qmfc-v2-slanina.24315.1 1 qmfc-v2-ui-slanina.24315.1 1 reply-slanina.24315.1 1 topic-slanina.24315.1 # qpid-stat -Cq | awk '{print $2}' | sed 1,3d | sort | uniq -c 2 my-queue 2 qmfc-v2-hb-slanina.24157.2 1 qmfc-v2-hb-slanina.24157.3 2 qmfc-v2-slanina.24157.2 1 qmfc-v2-slanina.24157.3 2 qmfc-v2-ui-slanina.24157.2 1 qmfc-v2-ui-slanina.24157.3 2 reply-slanina.24157.2 1 reply-slanina.24157.3 2 topic-slanina.24157.2 1 topic-slanina.24157.3