<div dir="ltr">If your consumer(s) can't keep up with the workload, things are eventually going to queue up somewhere; you are just moving the problem somewhere else.<div><br></div><div>Do you have enough resources to run multiple consumers?</div>
<div><br></div><div>Set concurrentConsumers=n to increase the number of consumers in the listener container.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 28, 2014 at 5:09 PM, Anita Yip <span dir="ltr"><<a href="mailto:Anita.Yip@realpage.com" target="_blank">Anita.Yip@realpage.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word">
<div>
<div>
<div>The only problem is my consumer has heavy processing, and the messages are hanging in the queue, the queue size keep growing thus finally resulting in Out of Memory error.</div>
</div>
</div>
<div><b><br>
</b></div>
<span>
<div style="border-right:medium none;padding-right:0in;padding-left:0in;padding-top:3pt;text-align:left;font-size:11pt;border-bottom:medium none;font-family:Calibri;border-top:#b5c4df 1pt solid;padding-bottom:0in;border-left:medium none">

<span style="font-weight:bold">From: </span>Gary Russell <<a href="mailto:grussell@gopivotal.com" target="_blank">grussell@gopivotal.com</a>><br>
<span style="font-weight:bold">Reply-To: </span>Discussions about RabbitMQ <<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a>><br>
<span style="font-weight:bold">Date: </span>Friday, March 28, 2014 1:56 PM<br>
<span style="font-weight:bold">To: </span>Discussions about RabbitMQ <<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [rabbitmq-discuss] Spring amqp - auto acknowledge from consumer taking almost a minute<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">Your requirements seem to be a little unusual - you want the consumer to ack as soon as you get the message but before the processing completes.
<div><br>
</div>
<div>What if your consumer dies right after it acks - you'll still lose the message in that case.</div>
<div><br>
</div>
<div>If you don't care about that situation, simply hand off the task to another thread in your listener and the container will ack the message right after the handoff (with ackmode AUTO).</div>
<div><br>
</div>
<div>What is the objection to it being "unacked" until the consumer completes the work?</div>
<div><br>
</div>
<div>Gary</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Fri, Mar 28, 2014 at 4:49 PM, Anita Yip <span dir="ltr">
<<a href="mailto:Anita.Yip@realpage.com" target="_blank">Anita.Yip@realpage.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Does that mean no explicit acknowledgement is sent by consumer? What if<br>
the message is lost before it reaches the consumer? When will the message<br>
be removed from the queue in this case?<br>
<br>
<br>
<br>
On 3/28/14 12:06 AM, "Michael Klishin" <<a href="mailto:mklishin@gopivotal.com" target="_blank">mklishin@gopivotal.com</a>> wrote:<br>
<br>
>On 28 March 2014 at 10:06:21, Anita Yip (<a href="mailto:anita.yip@realpage.com" target="_blank">anita.yip@realpage.com</a>) wrote:<br>
>> > I see all the messages falling under "Deliver (noack)". Doesn't<br>
>> this mean that RabbitMq is not expecting/processing any<br>
>>acknowledgements<br>
>> from the consumer?<br>
><br>
>Correct. A message is then considered to be processed �as soon as RabbitMQ<br>
>sends it out.<br>
>--<br>
>MK<br>
><br>
>Software Engineer, Pivotal/RabbitMQ<br>
>_______________________________________________<br>
>rabbitmq-discuss mailing list<br>
><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">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>
<br>
<br>
________________________________<br>
<br>
This message is intended only for the use of the individual(s) or entity to which it is addressed and may contain information that is privileged, confidential, and/or proprietary to RealPage and its affiliated companies. If the reader of this message is not
 the intended recipient, you are hereby notified that any dissemination, distribution, forwarding or copying of this communication is prohibited without the express permission of the sender. If you have received this communication in error, please notify the
 sender immediately and delete the original message.<br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">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>
</div>
</div>
</div>
</span><br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
This message is intended only for the use of the individual(s) or entity to which it is addressed and may contain information that is privileged, confidential, and/or proprietary to RealPage and its affiliated companies. If the reader of this message is not
 the intended recipient, you are hereby notified that any dissemination, distribution, forwarding or copying of this communication is prohibited without the express permission of the sender. If you have received this communication in error, please notify the
 sender immediately and delete the original message.<br>
</font>
</div>

<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>
<br></blockquote></div><br></div>