[
https://issues.apache.org/jira/browse/ARTEMIS-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17365687#comment-17365687
]
Justin Bertram commented on ARTEMIS-3353:
-----------------------------------------
The differences between how core and AMQP handle large messages aren't
arbitrary. They are based on how the protocols actually work.
The core client has automatic message chunking built in. The idea here is that
client is aware of its resource limitations (e.g. heap size) therefore it makes
the decision of how large is too large. When the message is "too large" (i.e.
exceeds the {{minLargeMessageSize}}) then the message is automatically sent in
chunks to avoid loading the whole message into memory at once. The broker
doesn't tell the client to chunk the message, and there is no facility in the
protocol to do that either. Implementing such a facility would require a
protocol change and would not be compatible with existing clients.
I'm not aware of any AMQP 1.0 clients that have automatic message chunking
built in like this so the broker itself has to make this decision to avoid
excessive heap use. I believe this is possible because Proton-J exposes the
size of the incoming message.
In short, I think that if you want behavior like AMQP then you should use AMQP
and if you want behavior like core then you should use core. Implementing
features from one protocol in another doesn't offer a great return on
investment since you can just use the other protocol to get the feature you
want.
> add acceptor parameter coreMinLargeMessageSize for CORE protocol
> ----------------------------------------------------------------
>
> Key: ARTEMIS-3353
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3353
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: Broker
> Affects Versions: 2.17.0
> Reporter: Erwin Dondorp
> Priority: Major
>
> The handling of large messages differs significantly between messaging
> protocols.
> See also
> [https://activemq.apache.org/components/artemis/documentation/latest/large-messages.html]
> For CORE, currently, the producer decides on the fact whether a message is
> large. It does that by using {{minLargeMessageSize=12345}} (default=100K) in
> the _connection_-url. The client uses this value to determine whether it is
> large size.
> For AMQP, currently, the broker decides on that fact. It does that by using
> {{amqpMinLargeMessageSize=12345}} in the _acceptor_-url.
> This means that the responsibility is not always in the same place. And the
> responsibility is therefore not with the same teams, as we have a team that
> maintains the broker and teams that maintain consumer/producer applications.
> And there is also some freedom in using amqp and/or core.
> My goal is to make the client connections as simple as possible.
> My proposal is to add parameter {{coreMinLargeMessageSize}} to the acceptor
> urls for use by the CORE protocol. When the value is set, it indicates that
> the large message flag must be reset by the broker based on that
> parameter-value. Not setting the value or using {{""}} leaves the original
> indicator alone.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)