[rabbitmq-discuss] Load balancing exchange

Matthias Radestock matthias at lshift.net
Mon Aug 18 18:26:26 BST 2008


Petr,

Petr Sturc wrote:
> I am trying following (in the route function)
> in order to get queue length
> 
>  {ok,_,QLen,_} = rabbit_amqqueue:stat( #amqqueue{pid = QPid}
> 
> , but QLen is always zero for all bound queues.
> 
> Any idea what I am doing wrong?

The above looks fine, and if you look at the code behind it you will see 
that there really isn't much that can go wrong here.

Note however that delivered-but-unacknowledged messages are not included 
in the message count - could that explain why you see a zero count when 
you don't expect to?


Matthias.




More information about the rabbitmq-discuss mailing list