[
https://issues.apache.org/jira/browse/ARTEMIS-4781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17882413#comment-17882413
]
ASF subversion and git services commented on ARTEMIS-4781:
----------------------------------------------------------
Commit b79db8ed6650b9036c9990784d739c5cfa1cafcb in activemq-artemis's branch
refs/heads/main from Justin Bertram
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=b79db8ed66 ]
ARTEMIS-4781 AMQP message leaking large message file
When an AMQP message is sent over a cluster bridge it is embedded into a
Core message. If the size of the AMQP message is barely beneath the
minLargeMessageSize then the Core message in which the AMQP message is
embedded will become a large message. The on the bridge target when the
embedded AMQP message is extracted from the large Core message it will
not be considered "large." In this situation the file for the large Core
message will leak.
Thanks to Erwin Dondorp for the test. I renamed and refactored it a bit,
but the fundamentals came from Erwin.
> Clustering not-large AMQP message can leak Core large message file
> ------------------------------------------------------------------
>
> Key: ARTEMIS-4781
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4781
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Clustering
> Affects Versions: 2.33.0
> Reporter: Erwin Dondorp
> Assignee: Justin Bertram
> Priority: Major
> Attachments: Test4781LargeMsgOnDisk.java, reproducer-output.txt
>
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> SETUP:
> Using a broker-cluster.
> We are producing big AMQP messages on the first node and consume them from
> the second node.
> The size of the messages is chosen so that these are around the
> min-large-message-size.
> OBSERVATION:
> For specific message sizes, the TMP files on the second node are not removed
> even when the message is consumed.
> My assumption is that this occurs for those messages that are not initially
> LARGE messsages, but which become LARGE messages due to the movement of the
> messages between the cluster nodes. During this process a few administrative
> (or informative?) message headers are added by the broker causing the message
> size to be increased so that it is now a large message.
> REPRODUCER
> The reproducer sets-up a cluster of 2 nodes and leaves the
> min-large-message-size at the default 102400 bytes.
> The reproducer sends text-messages with a text-payload between 90KiB and
> 110KiB, increasing each time with 50 bytes. this results in a range of just
> over 400 messages.
> In this scenario, 7 files are left in the large-msgs directory after test is
> completed and all software is ended. The files have file-sizes 102433 through
> 102733 bytes.
> There were no functional problems, all messages were properly produced and
> consumed.
> REPRODUCER INSTRUCTIONS
> place attached file in directory
> {{[activemq-artemis]/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp}}
> run with: {{cd tests/integration-tests && mvn
> -Dmaven.test.redirectTestOutputToFile=false -DskipIntegrationTests=false
> -Dtest="Test4781LargeMsgOnDisk" clean test}}
> the output of the reproducer is also attached.
> NOTE:
> the title+description of this issue has been updated significantly as
> initially a much more complicated scenario was described. further
> investigation has shown that it was actually a simpler scenario.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact