<div><font color="#222222" face="arial, sans-serif">Hi,</font></div><div><font color="#222222" face="arial, sans-serif"><br></font></div><div><font color="#222222" face="arial, sans-serif">When passively declaring a queue, the returned consumer count is not the same as the consumer count via the management plugin / http API. Turns out, rabbitmq returns the number of consumers that are ready to receive a message.</font></div>

<div><font color="#222222" face="arial, sans-serif"><br></font></div><div><font color="#222222" face="arial, sans-serif">As an example: there are 5 (manually acknowledging) consumers, 3 of which have consumed a message from the queue, but have not sent an ACK for the respective messages to the broker. Declaring a queue now returns a declare-ok with consumer-count == 2, whereas I would have expected it to be 5.</font></div>

<div><font color="#222222" face="arial, sans-serif"><br></font></div><div><font color="#222222" face="arial, sans-serif">Looking at the rabbitmq-server code reveals that the &quot;active consumer&quot; part of the state is used for getting the next consumer for round robin delivery and returning the number of consumers as part of the declare-ok message.</font></div>

<div><font color="#222222" face="arial, sans-serif"><br></font></div><div><font color="#222222" face="arial, sans-serif">Since I don&#39;t suspect this to be an oversight but rather a conscious decision, I&#39;m interested in the rationale behind it. I&#39;m aware that changing the semantics at this point is probably not possible and I may have to resort to fetching the consumer count via the http api (which brings some organizational overhead).</font></div>

<div><font color="#222222" face="arial, sans-serif"><br></font></div><div><font color="#222222" face="arial, sans-serif">Can anybody shed some light on this?</font></div><div><font color="#222222" face="arial, sans-serif"><br>

</font></div><div><font color="#222222" face="arial, sans-serif">Cheers,</font></div><div><font color="#222222" face="arial, sans-serif">  Gerolf</font></div>