<div dir="ltr"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Message: 20<br>
Date: Wed, 8 May 2013 10:26:10 +0100<br>
From: Tim Watson &lt;<a href="mailto:tim@rabbitmq.com">tim@rabbitmq.com</a>&gt;<br>
Subject: Re: [rabbitmq-discuss] does client caches messages?<br>
To: Discussions about RabbitMQ &lt;<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>&gt;<br>
Message-ID: &lt;<a href="mailto:1746F344-A2D6-4DCE-9328-36EEA5379374@rabbitmq.com">1746F344-A2D6-4DCE-9328-36EEA5379374@rabbitmq.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Hi,<br>
<br>
On 8 May 2013, at 09:33, Mohsen Lotfizad wrote:<br>
<br>
&gt; I have a subscriber that consumes from server but doesn&#39;t ACK immediately because message processing involves database operation. If database operations goes well, then ACK will be sent, otherwise message save in db and then ACK will send.<br>


&gt;<br>
<br>
That sounds fine.<br></blockquote></div><br><br>Hi,<br>In fact I just want to know when I set prefetch_cont=2, why my consumer try to give about 700 messages?<br>I attached a copy of RabbitMQ Management here:<br><br><div id="main" style="color:rgb(72,72,72);font-family:Verdana,sans-serif;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

<h1 style="font-size:2em;font-weight:normal;padding:0px">Channels</h1><div class="updatable"><table class="list" style="border-collapse:collapse;border-width:1px;border-bottom-style:solid;border-bottom-color:rgb(204,204,204);margin-bottom:1em">

<thead><tr><th colspan="1" style="font-weight:normal;color:black;font-style:normal;font-variant:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;vertical-align:top;min-width:5em;width:auto;border:1px solid rgb(204,204,204);text-align:center">

<br></th><th colspan="7" style="font-weight:normal;color:black;font-style:normal;font-variant:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;vertical-align:top;min-width:5em;width:auto;border:1px solid rgb(204,204,204);text-align:center">

Details</th></tr><tr><th style="font-weight:normal;color:black;font-style:normal;font-variant:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;vertical-align:top;min-width:5em;width:auto;border:1px solid rgb(204,204,204);text-align:center">

<a class="sort" style="display:block;width:107px;color:black;font-weight:bold;text-decoration:none">Channel</a></th><th style="font-weight:normal;color:black;font-style:normal;font-variant:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;vertical-align:top;min-width:5em;width:auto;border:1px solid rgb(204,204,204);text-align:center">

<a class="sort" style="display:block;width:65px;color:black;font-weight:bold;text-decoration:none">Virtual host</a></th><th style="font-weight:normal;color:black;font-style:normal;font-variant:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;vertical-align:top;min-width:5em;width:auto;border:1px solid rgb(204,204,204);text-align:center">

<a class="sort" style="display:block;width:62px;color:black;font-weight:bold;text-decoration:none">User name</a></th><th style="font-weight:normal;color:black;font-style:normal;font-variant:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;vertical-align:top;min-width:5em;width:auto;border:1px solid rgb(204,204,204);text-align:center">

Mode<span class="Apple-converted-space">�</span><span class="help" id="channel-mode" style="color:rgb(136,136,136)">(?)</span></th><th style="font-weight:normal;color:black;font-style:normal;font-variant:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;vertical-align:top;min-width:5em;width:auto;border:1px solid rgb(204,204,204);text-align:center">

<a class="sort" style="display:block;width:60px;color:black;font-weight:bold;text-decoration:none">Prefetch</a></th><th style="font-weight:normal;color:black;font-style:normal;font-variant:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;vertical-align:top;min-width:5em;width:auto;border:1px solid rgb(204,204,204);text-align:center">

<a class="sort" style="display:block;width:60px;color:black;font-weight:bold;text-decoration:none">Unacked</a></th><th style="font-weight:normal;color:black;font-style:normal;font-variant:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;vertical-align:top;min-width:5em;width:auto;border:1px solid rgb(204,204,204);text-align:center">

<a class="sort" style="display:block;width:73px;color:black;font-weight:bold;text-decoration:none">Unconfirmed</a></th><th style="font-weight:normal;color:black;font-style:normal;font-variant:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;vertical-align:top;min-width:5em;width:auto;border:1px solid rgb(204,204,204);text-align:center">

