From be3812b2e2e90fdffee33f86085bf96c3cf1eca8 Mon Sep 17 00:00:00 2001 From: franz1981 Date: Mon, 11 Jan 2021 10:54:29 +0100 Subject: [PATCH] ARTEMIS-3059 AMQP message reencoding should save creating Netty heap arenas --- .../artemis/protocol/amqp/broker/AMQPStandardMessage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPStandardMessage.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPStandardMessage.java index d5d42d8d9c..d409568290 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPStandardMessage.java +++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPStandardMessage.java @@ -202,7 +202,7 @@ public class AMQPStandardMessage extends AMQPMessage { this.modified = false; this.messageDataScanned = MessageDataScanningStatus.NOT_SCANNED.code; int estimated = Math.max(1500, data != null ? data.capacity() + 1000 : 0); - ByteBuf buffer = PooledByteBufAllocator.DEFAULT.heapBuffer(estimated); + ByteBuf buffer = PooledByteBufAllocator.DEFAULT.directBuffer(estimated); EncoderImpl encoder = TLSEncode.getEncoder(); try {