You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by John Lilley <jo...@redpointglobal.com.INVALID> on 2022/09/29 22:11:24 UTC

Disabling prefetch

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
   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


[rg] <https://www.redpointglobal.com/>

John Lilley

Chief Architect, Redpoint Global Inc.

888 Worcester Street, Suite 200 Wellesley, MA 02482

M: +1 7209385761<tel:+1%207209385761> | john.lilley@redpointglobal.com<ma...@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.

Re: Disabling prefetch

Posted by Justin Bertram <jb...@apache.org>.
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
<jo...@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.
>

Re: Disabling prefetch

Posted by Robbie Gemmell <ro...@gmail.com>.
It should work as the 2.0+ specs were specifically updated to say that you
can close the consumer inside its own MessageListener and onMessage will
'complete normally', which in this case would involve acking the message
for auto-ack. That was later called out specifically:

"If the session mode is AUTO_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE then any
messages delivered to the application will be automatically acknowledged as
normal."

On Mon, 3 Oct 2022 at 22:35, John Lilley
<jo...@redpointglobal.com.invalid> wrote:

> Robbie,
>
>
>
> Ah I see.  Yes, I don’t think closing in the background works for my case,
> because the whole point is closing before the next message is delivered to
> get the “handle only one message” behavior.
>
>
>
> Closing the consumer does “work” in the sense that it stops the consumer,
> but it has a side-effect of disabling the auto-ACK before the onMessage()
> returns, so the message is delivered again (to another consumer).
>
>
>
> I don’t know enough about the JMS spec to say what should work and what is
> bug.  If you think that close-consumer-from-inside-onMessage should work, I
> can find a simple project to reproduce it for a bug report.
>
>
>
> 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
>
> *From:* Robbie Gemmell <ro...@gmail.com>
> *Sent:* Monday, October 3, 2022 11:05 AM
> *To:* users@activemq.apache.org
> *Subject:* Re: Disabling prefetch
>
>
>
> **** [Caution] This email is from an external source. Please use caution
> responding, opening attachments or clicking embedded links. ****
>
>
>
> I think the suggestion was as a potential workaround for
> close-inside-auto-ack-listener behaviour, since it then wouldnt be trying
> to close within the listener. However it is a bug if that is not working
> (you should probably raise a JIRA with a minimal reproducer of your issue).
> Even if you did close from another thread you would also presumably have to
> stop the connection first also for prefetching to not then come into play
> when onMessage had completed.
>
>
>
> On Mon, 3 Oct 2022 at 14:55, John Lilley <
> john.lilley@redpointglobal.com.invalid> wrote:
>
> Clebert,
>
>
>
> Thanks for the update.  But I don’t understand the advantage of closing
> the consumer in a background thread.  Is it potentially long-running?
>
>
>
> john
>
>
>
>
>
> [image: rg]
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,Yp7nAk12BLQ7eR6aLI1gLChiMcvzQ6eVHnANWYybcyE1CSKfDDZVWk1MokPKXHdacLDOFFe-j5itb6sAf6pnir6DXh0PHtuKSyULm1n1QXbBtgi_Bo7TSCLFayg,&typo=1>
>
> *John Lilley *
>
> *Chief Architect, Redpoint Global Inc. *
>
> 888 Worcester Street, Suite 200 Wellesley, MA 02482
>
> *M: *+1 7209385761 <+1%207209385761> | john.lilley@redpointglobal.com
>
> *From:* Clebert Suconic <cl...@gmail.com>
> *Sent:* Sunday, October 2, 2022 9:30 AM
> *To:* users@activemq.apache.org
> *Subject:* Re: Disabling prefetch
>
>
>
> **** [Caution] This email is from an external source. Please use caution
> responding, opening attachments or clicking embedded links. ****
>
>
>
> singleThreadExecutor.execute (() -> this.closeConsumer(consumer));
>
>
>
> private void closeConsumer(MessageConsumer consumer) {
>
>     try {
>
>          consumer.close();
>
>    }
>
>   catch (Exception e) {
>
>      logger.warn(e.getMessage, e);
>
>   }
>
> }
>
>
>
>
>
> A good thing of using the listener still is that you save some threads in
> your client.
>
>
>
>
>
> if you close from an executor, you're safe.
>
>
>
> On Sat, Oct 1, 2022 at 3:12 PM John Lilley <
> john.lilley@redpointglobal.com.invalid> wrote:
>
> FYI, I developed an aversion to using receive() back when I was originally
> building our POC with RabbitMQ and trying to build our framework around
> receive() instead of onMessage(), but found that RabbitMQ’s JMS receive()
> implementation was broken.  Eventually we decided that ActiveMQ was a
> better choice, but our use of onMessage() was by then solidified.
>
>
>
> Cheers,
>
> john
>
>
>
>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> *John Lilley
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
> *Chief Architect, Redpoint Global Inc.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
> 888 Worcester Street, Suite 200 Wellesley, MA 02482
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> *M: +1 7209385761 | john.lilley@redpointglobal.com
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
>
>
>
> *From: John Lilley <jo...@redpointglobal.com.INVALID> Sent:
> Saturday, October 1, 2022 12:07 PM To: users@activemq.apache.org Subject:
> RE: Disabling prefetch
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> **** [Caution] This email is from an external source. Please use caution
> responding, opening attachments or clicking embedded links. ***
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> Understood… unfortunately we have a framework that generates code using
> onMessage() and it is a matter of expedience not to change that whole
> framework right now.  However I would like to change it to use receive()
> once the rest of our Artemis migration is validated.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> john
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> *John Lilley
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
> *Chief Architect, Redpoint Global Inc.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
> 888 Worcester Street, Suite 200 Wellesley, MA 02482
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> *M: +1 7209385761 | john.lilley@redpointglobal.com
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
>
>
>
> *From: Clebert Suconic <cl...@gmail.com> Sent: Friday, September
> 30, 2022 9:01 PM To: users@activemq.apache.org Subject: Re: Disabling
> prefetch
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> **** [Caution] This email is from an external source. Please use caution
> responding, opening attachments or clicking embedded links. ***
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> I would not use a listener for a consumer that will only receive a single
> message anyways.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> On Fri, Sep 30, 2022 at 9:46 AM John Lilley <
> *john.lilley@redpointglobal.com.invalid*> wrote:
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> Clebert,
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> Thanks for the reply.  I’ll try your suggestion.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> I’m not closing the consumer specifically to clear the prefetch buffer;
> rather I’m closing the consumer to stop receiving more messages.  The
> existence of pre-fetch messages is undesirable in that case, because (1) as
> you point out it is an anti-pattern, and (2) a process that fails to close
> its consumer in a timely fashion will hog the prefetched messages and
> prevent others from processing them.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> john
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> *John Lilley
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
> *Chief Architect, Redpoint Global Inc.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
> *888 Worcester Street, Suite 200 Wellesley, MA 02482*
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> *M: +1 7209385761 | john.lilley@redpointglobal.com
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
>
>
>
> *From: Clebert Suconic <cl...@gmail.com> Sent: Friday, September
> 30, 2022 6:12 AM To: users@activemq.apache.org Subject: Re: Disabling
> prefetch
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> **** [Caution] This email is from an external source. Please use caution
> responding, opening attachments or clicking embedded links. ***
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> BTW closing a consumer to clear the fetched buffer is an anti pattern
> either AMQ5 or Artemis. Set no prefetch or any slow consumer option
> instead.  That would be a waste of network and CPU.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> On Fri, Sep 30, 2022 at 4:33 AM Clebert Suconic <
> *clebert.suconic@gmail.com*> wrote:
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> This is done by setting consumerWindowSize to 0 in your connections.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> There a note about slow consumers in the documentation.  I’m on the phone
> now and I can’t get you a link.  If you can’t find it let me know and I
> will post it for you.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> On Thu, Sep 29, 2022 at 6:13 PM John Lilley <
> *john.lilley@redpointglobal.com.invalid*> wrote:
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> 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:
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
>
>
> *if (disablePrefetch) {    // See
> https://activemq.apache.org/what-is-the-prefetch-limit-for    queueName =
> queueName + "?consumer.prefetchSize=1"; }
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=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.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> Thanks
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> john
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> *John Lilley
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
> *Chief Architect, Redpoint Global Inc.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
> *888 Worcester Street, Suite 200 Wellesley, MA 02482*
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> *M: +1 7209385761 | john.lilley@redpointglobal.com
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>*
>
>
> 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.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> --
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> Clebert Suconic
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> --
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> Clebert Suconic
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> 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.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> --
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> Clebert Suconic
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> 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.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> 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.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> --
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> Clebert Suconic
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> 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.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
>
> 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.
>

