[ 
https://issues.apache.org/jira/browse/ARTEMIS-4588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17817453#comment-17817453
 ] 

ASF subversion and git services commented on ARTEMIS-4588:
----------------------------------------------------------

Commit 77d9f10a3dd3febff8fee417914806b8e0c2b4c2 in activemq-artemis's branch 
refs/heads/main from Justin Bertram
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=77d9f10a3d ]

ARTEMIS-4588 30 second pause for large msgs + federation

Large message support was added to
o.a.a.a.c.s.f.FederatedQueueConsumerImpl#onMessage via cf85d35 for
ARTEMIS-3308. The problem with that change is that when onMessage
returns o.a.a.a.c.c.i.ClientConsumerImpl#callOnMessage will eventually
call o.a.a.a.c.c.i.ClientLargeMessageImpl#discardBody which eventually
ends up in o.a.a.a.c.c.i.LargeMessageControllerImpl#popPacket waiting 30
seconds (i.e. the default readTimeout) for more packets to arrive (which
never do). This happens because the FederatedQueueConsumer short-cuts
the "normal" process by using LargeMessageControllerImpl#take.

This commit fixes that by tracking the number of bytes "taken" and then
looking at that value later when discarding the body effectively
skipping the 30 second wait.


> Queue Federation and large messages move slowdown
> -------------------------------------------------
>
>                 Key: ARTEMIS-4588
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4588
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker, Federation
>    Affects Versions: 2.30.0
>            Reporter: Jean-Pascal Briquet
>            Assignee: Justin Bertram
>            Priority: Major
>         Attachments: federation-large-message-testcase.java
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> *Artemis configuration:* 
> Artemis configured with a dual queue federation link on Artemis and 
> requirement to support via this federation link standard messages and large 
> messages (between 100kb and 500kb).
>  
> *What is happening:*
> When a consumer is created, one or two large messages are consumed instantly 
> thanks to the federation but next messages are received very slowly and 
> arrive one by one after a delay of 30s.
> The queue federation works well with standard messages and does not have any 
> pause between message consumption.
> The delay between each message consumed looks to be coming from the 
> call-timeout property set on the federation upstream, when changing its 
> value, it changes the pause/delay between large messages consumption.
>  
> *Reproduction*
> A test case is attached and can be run by adding it into 
> "tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/federation/FederatedQueueTest.java"
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to