<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><span style="font-family: '.HelveticaNeueUI'; font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); -webkit-text-size-adjust: none; "><a href="http://www.rabbitmq.com/maxlength.html">http://www.rabbitmq.com/maxlength.html</a> ?</span></div><div><span style="font-family: '.HelveticaNeueUI'; font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); -webkit-text-size-adjust: none; ">I assume clients get a basic.reject from this.</span></div><div><br>On 6 Mar 2014, at 20:02, Sharath <<a href="mailto:sharathciddu@gmail.com">sharathciddu@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div style="font-family: arial, sans-serif;">I am implementing a system where jobs are submitted to the RabbitMQ based 'work queue' and the workers pick the jobs. </div><div style="font-family: arial, sans-serif;"><br></div><div style="font-family: arial, sans-serif;">However when the number of jobs in the queue are more than a certain number, I want to stop accepting any job submissions. I was wondering if there is any way using which we can get the number of messages/jobs in the queue and could you let me know the complexity of that call.</div><div style="font-family: arial, sans-serif;"><br></div><div style="font-family: arial, sans-serif;">One idea is to using queue declare with passive as true, but I am not sure if this is the most optimal way to do it.</div><div style="font-family: arial, sans-serif;"><br></div><div style="font-family: arial, sans-serif;">-Sharath</div></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>rabbitmq-discuss mailing list</span><br><span><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a></span><br><span><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a></span><br></div></blockquote></body></html>