You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by z94joma <pr...@gmail.com> on 2018/05/04 06:59:04 UTC

Change minLargeMessageSize on Artemis

HiHow do I change the 100KB limit of when messages are considered Large?I
have read and looked everywhere. Can it be configured both from the Client
or Server? Need to change both?I have several environments. Both singlenode
and clustered.I have Artemis 2.5.Thank you./Magnus



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Change minLargeMessageSize on Artemis

Posted by Francesco Nigro <ni...@gmail.com>.
Just as a personal note: in order to make an efficent use of the default
garbage collector G1, it would be a good practice to verify with your
expected typical load if
there are happening humongous allocations (
https://plumbr.io/handbook/gc-tuning-in-practice/other-examples/humongous-allocations
),
If they will happen I suggest to tune -XX:G1HeapRegionSize to be >= twice
the chosen minLargeMessageSize (or better, the expected maximum encoded
message size, if known).
That's to avoid having poor performances due to a misconfigured GC.
Anyway in the article is well written everything I have just explained
above :)



Il giorno ven 4 mag 2018 alle ore 14:06 nigro_franz <ni...@gmail.com>
ha scritto:

> HI!
>
> I can't tell what else should be needed on clustered env but:
> - on the (core) client you have to add minLargeMessageSize on your URL
> parameters eg tcp://localhost:61616?minLargeMessageSize=<put here the value
> you need>
> - on the server you have to change/add journal-buffer-size on broker.xml in
> order to be >= minLargeMessageSize
>
> Probably i'm just paranoid but I will change the consumerWindowSize on the
> client to be >= minLargeMessageSize as well, but I could be wrong on that.
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>

Re: Change minLargeMessageSize on Artemis

Posted by z94joma <pr...@gmail.com>.
Hi

It worked as a charm. Many thanks.

To have it working in a Cluster Env you also need to change
min-large-message-size in <cluster-connection> in Broker.xml to same or
above.

@jbertram:
What is the "limit" message size for AMQP?

Thank you

/Magnus



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Change minLargeMessageSize on Artemis

Posted by Robbie Gemmell <ro...@gmail.com>.
AMQP messages arent classed as being 'large' or not at a protocol
level, but rather just messages which can be sent using 1 or more
message-transfer frames as needed or appropriate to the situation.
Messages can be split into multiple frames based on the servers
advertised max frame size, which it can use use to govern clients
behaviour, or maybe the clients own abilities/needs. The combined
frame payloads on receipt then represent the complete message,
whatever its size.

As I understand it, Artemis internally treats AMQP messages as 'large
messages' currently if their encoded size is above the smaller of the
journals configured 'journal-buffer-size' and 'journal-file-size'
settings.

Robbie

On 7 May 2018 at 03:50, Justin Bertram <jb...@apache.org> wrote:
>> But I don't understand why a client should decide on how a message should
> be treated on the server.
>
> Because "large" message support as originally conceived for the "core"
> protocol (the foundational protocol used by Artemis) involves (at least in
> part) clients *streaming* messages in chunks to the broker. The broker has
> no influence on how clients send messages to the broker - whether that be
> all at once or broken up into chunks which are more manageable from a
> memory perspective. Therefore, it's up to the client to decide that.
>
> Non-core protocols (e.g. AMQP) have limited "large" message support.
>
>
> Justin
>
> On Sun, May 6, 2018 at 5:58 PM, z94joma <pr...@gmail.com> wrote:
>
>> Hi
>>
>> Thanks for your answer.
>>
>> I find the answer a bit strange. It probably is correct though.
>>
>> But I don't understand why a client should decide on how a message should
>> be
>> treated on the server. As in my case the client can actually crash my
>> consumer (As it cannot read large messages if put in large message folder.)
>>
>> But I will try your suggestions during the week and let everyone know.
>>
>> /Magnus
>>
>>
>>
>>
>>
>> --
>> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
>> f2341805.html
>>

Re: Change minLargeMessageSize on Artemis

Posted by Justin Bertram <jb...@apache.org>.
> But I don't understand why a client should decide on how a message should
be treated on the server.

Because "large" message support as originally conceived for the "core"
protocol (the foundational protocol used by Artemis) involves (at least in
part) clients *streaming* messages in chunks to the broker. The broker has
no influence on how clients send messages to the broker - whether that be
all at once or broken up into chunks which are more manageable from a
memory perspective. Therefore, it's up to the client to decide that.

Non-core protocols (e.g. AMQP) have limited "large" message support.


Justin

On Sun, May 6, 2018 at 5:58 PM, z94joma <pr...@gmail.com> wrote:

> Hi
>
> Thanks for your answer.
>
> I find the answer a bit strange. It probably is correct though.
>
> But I don't understand why a client should decide on how a message should
> be
> treated on the server. As in my case the client can actually crash my
> consumer (As it cannot read large messages if put in large message folder.)
>
> But I will try your suggestions during the week and let everyone know.
>
> /Magnus
>
>
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
> f2341805.html
>

Re: Change minLargeMessageSize on Artemis

Posted by z94joma <pr...@gmail.com>.
Hi

Thanks for your answer.

I find the answer a bit strange. It probably is correct though.

But I don't understand why a client should decide on how a message should be
treated on the server. As in my case the client can actually crash my
consumer (As it cannot read large messages if put in large message folder.)

But I will try your suggestions during the week and let everyone know.

/Magnus





--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Change minLargeMessageSize on Artemis

Posted by nigro_franz <ni...@gmail.com>.
HI!

I can't tell what else should be needed on clustered env but:
- on the (core) client you have to add minLargeMessageSize on your URL
parameters eg tcp://localhost:61616?minLargeMessageSize=<put here the value
you need>
- on the server you have to change/add journal-buffer-size on broker.xml in
order to be >= minLargeMessageSize 

Probably i'm just paranoid but I will change the consumerWindowSize on the
client to be >= minLargeMessageSize as well, but I could be wrong on that.



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html