diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java b/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java index b1ede3db6b..c9030a0aa5 100755 --- a/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java @@ -256,7 +256,9 @@ public final class OpenWireFormat implements WireFormat { } } else { - dataOut.writeInt(size); + if (!sizePrefixDisabled) { + dataOut.writeInt(size); + } dataOut.writeByte(NULL_TYPE); } }