ARTEMIS-3059 AMQP message reencoding should save creating Netty heap arenas

This commit is contained in:
franz1981 2021-01-11 10:54:29 +01:00 committed by Clebert Suconic
parent 3a138b4829
commit be3812b2e2
1 changed files with 1 additions and 1 deletions

View File

@ -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 {