RE: Disabling prefetch

Posted by John Lilley <jo...@redpointglobal.com.INVALID>.
Robbie,

Ah I see.  Yes, I don’t think closing in the background works for my case, because the whole point is closing before the next message is delivered to get the “handle only one message” behavior.

Closing the consumer does “work” in the sense that it stops the consumer, but it has a side-effect of disabling the auto-ACK before the onMessage() returns, so the message is delivered again (to another consumer).

I don’t know enough about the JMS spec to say what should work and what is bug.  If you think that close-consumer-from-inside-onMessage should work, I can find a simple project to reproduce it for a bug report.

Thanks
john




[rg] <https://www.redpointglobal.com/>

John Lilley

Chief Architect, Redpoint Global Inc.

888 Worcester Street, Suite 200 Wellesley, MA 02482

M: +1 7209385761<tel:+1%207209385761> | john.lilley@redpointglobal.com<ma...@redpointglobal.com>
From: Robbie Gemmell <ro...@gmail.com>
Sent: Monday, October 3, 2022 11:05 AM
To: users@activemq.apache.org
Subject: Re: Disabling prefetch

*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***

I think the suggestion was as a potential workaround for close-inside-auto-ack-listener behaviour, since it then wouldnt be trying to close within the listener. However it is a bug if that is not working (you should probably raise a JIRA with a minimal reproducer of your issue). Even if you did close from another thread you would also presumably have to stop the connection first also for prefetching to not then come into play when onMessage had completed.

On Mon, 3 Oct 2022 at 14:55, John Lilley <jo...@redpointglobal.com.invalid>> wrote:
Clebert,

Thanks for the update.  But I don’t understand the advantage of closing the consumer in a background thread.  Is it potentially long-running?

john



[rg]<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,Yp7nAk12BLQ7eR6aLI1gLChiMcvzQ6eVHnANWYybcyE1CSKfDDZVWk1MokPKXHdacLDOFFe-j5itb6sAf6pnir6DXh0PHtuKSyULm1n1QXbBtgi_Bo7TSCLFayg,&typo=1>

John Lilley

Chief Architect, Redpoint Global Inc.

888 Worcester Street, Suite 200 Wellesley, MA 02482

M: +1 7209385761<tel:+1%207209385761> | john.lilley@redpointglobal.com<ma...@redpointglobal.com>
From: Clebert Suconic <cl...@gmail.com>>
Sent: Sunday, October 2, 2022 9:30 AM
To: users@activemq.apache.org<ma...@activemq.apache.org>
Subject: Re: Disabling prefetch

*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***

singleThreadExecutor.execute (() -> this.closeConsumer(consumer));

private void closeConsumer(MessageConsumer consumer) {
    try {
         consumer.close();
   }
  catch (Exception e) {
     logger.warn(e.getMessage, e);
  }
}


A good thing of using the listener still is that you save some threads in your client.


if you close from an executor, you're safe.

On Sat, Oct 1, 2022 at 3:12 PM John Lilley <jo...@redpointglobal.com.invalid>> wrote:
FYI, I developed an aversion to using receive() back when I was originally building our POC with RabbitMQ and trying to build our framework around receive() instead of onMessage(), but found that RabbitMQ’s JMS receive() implementation was broken.  Eventually we decided that ActiveMQ was a better choice, but our use of onMessage() was by then solidified.

Cheers,
john



<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

John Lilley <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

Chief Architect, Redpoint Global Inc. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

888 Worcester Street, Suite 200 Wellesley, MA 02482 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

M: +1 7209385761 | john.lilley@redpointglobal.com <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
From: John Lilley <jo...@redpointglobal.com.INVALID>
Sent: Saturday, October 1, 2022 12:07 PM
To: users@activemq.apache.org
Subject: RE: Disabling prefetch<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
Understood… unfortunately we have a framework that generates code using onMessage() and it is a matter of expedience not to change that whole framework right now.  However I would like to change it to use receive() once the rest of our Artemis migration is validated.<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
john<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

John Lilley <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

Chief Architect, Redpoint Global Inc. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

888 Worcester Street, Suite 200 Wellesley, MA 02482 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

M: +1 7209385761 | john.lilley@redpointglobal.com <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
From: Clebert Suconic <cl...@gmail.com>
Sent: Friday, September 30, 2022 9:01 PM
To: users@activemq.apache.org
Subject: Re: Disabling prefetch<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
I would not use a listener for a consumer that will only receive a single message anyways.  <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
On Fri, Sep 30, 2022 at 9:46 AM John Lilley <jo...@redpointglobal.com.invalid> wrote:<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
Clebert,<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
Thanks for the reply.  I’ll try your suggestion.<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
I’m not closing the consumer specifically to clear the prefetch buffer; rather I’m closing the consumer to stop receiving more messages.  The existence of pre-fetch messages is undesirable in that case, because (1) as you point out it is an anti-pattern, and (2) a process that fails to close its consumer in a timely fashion will hog the prefetched messages and prevent others from processing them.  <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
john<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

John Lilley <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

Chief Architect, Redpoint Global Inc. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

888 Worcester Street, Suite 200 Wellesley, MA 02482 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

M: +1 7209385761 | john.lilley@redpointglobal.com <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
From: Clebert Suconic <cl...@gmail.com>
Sent: Friday, September 30, 2022 6:12 AM
To: users@activemq.apache.org
Subject: Re: Disabling prefetch<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
BTW closing a consumer to clear the fetched buffer is an anti pattern either AMQ5 or Artemis. Set no prefetch or any slow consumer option instead.  That would be a waste of network and CPU. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
On Fri, Sep 30, 2022 at 4:33 AM Clebert Suconic <cl...@gmail.com> wrote:<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
This is done by setting consumerWindowSize to 0 in your connections. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
There a note about slow consumers in the documentation.  I’m on the phone now and I can’t get you a link.  If you can’t find it let me know and I will post it for you. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
On Thu, Sep 29, 2022 at 6:13 PM John Lilley <jo...@redpointglobal.com.invalid> wrote:<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
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:<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
if (disablePrefetch) {
   // See https://activemq.apache.org/what-is-the-prefetch-limit-for
   queueName = queueName + "?consumer.prefetchSize=1";
}<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=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.<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
Thanks<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
john<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

John Lilley <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

Chief Architect, Redpoint Global Inc. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

888 Worcester Street, Suite 200 Wellesley, MA 02482 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

M: +1 7209385761 | john.lilley@redpointglobal.com <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

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. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
-- <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
Clebert Suconic<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
-- <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
Clebert Suconic<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

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. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
-- <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
Clebert Suconic<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

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. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

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. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
-- <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
Clebert Suconic<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

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. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

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.

Re: Disabling prefetch

Posted by Robbie Gemmell <ro...@gmail.com>.
I think the suggestion was as a potential workaround for
close-inside-auto-ack-listener behaviour, since it then wouldnt be trying
to close within the listener. However it is a bug if that is not working
(you should probably raise a JIRA with a minimal reproducer of your issue).
Even if you did close from another thread you would also presumably have to
stop the connection first also for prefetching to not then come into play
when onMessage had completed.

On Mon, 3 Oct 2022 at 14:55, John Lilley
<jo...@redpointglobal.com.invalid> wrote:

