<span style="font-family:'lucida Grande',Verdana;font-size:14px;line-height:23px;background-color:rgb(255,255,255)">Thanks for you answers . if we have a queue ,and many consumers</span><br style="font-family:'lucida Grande',Verdana;font-size:14px;line-height:23px;background-color:rgb(255,255,255)">
<span style="font-family:'lucida Grande',Verdana;font-size:14px;line-height:23px;background-color:rgb(255,255,255)">> subscribe the queue,these consumers has a common prefetch</span><br style="font-family:'lucida Grande',Verdana;font-size:14px;line-height:23px;background-color:rgb(255,255,255)">
<span style="font-family:'lucida Grande',Verdana;font-size:14px;line-height:23px;background-color:rgb(255,255,255)">> value,assuming it is 20.if the queue has 20 msg , the rabbitmq will send</span><br style="font-family:'lucida Grande',Verdana;font-size:14px;line-height:23px;background-color:rgb(255,255,255)">
<span style="font-family:'lucida Grande',Verdana;font-size:14px;line-height:23px;background-color:rgb(255,255,255)">> the whole msg to one queue or every queue ?. if send to one ,it means</span><br style="font-family:'lucida Grande',Verdana;font-size:14px;line-height:23px;background-color:rgb(255,255,255)">
<span style="font-family:'lucida Grande',Verdana;font-size:14px;line-height:23px;background-color:rgb(255,255,255)">> other consumers will be idle ? </span> <br><br><div class="gmail_quote">2012/10/24 Emile Joubert <span dir="ltr"><<a href="mailto:emile@rabbitmq.com" target="_blank">emile@rabbitmq.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Andy,<br>
<div class="im"><br>
On 23/10/12 00:43, Dµ÷µÄ#ů¶¬ wrote:<br>
> 1. In offical website ,it describe that :" it is useful to be able to<br>
> specify how many messages each consumer can be sent at once before<br>
> sending the next acknowledgement" . when we first request the server, we<br>
> can get the amount which defined by prefetch of messages into my<br>
> client buffere pool,then my application will process it,if it can be<br>
> successfully processed ,the client need send a ACK back to the server,<br>
> to notice server that the message can be delete.Next,I doubt that<br>
> whether the server will re-send some new messages to client? and the<br>
> amount equals the value of the prefetch or not ?<br>
<br>
</div>That is correct. As soon as the client send an ACK to the server, the<br>
server will send more messages. The multiple flag was set then many<br>
messages may be sent (up to prefetch messages). If the multiple flag was<br>
not set then only one message will be sent:<br>
<a href="http://www.rabbitmq.com/amqp-0-9-1-reference.html#basic.ack.multiple" target="_blank">http://www.rabbitmq.com/amqp-0-9-1-reference.html#basic.ack.multiple</a><br>
If there are no messages in the queue, then the client must wait until<br>
more messages arrive.<br>
<div class="im"><br>
> 2.when the prefetch define will has effect on my application?<br>
<br>
</div>If your application is driven by a queue subscription then it may well<br>
have an effect.<br>
<br>
<br>
-Emile<br>
<br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
</blockquote></div><br>