<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19088"></HEAD>
<BODY>
<DIV><FONT face=Arial>
<DIV id=body class="mb cb fontsize2 ">
<DIV id=inbdy><A name=msg_c9cc14c924840370></A><FONT class=fixed_width
face="Courier, Monospaced">
<P>
<DIV style="DISPLAY: block" id=qhide_315340 class=qt><SPAN
class=179012621-22072011><FONT face=Arial>Thanks Michael and
Matt.</FONT></SPAN></DIV>
<DIV style="DISPLAY: block" class=qt><SPAN class=179012621-22072011><FONT
face=Arial></FONT></SPAN> </DIV>
<DIV style="DISPLAY: block" class=qt><SPAN class=179012621-22072011><FONT
face=Arial>In the attached, Matt says that with a QOS/prefetch of 1, I rabbitmq
will not let me read more than one message without acking
it.</FONT></SPAN></DIV>
<DIV style="DISPLAY: block" class=qt><SPAN class=179012621-22072011><FONT
face=Arial></FONT></SPAN> </DIV>
<DIV style="DISPLAY: block" class=qt><SPAN class=179012621-22072011><FONT
face=Arial>So, is it true then that if I set the prefetch number to 10, I
can read up to 10 without acking any of them?</FONT></SPAN></DIV>
<DIV style="DISPLAY: block" class=qt><SPAN class=179012621-22072011><FONT
face=Arial></FONT></SPAN> </DIV>
<DIV style="DISPLAY: block" class=qt><SPAN class=179012621-22072011><FONT
face=Arial>Thanks,</FONT></SPAN></DIV>
<DIV style="DISPLAY: block" class=qt><SPAN class=179012621-22072011><FONT
face=Arial> Lowell</FONT></SPAN></DIV>
<DIV style="DISPLAY: block" class=qt><SPAN class=179012621-22072011><FONT
face=Arial></FONT></SPAN> </DIV>
<DIV style="DISPLAY: block" class=qt><FONT face=Arial></FONT> </DIV>
<DIV style="DISPLAY: block" class=qt>On Fri, Jul 22, 2011 at 12:10:13PM -0400,
Lowell.Bo<A
href="blocked::http://groups.google.com/groups/unlock?_done=/group/rabbitmq-discuss/browse_thread/thread/c764b1ebb8471857&msg=c9cc14c924840370"
target=_parent>...</A>@emc.com wrote: <BR>> What happens to messages in
durable queues which have already been _read_ but which have not yet been
_acked_ when: <BR>
<P>> 1. rabbit is shutdown gracefully? <BR><BR></P></DIV>They are
requeued to the back of the queue. <BR>
<P>
<DIV style="DISPLAY: block" id=qhide_315341 class=qt>> 2. the consumer
channel closes abruptly -- say from crash, kill, or forced shutdown?
<BR><BR></DIV>They are requeued to the back of the queue. <BR>
<P>This is only relevant for persistent messages - transient messages will
<BR>be lost if rabbit dies in any way. <BR>
<P>The one exception to the requeuing at the back rule is if rabbit is hard
<BR>killed. There's a possibility that the fact that the message has been
<BR>delivered to a consumer has not been successfully recorded on disk. As
<BR>such, on recovery, the message may reappear at the front of the queue,
<BR>rather than the back. <BR>
<P>
<DIV style="DISPLAY: block" id=qhide_315342 class=qt>> The rabbitmq
documentation gives me the impression that I can read <BR>> messages from a
durable queue and choose not to ack them until I want <BR>> -- perhaps
hours later. Obviously, I have to watch my queue sizes in <BR>> this
situation. But what happens if the application never acks the <BR>>
messages before it terminates? What will happen when the <BR>>
rabbitmq-server is restarted or when or the program is restarted, will <BR>>
it get the messages again? <BR><BR></DIV>They are requeued to the back of the
queue. <BR>
<P>
<DIV style="DISPLAY: block" id=qhide_315343 class=qt>> Suppose I have
multiple consumers reading from the same durable queue <BR>> in a round robin
fashion (read ahead is 1) and one consumer has read <BR>> but not acked 10
messages. <BR><BR></DIV>Not possible. If qos prefetch is 1 then that consumer
will be sent at <BR>most 1 message at a time and will then receive no more until
it acks <BR>that message. <BR>
<P>
<DIV style="DISPLAY: block" id=qhide_315344 class=qt>> If it dies, or
at least closes the <BR>> connection abruptly, will those 10 messages be sent
to the other <BR>> consumers to read? <BR><BR></DIV>Yes. <BR>
<P>Matthew <BR></P></FONT></DIV></DIV></FONT></DIV></BODY></HTML>