mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-02-08 19:15:08 +00:00
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.