Hello Simon,

I tested this and it does NOT work.
As per my understanding, this setting is for the connection string of the 
consumer.

The solution provided by JB works however (using per destination policy).

Nicolas


C2 - Usage restreint 

-----Message d'origine-----
De : Simon Lundström <si...@su.se> 
Envoyé : mardi 8 février 2022 07:54
À : users@activemq.apache.org
Objet : Re: Limit prefetchSize from ActiveMQ side

[Vous ne recevez pas souvent de courriers de la part de si...@su.se. D?couvrez 
pourquoi cela peut ?tre important ? l'adresse 
http://aka.ms/LearnAboutSenderIdentification.]

On Mon, 2022-02-07 at 10:37:52 +0100, CASAUX Nicolas wrote:
> Hello,
>
> I'm using ActiveMQ < classic > 5.16.0 and I have a question related to slow 
> consumers.
>
> In my use case, I only use topics with non-durable messages. As per the doc, 
> the prefetchSize is 32767.
> I have a constantPendingMessageLimitStrategy on this topic with a limit of 
> 1000 messages.
> I can observe both values on the webconsole accordingly when they reach the 
> limit (I see 32767 messages in the dispatch queue size and 1000 messages in 
> the pending queue size)
>
> I have a bunch of slow consumers, which do not set any prefetchSize (hence 
> they have the default 32767 value).
>
> My question is: how can I set, change or force this value from ActiveMQ side ?
>
> I don't want those consumers to connect without a prefetchSize value, and I 
> consider the default value too high for my usecase.
> That's why I would like to reduce this value.
>
> Any hints on this ?
> Thanks! :)
>
> Nicolas
>
>
> C2 - Usage restreint

I belive you can set the default on your transportConnector, see 
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Factivemq.apache.org%2Fmqtt.html%23message-prefetch&amp;data=04%7C01%7Cnicolas.casaux%40soprasteria.com%7C6a9b7645675546c7873908d9eacfc143%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C637799000872157995%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=SLM%2Bu3422R1zFeYx7Y285z8DxXR6ZJyXhx6sQ4q09VQ%3D&amp;reserved=0

BR,
- Simon

Reply via email to