diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/dataformat/JournalAddRecord.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/dataformat/JournalAddRecord.java index 6e5b651353..fe4d432830 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/dataformat/JournalAddRecord.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/dataformat/JournalAddRecord.java @@ -65,7 +65,7 @@ public class JournalAddRecord extends JournalInternalRecord { int recordEncodeSize = persister.getEncodeSize(record); - buffer.writeInt(persister.getEncodeSize(record)); + buffer.writeInt(recordEncodeSize); buffer.writeByte(recordType);