This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/master by this push:
new 111b551 ARTEMIS-2789 AMQP Large Message Memory Estimate
new ee4a193 This closes #3163
111b551 is described below
commit 111b551d792c35c057aa592dfdae065f7e22fd73
Author: Clebert Suconic <[email protected]>
AuthorDate: Wed Jun 3 15:50:01 2020 -0400
ARTEMIS-2789 AMQP Large Message Memory Estimate
---
.../activemq/artemis/protocol/amqp/broker/AMQPLargeMessage.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPLargeMessage.java
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPLargeMessage.java
index 0bbaffc..d37888f 100644
---
a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPLargeMessage.java
+++
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPLargeMessage.java
@@ -374,9 +374,13 @@ public class AMQPLargeMessage extends AMQPMessage
implements LargeServerMessage
return 0;
}
+
@Override
public int getMemoryEstimate() {
- return 0;
+ if (memoryEstimate == -1) {
+ memoryEstimate = memoryOffset * 2 + (extraProperties != null ?
extraProperties.getEncodeSize() : 0);
+ }
+ return memoryEstimate;
}
@Override