> Clebert,
>
>
>
> Thanks for the update.  But I don’t understand the advantage of closing
> the consumer in a background thread.  Is it potentially long-running?
>
>
>
> 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
>
> *From:* Clebert Suconic <cl...@gmail.com>
> *Sent:* Sunday, October 2, 2022 9:30 AM
> *To:* users@activemq.apache.org
> *Subject:* Re: Disabling prefetch
>
>
>
> **** [Caution] This email is from an external source. Please use caution
> responding, opening attachments or clicking embedded links. ****
>
>
>
> singleThreadExecutor.execute (() -> this.closeConsumer(consumer));
>
>
>
> private void closeConsumer(MessageConsumer consumer) {
>
>     try {
>
>          consumer.close();
>
>    }
>
>   catch (Exception e) {
>
>      logger.warn(e.getMessage, e);
>
>   }
>
> }
>
>
>
>
>
> A good thing of using the listener still is that you save some threads in
> your client.
>
>
>
>
>
> if you close from an executor, you're safe.
>
>
>
> On Sat, Oct 1, 2022 at 3:12 PM John Lilley <
> john.lilley@redpointglobal.com.invalid> wrote:
>
> FYI, I developed an aversion to using receive() back when I was originally
> building our POC with RabbitMQ and trying to build our framework around
> receive() instead of onMessage(), but found that RabbitMQ’s JMS receive()
> implementation was broken.  Eventually we decided that ActiveMQ was a
> better choice, but our use of onMessage() was by then solidified.
>
>
>
> Cheers,
>
> john
>
>
>
>
>
> [image: rg]
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>
>
> *John Lilley *
>
> *Chief Architect, Redpoint Global Inc. *
>
> 888 Worcester Street, Suite 200 Wellesley, MA 02482
>
> *M: *+1 7209385761 <+1%207209385761> | john.lilley@redpointglobal.com
>
> *From:* John Lilley <jo...@redpointglobal.com.INVALID>
> *Sent:* Saturday, October 1, 2022 12:07 PM
> *To:* users@activemq.apache.org
> *Subject:* RE: Disabling prefetch
>
>
>
> **** [Caution] This email is from an external source. Please use caution
> responding, opening attachments or clicking embedded links. ****
>
>
>
> Understood… unfortunately we have a framework that generates code using
> onMessage() and it is a matter of expedience not to change that whole
> framework right now.  However I would like to change it to use receive()
> once the rest of our Artemis migration is validated.
>
>
>
> john
>
>
>
>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> *John Lilley
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>*
>
> *Chief Architect, Redpoint Global Inc.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>*
>
> 888 Worcester Street, Suite 200 Wellesley, MA 02482
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> *M: +1 7209385761 | john.lilley@redpointglobal.com
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>*
>
>
>
>
> *From: Clebert Suconic <cl...@gmail.com> Sent: Friday, September
> 30, 2022 9:01 PM To: users@activemq.apache.org Subject: Re: Disabling
> prefetch
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>*
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> **** [Caution] This email is from an external source. Please use caution
> responding, opening attachments or clicking embedded links. ***
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>*
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> I would not use a listener for a consumer that will only receive a single
> message anyways.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> On Fri, Sep 30, 2022 at 9:46 AM John Lilley <
> *john.lilley@redpointglobal.com.invalid*> wrote:
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> Clebert,
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> Thanks for the reply.  I’ll try your suggestion.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> I’m not closing the consumer specifically to clear the prefetch buffer;
> rather I’m closing the consumer to stop receiving more messages.  The
> existence of pre-fetch messages is undesirable in that case, because (1) as
> you point out it is an anti-pattern, and (2) a process that fails to close
> its consumer in a timely fashion will hog the prefetched messages and
> prevent others from processing them.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> john
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> *John Lilley
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>*
>
> *Chief Architect, Redpoint Global Inc.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>*
>
> *888 Worcester Street, Suite 200 Wellesley, MA 02482*
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> *M: +1 7209385761 | john.lilley@redpointglobal.com
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>*
>
>
>
>
> *From: Clebert Suconic <cl...@gmail.com> Sent: Friday, September
> 30, 2022 6:12 AM To: users@activemq.apache.org Subject: Re: Disabling
> prefetch
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>*
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> **** [Caution] This email is from an external source. Please use caution
> responding, opening attachments or clicking embedded links. ***
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>*
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> BTW closing a consumer to clear the fetched buffer is an anti pattern
> either AMQ5 or Artemis. Set no prefetch or any slow consumer option
> instead.  That would be a waste of network and CPU.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> On Fri, Sep 30, 2022 at 4:33 AM Clebert Suconic <
> *clebert.suconic@gmail.com*> wrote:
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> This is done by setting consumerWindowSize to 0 in your connections.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> There a note about slow consumers in the documentation.  I’m on the phone
> now and I can’t get you a link.  If you can’t find it let me know and I
> will post it for you.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> On Thu, Sep 29, 2022 at 6:13 PM John Lilley <
> *john.lilley@redpointglobal.com.invalid*> wrote:
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> 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:
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
>
>
>
> *if (disablePrefetch) {    // See
> https://activemq.apache.org/what-is-the-prefetch-limit-for    queueName =
> queueName + "?consumer.prefetchSize=1"; }
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>*
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=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.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> Thanks
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> john
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> *John Lilley
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>*
>
> *Chief Architect, Redpoint Global Inc.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>*
>
> *888 Worcester Street, Suite 200 Wellesley, MA 02482*
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> *M: +1 7209385761 | john.lilley@redpointglobal.com
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>*
>
>
> 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.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> --
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> Clebert Suconic
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> --
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> Clebert Suconic
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
>
> 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.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> --
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> Clebert Suconic
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
>
> 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.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
>
> 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.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
>
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> --
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> Clebert Suconic
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> 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.
>

RE: Disabling prefetch

Posted by John Lilley <jo...@redpointglobal.com.INVALID>.
Clebert,

Thanks for the update.  But I don’t understand the advantage of closing the consumer in a background thread.  Is it potentially long-running?

john




[rg] <https://www.redpointglobal.com/>

John Lilley

Chief Architect, Redpoint Global Inc.

888 Worcester Street, Suite 200 Wellesley, MA 02482

M: +1 7209385761<tel:+1%207209385761> | john.lilley@redpointglobal.com<ma...@redpointglobal.com>
From: Clebert Suconic <cl...@gmail.com>
Sent: Sunday, October 2, 2022 9:30 AM
To: users@activemq.apache.org
Subject: Re: Disabling prefetch

*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***

singleThreadExecutor.execute (() -> this.closeConsumer(consumer));

private void closeConsumer(MessageConsumer consumer) {
    try {
         consumer.close();
   }
  catch (Exception e) {
     logger.warn(e.getMessage, e);
  }
}


A good thing of using the listener still is that you save some threads in your client.


if you close from an executor, you're safe.

On Sat, Oct 1, 2022 at 3:12 PM John Lilley <jo...@redpointglobal.com.invalid>> wrote:
FYI, I developed an aversion to using receive() back when I was originally building our POC with RabbitMQ and trying to build our framework around receive() instead of onMessage(), but found that RabbitMQ’s JMS receive() implementation was broken.  Eventually we decided that ActiveMQ was a better choice, but our use of onMessage() was by then solidified.

Cheers,
john



[rg]<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,XBb7J1zWOWMyAUA7dGhE-9SZGlTyku4bePaCpz1XI2jn3EqgbeLWjKdQplligQi891zLImmKN-IqJvqig5ddmcYN6P0oAUTKFNQuwJWUNA,,&typo=1>

John Lilley

Chief Architect, Redpoint Global Inc.

888 Worcester Street, Suite 200 Wellesley, MA 02482

M: +1 7209385761<tel:+1%207209385761> | john.lilley@redpointglobal.com<ma...@redpointglobal.com>
From: John Lilley <jo...@redpointglobal.com.INVALID>>
Sent: Saturday, October 1, 2022 12:07 PM
To: users@activemq.apache.org<ma...@activemq.apache.org>
Subject: RE: Disabling prefetch

*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***

Understood… unfortunately we have a framework that generates code using onMessage() and it is a matter of expedience not to change that whole framework right now.  However I would like to change it to use receive() once the rest of our Artemis migration is validated.

john



<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

John Lilley <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

Chief Architect, Redpoint Global Inc. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

888 Worcester Street, Suite 200 Wellesley, MA 02482 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

M: +1 7209385761 | john.lilley@redpointglobal.com <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
From: Clebert Suconic <cl...@gmail.com>
Sent: Friday, September 30, 2022 9:01 PM
To: users@activemq.apache.org
Subject: Re: Disabling prefetch<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
I would not use a listener for a consumer that will only receive a single message anyways.  <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
On Fri, Sep 30, 2022 at 9:46 AM John Lilley <jo...@redpointglobal.com.invalid> wrote:<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
Clebert,<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
Thanks for the reply.  I’ll try your suggestion.<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
I’m not closing the consumer specifically to clear the prefetch buffer; rather I’m closing the consumer to stop receiving more messages.  The existence of pre-fetch messages is undesirable in that case, because (1) as you point out it is an anti-pattern, and (2) a process that fails to close its consumer in a timely fashion will hog the prefetched messages and prevent others from processing them.  <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
john<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

John Lilley <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

Chief Architect, Redpoint Global Inc. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

888 Worcester Street, Suite 200 Wellesley, MA 02482 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

M: +1 7209385761 | john.lilley@redpointglobal.com <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
From: Clebert Suconic <cl...@gmail.com>
Sent: Friday, September 30, 2022 6:12 AM
To: users@activemq.apache.org
Subject: Re: Disabling prefetch<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
BTW closing a consumer to clear the fetched buffer is an anti pattern either AMQ5 or Artemis. Set no prefetch or any slow consumer option instead.  That would be a waste of network and CPU. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
On Fri, Sep 30, 2022 at 4:33 AM Clebert Suconic <cl...@gmail.com> wrote:<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
This is done by setting consumerWindowSize to 0 in your connections. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
There a note about slow consumers in the documentation.  I’m on the phone now and I can’t get you a link.  If you can’t find it let me know and I will post it for you. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
On Thu, Sep 29, 2022 at 6:13 PM John Lilley <jo...@redpointglobal.com.invalid> wrote:<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
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:<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
if (disablePrefetch) {
   // See https://activemq.apache.org/what-is-the-prefetch-limit-for
   queueName = queueName + "?consumer.prefetchSize=1";
}<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=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.<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
Thanks<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
john<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

John Lilley <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

Chief Architect, Redpoint Global Inc. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

888 Worcester Street, Suite 200 Wellesley, MA 02482 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

M: +1 7209385761 | john.lilley@redpointglobal.com <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

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. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
-- <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
Clebert Suconic<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
-- <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
Clebert Suconic<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

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. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
-- <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
Clebert Suconic<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

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. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

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. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
-- <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
Clebert Suconic<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

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.

Re: Disabling prefetch

Posted by Clebert Suconic <cl...@gmail.com>.
singleThreadExecutor.execute (() -> this.closeConsumer(consumer));

private void closeConsumer(MessageConsumer consumer) {
    try {
         consumer.close();
   }
  catch (Exception e) {
     logger.warn(e.getMessage, e);
  }
}


A good thing of using the listener still is that you save some threads in
your client.


if you close from an executor, you're safe.

On Sat, Oct 1, 2022 at 3:12 PM John Lilley
<jo...@redpointglobal.com.invalid> wrote:

> FYI, I developed an aversion to using receive() back when I was originally
> building our POC with RabbitMQ and trying to build our framework around
> receive() instead of onMessage(), but found that RabbitMQ’s JMS receive()
> implementation was broken.  Eventually we decided that ActiveMQ was a
> better choice, but our use of onMessage() was by then solidified.
>
>
>
> Cheers,
>
> 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
>
> *From:* John Lilley <jo...@redpointglobal.com.INVALID>
> *Sent:* Saturday, October 1, 2022 12:07 PM
> *To:* users@activemq.apache.org
> *Subject:* RE: Disabling prefetch
>
>
>
> **** [Caution] This email is from an external source. Please use caution
> responding, opening attachments or clicking embedded links. ****
>
>
>
> Understood… unfortunately we have a framework that generates code using
> onMessage() and it is a matter of expedience not to change that whole
> framework right now.  However I would like to change it to use receive()
> once the rest of our Artemis migration is validated.
>
>
>
> john
>
>
>
>
>
> [image: rg]
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>
>
> *John Lilley *
>
> *Chief Architect, Redpoint Global Inc. *
>
> 888 Worcester Street, Suite 200 Wellesley, MA 02482
>
> *M: *+1 7209385761 <+1%207209385761> | john.lilley@redpointglobal.com
>
> *From:* Clebert Suconic <cl...@gmail.com>
> *Sent:* Friday, September 30, 2022 9:01 PM
> *To:* users@activemq.apache.org
> *Subject:* Re: Disabling prefetch
>
>
>
> **** [Caution] This email is from an external source. Please use caution
> responding, opening attachments or clicking embedded links. ****
>
>
>
> I would not use a listener for a consumer that will only receive a single
> message anyways.
>
>
>
> On Fri, Sep 30, 2022 at 9:46 AM John Lilley <
> john.lilley@redpointglobal.com.invalid> wrote:
>
> Clebert,
>
> Thanks for the reply.  I’ll try your suggestion.
>
> I’m not closing the consumer specifically to clear the prefetch buffer;
> rather I’m closing the consumer to stop receiving more messages.  The
> existence of pre-fetch messages is undesirable in that case, because (1) as
> you point out it is an anti-pattern, and (2) a process that fails to close
> its consumer in a timely fashion will hog the prefetched messages and
> prevent others from processing them.
>
> john
>
>
>
>
>
> [image: rg]
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,KHzEvVkENwL6T7EFSxGICR_CFo-HpPU51sD4bZnFFKroXGHPfKIJx5Yboyg3w7HYrEBrKNGABSt21fLnbNKQxSIVCglyWQafTQWNFsckAdACQLZKvHNhrqm_&typo=1>
>
> *John Lilley *
>
> *Chief Architect, Redpoint Global Inc. *
>
> 888 Worcester Street, Suite 200 Wellesley, MA 02482
> <https://www.google.com/maps/search/888+Worcester+Street,+Suite+200+Wellesley,+MA+02482?entry=gmail&source=g>
>
> *M: *+1 7209385761 <+1%207209385761> | john.lilley@redpointglobal.com
>
> *From:* Clebert Suconic <cl...@gmail.com>
> *Sent:* Friday, September 30, 2022 6:12 AM
> *To:* users@activemq.apache.org
> *Subject:* Re: Disabling prefetch
>
>
>
> **** [Caution] This email is from an external source. Please use caution
> responding, opening attachments or clicking embedded links. ****
>
>
>
> BTW closing a consumer to clear the fetched buffer is an anti pattern
> either AMQ5 or Artemis. Set no prefetch or any slow consumer option
> instead.  That would be a waste of network and CPU.
>
>
>
> On Fri, Sep 30, 2022 at 4:33 AM Clebert Suconic <cl...@gmail.com>
> wrote:
>
>
>
> This is done by setting consumerWindowSize to 0 in your connections.
>
>
>
> There a note about slow consumers in the documentation.  I’m on the phone
> now and I can’t get you a link.  If you can’t find it let me know and I
> will post it for you.
>
>
>
> On Thu, Sep 29, 2022 at 6:13 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
>
>
>
> *John Lilley
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>*
>
> *Chief Architect, Redpoint Global Inc.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>*
>
> 888 Worcester Street, Suite 200 Wellesley, MA 02482
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
>
> *M: +1 7209385761 | john.lilley@redpointglobal.com
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>*
>
>
> 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.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
>
> --
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
>
> Clebert Suconic
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
>
> --
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
>
> Clebert Suconic
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
>
>
> 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.
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
>
> --
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
>
> Clebert Suconic
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
>
>
> 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.
>
> 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.
>


-- 
Clebert Suconic

RE: Disabling prefetch

Posted by John Lilley <jo...@redpointglobal.com.INVALID>.
FYI, I developed an aversion to using receive() back when I was originally building our POC with RabbitMQ and trying to build our framework around receive() instead of onMessage(), but found that RabbitMQ’s JMS receive() implementation was broken.  Eventually we decided that ActiveMQ was a better choice, but our use of onMessage() was by then solidified.

Cheers,
john




[rg] <https://www.redpointglobal.com/>

John Lilley

Chief Architect, Redpoint Global Inc.

888 Worcester Street, Suite 200 Wellesley, MA 02482

M: +1 7209385761<tel:+1%207209385761> | john.lilley@redpointglobal.com<ma...@redpointglobal.com>
From: John Lilley <jo...@redpointglobal.com.INVALID>
Sent: Saturday, October 1, 2022 12:07 PM
To: users@activemq.apache.org
Subject: RE: Disabling prefetch

*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***

Understood… unfortunately we have a framework that generates code using onMessage() and it is a matter of expedience not to change that whole framework right now.  However I would like to change it to use receive() once the rest of our Artemis migration is validated.

john



[rg]<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,GuuBno5AH7NQNgrTDSrHQmK6mxf_nCtVKeX87oLOkFJV3Zz2I_RuYgZ51RFtELNsx5HkUpsjs5i0WCChhG3jXbJ6PumlKEG3V5hQYd9FkQ,,&typo=1>

John Lilley

Chief Architect, Redpoint Global Inc.

888 Worcester Street, Suite 200 Wellesley, MA 02482

M: +1 7209385761<tel:+1%207209385761> | john.lilley@redpointglobal.com<ma...@redpointglobal.com>
From: Clebert Suconic <cl...@gmail.com>>
Sent: Friday, September 30, 2022 9:01 PM
To: users@activemq.apache.org<ma...@activemq.apache.org>
Subject: Re: Disabling prefetch

*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***

I would not use a listener for a consumer that will only receive a single message anyways.

On Fri, Sep 30, 2022 at 9:46 AM John Lilley <jo...@redpointglobal.com.invalid>> wrote:
Clebert,
Thanks for the reply.  I’ll try your suggestion.
I’m not closing the consumer specifically to clear the prefetch buffer; rather I’m closing the consumer to stop receiving more messages.  The existence of pre-fetch messages is undesirable in that case, because (1) as you point out it is an anti-pattern, and (2) a process that fails to close its consumer in a timely fashion will hog the prefetched messages and prevent others from processing them.
john



[rg]<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,KHzEvVkENwL6T7EFSxGICR_CFo-HpPU51sD4bZnFFKroXGHPfKIJx5Yboyg3w7HYrEBrKNGABSt21fLnbNKQxSIVCglyWQafTQWNFsckAdACQLZKvHNhrqm_&typo=1>

John Lilley

Chief Architect, Redpoint Global Inc.

888 Worcester Street, Suite 200 Wellesley, MA 02482<https://www.google.com/maps/search/888+Worcester+Street,+Suite+200+Wellesley,+MA+02482?entry=gmail&source=g>

M: +1 7209385761<tel:+1%207209385761> | john.lilley@redpointglobal.com<ma...@redpointglobal.com>
From: Clebert Suconic <cl...@gmail.com>>
Sent: Friday, September 30, 2022 6:12 AM
To: users@activemq.apache.org<ma...@activemq.apache.org>
Subject: Re: Disabling prefetch

*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***

BTW closing a consumer to clear the fetched buffer is an anti pattern either AMQ5 or Artemis. Set no prefetch or any slow consumer option instead.  That would be a waste of network and CPU.

On Fri, Sep 30, 2022 at 4:33 AM Clebert Suconic <cl...@gmail.com>> wrote:

This is done by setting consumerWindowSize to 0 in your connections.

There a note about slow consumers in the documentation.  I’m on the phone now and I can’t get you a link.  If you can’t find it let me know and I will post it for you.

On Thu, Sep 29, 2022 at 6:13 PM John Lilley <jo...@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
   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


John Lilley <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>

Chief Architect, Redpoint Global Inc. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>

888 Worcester Street, Suite 200 Wellesley, MA 02482 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>

M: +1 7209385761 | john.lilley@redpointglobal.com <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>

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. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
-- <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
Clebert Suconic<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
-- <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
Clebert Suconic<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>

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. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
-- <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
Clebert Suconic<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>

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.

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.

RE: Disabling prefetch

Posted by John Lilley <jo...@redpointglobal.com.INVALID>.
Understood… unfortunately we have a framework that generates code using onMessage() and it is a matter of expedience not to change that whole framework right now.  However I would like to change it to use receive() once the rest of our Artemis migration is validated.

john




[rg] <https://www.redpointglobal.com/>

John Lilley

Chief Architect, Redpoint Global Inc.

888 Worcester Street, Suite 200 Wellesley, MA 02482

M: +1 7209385761<tel:+1%207209385761> | john.lilley@redpointglobal.com<ma...@redpointglobal.com>
From: Clebert Suconic <cl...@gmail.com>
Sent: Friday, September 30, 2022 9:01 PM
To: users@activemq.apache.org
Subject: Re: Disabling prefetch

*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***

I would not use a listener for a consumer that will only receive a single message anyways.

On Fri, Sep 30, 2022 at 9:46 AM John Lilley <jo...@redpointglobal.com.invalid>> wrote:
Clebert,
Thanks for the reply.  I’ll try your suggestion.
I’m not closing the consumer specifically to clear the prefetch buffer; rather I’m closing the consumer to stop receiving more messages.  The existence of pre-fetch messages is undesirable in that case, because (1) as you point out it is an anti-pattern, and (2) a process that fails to close its consumer in a timely fashion will hog the prefetched messages and prevent others from processing them.
john



[rg]<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,KHzEvVkENwL6T7EFSxGICR_CFo-HpPU51sD4bZnFFKroXGHPfKIJx5Yboyg3w7HYrEBrKNGABSt21fLnbNKQxSIVCglyWQafTQWNFsckAdACQLZKvHNhrqm_&typo=1>

John Lilley

Chief Architect, Redpoint Global Inc.

888 Worcester Street, Suite 200 Wellesley, MA 02482<https://www.google.com/maps/search/888+Worcester+Street,+Suite+200+Wellesley,+MA+02482?entry=gmail&source=g>

M: +1 7209385761<tel:+1%207209385761> | john.lilley@redpointglobal.com<ma...@redpointglobal.com>
From: Clebert Suconic <cl...@gmail.com>>
Sent: Friday, September 30, 2022 6:12 AM
To: users@activemq.apache.org<ma...@activemq.apache.org>
Subject: Re: Disabling prefetch

*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***

BTW closing a consumer to clear the fetched buffer is an anti pattern either AMQ5 or Artemis. Set no prefetch or any slow consumer option instead.  That would be a waste of network and CPU.

On Fri, Sep 30, 2022 at 4:33 AM Clebert Suconic <cl...@gmail.com>> wrote:

This is done by setting consumerWindowSize to 0 in your connections.

There a note about slow consumers in the documentation.  I’m on the phone now and I can’t get you a link.  If you can’t find it let me know and I will post it for you.

On Thu, Sep 29, 2022 at 6:13 PM John Lilley <jo...@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
   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


<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>

John Lilley <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>

Chief Architect, Redpoint Global Inc. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>

888 Worcester Street, Suite 200 Wellesley, MA 02482 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>

M: +1 7209385761 | john.lilley@redpointglobal.com <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>

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. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
-- <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
Clebert Suconic<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
-- <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
Clebert Suconic<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>

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. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
-- <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
Clebert Suconic<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>

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.

Re: Disabling prefetch

Posted by Clebert Suconic <cl...@gmail.com>.
I would not use a listener for a consumer that will only receive a single
message anyways.

On Fri, Sep 30, 2022 at 9:46 AM John Lilley
<jo...@redpointglobal.com.invalid> wrote:

> Clebert,
>
> Thanks for the reply.  I’ll try your suggestion.
>
> I’m not closing the consumer specifically to clear the prefetch buffer;
> rather I’m closing the consumer to stop receiving more messages.  The
> existence of pre-fetch messages is undesirable in that case, because (1) as
> you point out it is an anti-pattern, and (2) a process that fails to close
> its consumer in a timely fashion will hog the prefetched messages and
> prevent others from processing them.
>
> john
>
>
>
>
> [image: rg] <https://www.redpointglobal.com/>
>
> John Lilley
>
> Chief Architect, Redpoint Global Inc.
>
> 888 Worcester Street, Suite 200 Wellesley, MA 02482
> <https://www.google.com/maps/search/888+Worcester+Street,+Suite+200+Wellesley,+MA+02482?entry=gmail&source=g>
>
> *M: *+1 7209385761 <+1%207209385761> | john.lilley@redpointglobal.com
>
> *From:* Clebert Suconic <cl...@gmail.com>
> *Sent:* Friday, September 30, 2022 6:12 AM
> *To:* users@activemq.apache.org
> *Subject:* Re: Disabling prefetch
>
>
>
> **** [Caution] This email is from an external source. Please use caution
> responding, opening attachments or clicking embedded links. ****
>
>
>
> BTW closing a consumer to clear the fetched buffer is an anti pattern
> either AMQ5 or Artemis. Set no prefetch or any slow consumer option
> instead.  That would be a waste of network and CPU.
>
>
>
> On Fri, Sep 30, 2022 at 4:33 AM Clebert Suconic <cl...@gmail.com>
> wrote:
>
>
>
> This is done by setting consumerWindowSize to 0 in your connections.
>
>
>
> There a note about slow consumers in the documentation.  I’m on the phone
> now and I can’t get you a link.  If you can’t find it let me know and I
> will post it for you.
>
>
>
> On Thu, Sep 29, 2022 at 6:13 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://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>
>
> *John Lilley *
>
> *Chief Architect, Redpoint Global Inc. *
>
> 888 Worcester Street, Suite 200 Wellesley, MA 02482
> <https://www.google.com/maps/search/888+Worcester+Street,+Suite+200+Wellesley,+MA+02482?entry=gmail&source=g>
>
> *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.
>
> --
>
> Clebert Suconic
>
> --
>
> Clebert Suconic
>
> 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.
>
-- 
Clebert Suconic

RE: Disabling prefetch

Posted by John Lilley <jo...@redpointglobal.com.INVALID>.
Clebert,
Thanks for the reply.  I’ll try your suggestion.
I’m not closing the consumer specifically to clear the prefetch buffer; rather I’m closing the consumer to stop receiving more messages.  The existence of pre-fetch messages is undesirable in that case, because (1) as you point out it is an anti-pattern, and (2) a process that fails to close its consumer in a timely fashion will hog the prefetched messages and prevent others from processing them.
john




[rg] <https://www.redpointglobal.com/>

John Lilley

Chief Architect, Redpoint Global Inc.

888 Worcester Street, Suite 200 Wellesley, MA 02482

M: +1 7209385761<tel:+1%207209385761> | john.lilley@redpointglobal.com<ma...@redpointglobal.com>
From: Clebert Suconic <cl...@gmail.com>
Sent: Friday, September 30, 2022 6:12 AM
To: users@activemq.apache.org
Subject: Re: Disabling prefetch

*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***

BTW closing a consumer to clear the fetched buffer is an anti pattern either AMQ5 or Artemis. Set no prefetch or any slow consumer option instead.  That would be a waste of network and CPU.

On Fri, Sep 30, 2022 at 4:33 AM Clebert Suconic <cl...@gmail.com>> wrote:

This is done by setting consumerWindowSize to 0 in your connections.

There a note about slow consumers in the documentation.  I’m on the phone now and I can’t get you a link.  If you can’t find it let me know and I will post it for you.

On Thu, Sep 29, 2022 at 6:13 PM John Lilley <jo...@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
   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


[rg]<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,hbQyfJtTMCieiIHykTGmwi6tO8ENrzRddQJGtbFXCn09SaXzIi4bTZ-k2ZKCO8_1ie7GilmyfctL16AHUZuCaG1pRT2EnX88GqNIeVwNBvjfg5oj&typo=1>

John Lilley

Chief Architect, Redpoint Global Inc.

888 Worcester Street, Suite 200 Wellesley, MA 02482<https://www.google.com/maps/search/888+Worcester+Street,+Suite+200+Wellesley,+MA+02482?entry=gmail&source=g>

M: +1 7209385761<tel:+1%207209385761> | john.lilley@redpointglobal.com<ma...@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.
--
Clebert Suconic
--
Clebert Suconic

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.

Re: Disabling prefetch

Posted by Clebert Suconic <cl...@gmail.com>.
BTW closing a consumer to clear the fetched buffer is an anti pattern
either AMQ5 or Artemis. Set no prefetch or any slow consumer option
instead.  That would be a waste of network and CPU.

On Fri, Sep 30, 2022 at 4:33 AM Clebert Suconic <cl...@gmail.com>
wrote:

>
> This is done by setting consumerWindowSize to 0 in your connections.
>
> There a note about slow consumers in the documentation.  I’m on the phone
> now and I can’t get you a link.  If you can’t find it let me know and I
> will post it for you.
>
> On Thu, Sep 29, 2022 at 6:13 PM John Lilley
> <jo...@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
>> <https://www.google.com/maps/search/888+Worcester+Street,+Suite+200+Wellesley,+MA+02482?entry=gmail&source=g>
>>
>> *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.
>>
> --
> Clebert Suconic
>
-- 
Clebert Suconic

Re: Disabling prefetch

Posted by Clebert Suconic <cl...@gmail.com>.
This is done by setting consumerWindowSize to 0 in your connections.

There a note about slow consumers in the documentation.  I’m on the phone
now and I can’t get you a link.  If you can’t find it let me know and I
will post it for you.

On Thu, Sep 29, 2022 at 6:13 PM John Lilley
<jo...@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
> <https://www.google.com/maps/search/888+Worcester+Street,+Suite+200+Wellesley,+MA+02482?entry=gmail&source=g>
>
> *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.
>
-- 
Clebert Suconic