<a class="sort" style="display:block;width:60px;color:black;font-weight:bold;text-decoration:none">Status</a></th></tr></thead><tbody><tr class="alt1"><td style="font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;vertical-align:top;min-width:5em;width:auto;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(rgb(240,240,240)),to(rgb(224,224,224)));background-repeat:initial initial">

<a href="http://127.0.0.1:15672/#/channels/127.0.0.1%3A56137%20-%3E%20127.0.0.1%3A5672%20(2)" style="display:block;width:107px;color:black;font-weight:bold;text-decoration:none">127.0.0.1:56137 (2)</a></td><td class="c" style="font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;text-align:center!important;vertical-align:top;min-width:5em;width:auto;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(rgb(240,240,240)),to(rgb(224,224,224)));background-repeat:initial initial">

/</td><td class="c" style="font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;text-align:center!important;vertical-align:top;min-width:5em;width:auto;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(rgb(240,240,240)),to(rgb(224,224,224)));background-repeat:initial initial">

guest</td><td class="l" style="font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;text-align:left!important;vertical-align:top;min-width:5em;width:auto;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(rgb(240,240,240)),to(rgb(224,224,224)));background-repeat:initial initial">

<br></td><td class="c" style="font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;text-align:center!important;vertical-align:top;min-width:5em;width:auto;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(rgb(240,240,240)),to(rgb(224,224,224)));background-repeat:initial initial">

2</td><td class="c" style="font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;text-align:center!important;vertical-align:top;min-width:5em;width:auto;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(rgb(240,240,240)),to(rgb(224,224,224)));background-repeat:initial initial">

700</td><td class="c" style="font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;text-align:center!important;vertical-align:top;min-width:5em;width:auto;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(rgb(240,240,240)),to(rgb(224,224,224)));background-repeat:initial initial">

0</td><td class="c" style="font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;text-align:center!important;vertical-align:top;min-width:5em;width:auto;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(rgb(240,240,240)),to(rgb(224,224,224)));background-repeat:initial initial">

<acronym title="Idle since 2013-05-11 11:48:27" style="background-color:rgb(170,221,221);color:rgb(34,34,34);padding:2px 4px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px;border:none;background-repeat:initial initial">Idle</acronym></td>

</tr><tr class="alt2"><td style="font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;vertical-align:top;min-width:5em;width:auto;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(rgb(248,248,248)),to(rgb(255,255,255)));background-repeat:initial initial">

<a href="http://127.0.0.1:15672/#/channels/127.0.0.1%3A56137%20-%3E%20127.0.0.1%3A5672%20(3)" style="display:block;width:107px;color:black;font-weight:bold;text-decoration:none">127.0.0.1:56137 (3)</a></td><td class="c" style="font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;text-align:center!important;vertical-align:top;min-width:5em;width:auto;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(rgb(248,248,248)),to(rgb(255,255,255)));background-repeat:initial initial">

/</td><td class="c" style="font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;text-align:center!important;vertical-align:top;min-width:5em;width:auto;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(rgb(248,248,248)),to(rgb(255,255,255)));background-repeat:initial initial">

guest</td><td class="l" style="font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;text-align:left!important;vertical-align:top;min-width:5em;width:auto;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(rgb(248,248,248)),to(rgb(255,255,255)));background-repeat:initial initial">

<br></td><td class="c" style="font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;text-align:center!important;vertical-align:top;min-width:5em;width:auto;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(rgb(248,248,248)),to(rgb(255,255,255)));background-repeat:initial initial">

2</td><td class="c" style="font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;text-align:center!important;vertical-align:top;min-width:5em;width:auto;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(rgb(248,248,248)),to(rgb(255,255,255)));background-repeat:initial initial">

302</td><td class="c" style="font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;text-align:center!important;vertical-align:top;min-width:5em;width:auto;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(rgb(248,248,248)),to(rgb(255,255,255)));background-repeat:initial initial">

0</td><td class="c" style="font-style:normal;font-variant:normal;font-weight:normal;font-size:12px;line-height:17px;font-family:Verdana,sans-serif;padding:4px;text-align:center!important;vertical-align:top;min-width:5em;width:auto;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);border-right-width:1px;border-right-style:solid;border-right-color:rgb(204,204,204);background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(rgb(248,248,248)),to(rgb(255,255,255)));background-repeat:initial initial">

<acronym title="Idle since 2013-05-11 11:48:33" style="background-color:rgb(170,221,221);color:rgb(34,34,34);padding:2px 4px;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px;border:none;background-repeat:initial initial">Idle</acronym></td>

</tr></tbody></table></div></div>Thanks<br><br></div>