[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-users
Subject:    Re: Disabling prefetch
From:       Justin Bertram <jbertram () apache ! org>
Date:       2022-09-30 13:56:32
Message-ID: CAF+kE=TuTvQuTfTpjJgcy4363t4qMyk1R+N_uDXzVZKPfrEvZQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


As Clebert mentioned you should set consumerWindowSize=0, but you'd do that
on the connection URL (e.g. tcp://localhost:61616?consumerWindowSize=0)
rather than when you create the queue. More details are available in the
documentation [1].


Justin

[1]
https://activemq.apache.org/components/artemis/documentation/latest/flow-control.html

On Thu, Sep 29, 2022 at 5:12 PM John Lilley
<john.lilley@redpointglobal.com.invalid> wrote:

> Related to my previous post ("Processing only one message"), under AMQ 5
> I've had to disable prefetch to prevent a  "batch server" from hogging
> messages for a while until it is done and closes the consumer/session (at
> which point the un-ACKed messages are delivered to other servers).  This
> was done by decorating the queue name:
>
> *if *(*disablePrefetch*) {
>
> *// See https://activemq.apache.org/what-is-the-prefetch-limit-for
> <https://activemq.apache.org/what-is-the-prefetch-limit-for>    *queueName
> = queueName + *"?consumer.prefetchSize=1"*;
> }
>
>
>
> I am unsure, but I suspect this approach doesn't work for Artemis.  What
> should I do instead?  Or maybe the answer to my previous post will make
> this moot.
>
>
>
> Thanks
>
> john
>
> [image: rg] <https://www.redpointglobal.com/>
>
> John Lilley
>
> Chief Architect, Redpoint Global Inc.
>
> 888 Worcester Street, Suite 200 Wellesley, MA 02482
>
> *M: *+1 7209385761 <+1%207209385761> | john.lilley@redpointglobal.com
>
> PLEASE NOTE: This e-mail from Redpoint Global Inc. ("Redpoint") is
> confidential and is intended solely for the use of the individual(s) to
> whom it is addressed. If you believe you received this e-mail in error,
> please notify the sender immediately, delete the e-mail from your computer
> and do not copy, print or disclose it to anyone else. If you properly
> received this e-mail as a customer, partner or vendor of Redpoint, you
> should maintain its contents in confidence subject to the terms and
> conditions of your agreement(s) with Redpoint.
>

[Attachment #5 (text/html)]

<div dir="ltr"><div>As Clebert mentioned you should set consumerWindowSize=0, but \
you&#39;d do that on the connection URL (e.g. \
tcp://localhost:61616?consumerWindowSize=0) rather than when you create the queue. \
More details are available in the documentation \
[1].</div><div><br></div><div><br></div><div>Justin</div><div><br></div><div>[1] <a \
href="https://activemq.apache.org/components/artemis/documentation/latest/flow-control \
.html">https://activemq.apache.org/components/artemis/documentation/latest/flow-control.html</a></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 29, 2022 at 5:12 PM \
John Lilley &lt;john.lilley@redpointglobal.com.invalid&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div \
class="msg-7396008157472718563">





<div style="overflow-wrap: break-word;" lang="EN-US">
<div class="m_-7396008157472718563WordSection1">
<p class="MsoNormal">Related to my previous post ("Processing only one message"), \
under AMQ 5 I've had to disable prefetch to prevent a   "batch server" from hogging \
messages for a while until it is done and closes the consumer/session (at which point \
the un-ACKed  messages are delivered to other servers).   This was done by decorating \
the queue name:<u></u><u></u></p> <p class="MsoNormal" style="background:white none \
repeat scroll 0% 0%"><b><span style="font-size:10pt;font-family:&quot;Courier \
New&quot;;color:navy">if </span></b><span \
style="font-size:10pt;font-family:&quot;Courier \
New&quot;;color:black">(</span><b><span \
style="font-size:10pt;font-family:&quot;Courier \
New&quot;;color:rgb(102,14,122)">disablePrefetch</span></b><span \
style="font-size:10pt;font-family:&quot;Courier New&quot;;color:black">)  {<br>
     </span><i><span style="font-size:10pt;font-family:&quot;Courier \
New&quot;;color:gray">// See <a \
href="https://activemq.apache.org/what-is-the-prefetch-limit-for" \
                target="_blank">https://activemq.apache.org/what-is-the-prefetch-limit-for</a><br>
                
     </span></i><span style="font-size:10pt;font-family:&quot;Courier \
New&quot;;color:black">queueName = queueName + </span><b><span \
style="font-size:10pt;font-family:&quot;Courier \
New&quot;;color:green">&quot;?consumer.prefetchSize=1&quot;</span></b><span \
style="font-size:10pt;font-family:&quot;Courier New&quot;;color:black">;<br> \
}<u></u><u></u></span></p> <p class="MsoNormal"><u></u>  <u></u></p>
<p class="MsoNormal">I am unsure, but I suspect this approach doesn't work for \
Artemis.   What should I do instead?   Or maybe the answer to my previous post will \
make this moot.<u></u><u></u></p> <p class="MsoNormal"><u></u>  <u></u></p>
<p class="MsoNormal">Thanks<u></u><u></u></p>
<p class="MsoNormal">john<u></u><u></u></p>
</div>
<br>
<table style="font-family:sans-serif;box-sizing:initial;max-width:580px;color:rgb(54,54,54);border-collapse:collapse;line-height:1.5" \
cellspacing="0" cellpadding="0" border="0"> <tbody>
<tr>
<td valign="top">
<table style="font-family:sans-serif;border-collapse:collapse;color:rgb(50,50,50);width:480px;line-height:16px" \
width="500" cellspacing="0" cellpadding="0" border="0"> <tbody>
<tr>
<td style="padding-right:10px" width="95" valign="middle">
<p style="margin:0.75pt;line-height:0px"><a href="https://www.redpointglobal.com/" \
target="_blank"><img style="border: 0px none; display: block; border-radius: 0px;" \
alt="rg" src="cid:1838ea9614678c893661" width="67" height="67"> </a></p>
</td>
<td width="600" valign="middle">
<table style="font-family:sans-serif;border-collapse:collapse;color:rgb(50,50,50);width:600px;line-height:16px" \
width="600" cellspacing="0" cellpadding="0" border="0"> <tbody>
<tr>
<td valign="top">
<p style="margin:0.75pt;color:rgb(165,36,24);font-size:14px;font-family:Arial,sans-serif;font-weight:bold">
 John Lilley </p>
</td>
</tr>
<tr>
<td valign="top">
<p style="margin:0.75pt;font-size:13px;font-family:Arial,sans-serif;color:rgb(0,0,0);font-weight:bold">
 <span>Chief Architect, Redpoint Global Inc.</span> </p>
</td>
</tr>
<tr>
<td valign="top">
<p style="margin:0.75pt;font-size:13px;font-family:Arial,sans-serif;color:rgb(97,97,97)">
 <span>888 Worcester Street, Suite 200 Wellesley, MA 02482</span> </p>
</td>
</tr>
<tr>
<td valign="top">
<p style="margin:0.75pt;font-size:13px;font-family:Arial,sans-serif;color:rgb(97,97,97)">
 <b>M: </b><a href="tel:+1%207209385761" \
style="text-decoration:none;color:rgb(97,97,97)" target="_blank">+1 7209385761</a> \
<span style="color:rgb(165,36,24)">|</span> <a \
href="mailto:john.lilley@redpointglobal.com" \
style="text-decoration:underline;color:rgb(45,98,187)" target="_blank"> \
john.lilley@redpointglobal.com</a> </p> </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
PLEASE NOTE: This e-mail from Redpoint Global Inc. ("Redpoint") is confidential and \
is intended solely for the use of the individual(s) to whom it is addressed. If you \
believe you received this e-mail in error, please notify the sender immediately, \
delete the  e-mail from your computer and do not copy, print or disclose it to anyone \
else. If you properly received this e-mail as a customer, partner or vendor of \
Redpoint, you should maintain its contents in confidence subject to the terms and \
conditions of your agreement(s)  with Redpoint.
</div>

</div></blockquote></div>

--0000000000001408c805e9e55eb7--



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic