Re: Disabling prefetch

2022-09-30 Thread Clebert Suconic
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 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

Re: sequential requests in a cluster

2022-09-30 Thread Justin Bertram
My main question would be, do you really *need* to spread the load among multiple brokers? If you've got exclusive consumers on a lot of different queues then you're already drastically limiting performance since you're eliminating concurrent message consumption from all those queues. Is a single

Re: Processing only one message

2022-09-30 Thread Clebert Suconic
Internal property on the consumer I meant. On Fri, Sep 30, 2022 at 9:01 PM Clebert Suconic wrote: > > I don’t think you can do that. That’s a property for the session afaik. > If you see an internal property with that name be careful as I’m not aware > of any tests. > > > On Fri, Sep 30, 2022

Re: Processing only one message

2022-09-30 Thread Clebert Suconic
I don’t think you can do that. That’s a property for the session afaik. If you see an internal property with that name be careful as I’m not aware of any tests. On Fri, Sep 30, 2022 at 4:16 PM John Lilley wrote: > Clebert, > > > > Thank for the reply! I can see how to see this for the

RE: Processing only one message

2022-09-30 Thread John Lilley
Clebert, Thank for the reply! I can see how to see this for the connection by adding this to the URL ?consumerWindowSize=0 https://activemq.apache.org/components/artemis/documentation/1.1.0/flow-control.html I can also call setConsumerWindowSize(0) on the connection factory. Can I set this

Re: Artemis vs AMQ 5.x in production

2022-09-30 Thread Justin Bertram
Some musings on a Friday afternoon... In my experience companies choose their software platforms for a myriad of reasons, some of which are not obvious or intuitive. Without specific comment from the cloud providers you mentioned we are only able to speculate about their motivations. There's no

Re: ActiveMQ Artemis maximum connection limit

2022-09-30 Thread Justin Bertram
In the case of a client using the core protocol the ActiveMQSessionCreationException would be directly returned when they tried to create a new session beyond the configured limit. The exception would have a message like this: AMQ229110: Too many sessions for user 'myUser'. Sessions allowed: 1.

Re: ActiveMQ Artemis maximum connection limit

2022-09-30 Thread Wael Al-Manasrah
Thanks Justin, I am not interested in a specific protocol; however, if you can tell me what happens for the Core protocol it would be great. I just want to know if the client would be notified with some error/exception about why the new connection was refused! Thanks again, Wael.

Re: ActiveMQ Artemis maximum connection limit

2022-09-30 Thread Justin Bertram
> Does Artemis refuse new connections with an error/exception? It depends on what you mean. The broker will refuse to allow the new connection, and it will throw an org.apache.activemq.artemis.api.core.ActiveMQSessionCreationException internally. However, how exactly that error is translated to

ActiveMQ Artemis maximum connection limit

2022-09-30 Thread Wael Al-Manasrah
Hello, I am a graduate student @ University of Waterloo. I am conducting a comprehensive survey of open-source messaging middleware, I am trying to figure out what happens when a user max-connections resource limit is reached. Does Artemis refuse new connections with an error/exception? This

Re: Processing only one message

2022-09-30 Thread Robbie Gemmell
Possibly, it's not something I've tried with the Artemis client, I was just mainly pointing out JMS says acknowledge() does nothing if you aren't using the click-ack mode its for. Identifying if there really is a bug with the close-in-auto-ack-listener and perhaps fixing it might be another route.

Re: Disabling prefetch

2022-09-30 Thread Justin Bertram
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]

RE: Processing only one message

2022-09-30 Thread John Lilley
Robbie, I am using auto-ack mode generally. So perhaps one solution is to make this consumer manual-ACK instead? I’ll try that. If it works it will be easier than changing our code to use consumer.receive(). Thanks john [rg] John Lilley Chief

RE: Disabling prefetch

2022-09-30 Thread John Lilley
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

Re: Processing only one message

2022-09-30 Thread Robbie Gemmell
If you only want to get a single message it might make more sense to use [possibly non-prefetching if really only wanting 1 message] consumer.receive(..) style calls rather than a MessageListener. Opening and closing a consumer and session per-message is quite inefficient. Are you also closing

Re: Artemis vs AMQ 5.x in production

2022-09-30 Thread fpapon
Hi, Thanks for all these feedbacks, this is very interesting! When searching on the web, I can see that most of SaaS providers provide ActiveMQ Classic (AWS, Azure, Oracle) not because of performance but more because of stability of the solution. I'm not saying that Artemis is not

Re: Disabling prefetch

2022-09-30 Thread Clebert Suconic
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 wrote: > > This is done by setting consumerWindowSize to

Re: Processing only one message

2022-09-30 Thread Clebert Suconic
Look at slow consumers. Set consumer window size to 0 on this consumer. On Thu, Sep 29, 2022 at 6:01 PM John Lilley wrote: > We have an application that should read a single message from a queue (a > “job” queue) and then stop processing more messages. Think of it as a > “batch request”.

Re: Disabling prefetch

2022-09-30 Thread Clebert Suconic
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 wrote: >

RE: Artemis vs AMQ 5.x in production

2022-09-30 Thread Vilius Šumskas
One additional note regarding HA and shared storage on K8s. Check what shared storage options are available in your K8S environment beforehand, because there are not so many, and both Artemis and “Classic” is pretty picky about shared storage filesystem. For example, for us, on Google Cloud,