activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject activemq-artemis git commit: fixing AMQP conversions
Date Fri, 03 Mar 2017 21:24:28 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/artemis-1009 5f94d385c -> d279278ca


fixing AMQP conversions


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/d279278c
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/d279278c
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/d279278c

Branch: refs/heads/artemis-1009
Commit: d279278cacf20186efd28536c2223bbe05e53367
Parents: 5f94d38
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Fri Mar 3 16:23:48 2017 -0500
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Fri Mar 3 16:23:48 2017 -0500

----------------------------------------------------------------------
 .../amqp/converter/AMQPMessageSupport.java      |  61 ++++++-
 .../amqp/converter/AmqpCoreConverter.java       |  23 +--
 .../amqp/converter/CoreAmqpConverter.java       | 167 ++++---------------
 .../amqp/proton/ProtonServerSenderContext.java  |   1 +
 .../message/AMQPContentTypeSupportTest.java     |   2 +-
 .../JMSMappingInboundTransformerTest.java       |   6 +-
 .../JMSMappingOutboundTransformerTest.java      |  16 --
 pom.xml                                         |   4 +-
 .../PartialPooledByteBufAllocator.java          |   5 +
 9 files changed, 98 insertions(+), 187 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d279278c/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/AMQPMessageSupport.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/AMQPMessageSupport.java
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/AMQPMessageSupport.java
index 4b37a76..0a7a049 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/AMQPMessageSupport.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/AMQPMessageSupport.java
@@ -51,12 +51,62 @@ import static org.apache.activemq.artemis.api.core.Message.TEXT_TYPE;
 public final class AMQPMessageSupport {
 
    // Message Properties used to map AMQP to JMS and back
+   /**
+    * Attribute used to mark the class type of JMS message that a particular message
+    * instance represents, used internally by the client.
+    */
+   public static final Symbol JMS_MSG_TYPE = Symbol.getSymbol("x-opt-jms-msg-type");
+
+   /**
+    * Attribute used to mark the Application defined delivery time assigned to the message
+    */
+   public static final String JMS_DELIVERY_TIME = "x-opt-delivery-time";
+
+   /**
+    * Value mapping for JMS_MSG_TYPE which indicates the message is a generic JMS Message
+    * which has no body.
+    */
+   public static final byte JMS_MESSAGE = 0;
+
+   /**
+    * Value mapping for JMS_MSG_TYPE which indicates the message is a JMS ObjectMessage
+    * which has an Object value serialized in its message body.
+    */
+   public static final byte JMS_OBJECT_MESSAGE = 1;
+
+   /**
+    * Value mapping for JMS_MSG_TYPE which indicates the message is a JMS MapMessage
+    * which has an Map instance serialized in its message body.
+    */
+   public static final byte JMS_MAP_MESSAGE = 2;
+
+   /**
+    * Value mapping for JMS_MSG_TYPE which indicates the message is a JMS BytesMessage
+    * which has a body that consists of raw bytes.
+    */
+   public static final byte JMS_BYTES_MESSAGE = 3;
+
+   /**
+    * Value mapping for JMS_MSG_TYPE which indicates the message is a JMS StreamMessage
+    * which has a body that is a structured collection of primitives values.
+    */
+   public static final byte JMS_STREAM_MESSAGE = 4;
+
+   /**
+    * Value mapping for JMS_MSG_TYPE which indicates the message is a JMS TextMessage
+    * which has a body that contains a UTF-8 encoded String.
+    */
+   public static final byte JMS_TEXT_MESSAGE = 5;
+
+
+   /**
+    * Content type used to mark Data sections as containing a serialized java object.
+    */
+   public static final Symbol SERIALIZED_JAVA_OBJECT_CONTENT_TYPE = Symbol.getSymbol("application/x-java-serialized-object");
 
    public static final String JMS_AMQP_PREFIX = "JMS_AMQP_";
    public static final int JMS_AMQP_PREFIX_LENGTH = JMS_AMQP_PREFIX.length();
 
-   public static final String MESSAGE_FORMAT = "MESSAGE_FORMAT";
-   public static final String ORIGINAL_ENCODING = "ORIGINAL_ENCODING";
    public static final String NATIVE = "NATIVE";
    public static final String HEADER = "HEADER";
    public static final String PROPERTIES = "PROPERTIES";
@@ -76,7 +126,6 @@ public final class AMQPMessageSupport {
    public static final String JMS_AMQP_HEADER_DURABLE = JMS_AMQP_PREFIX + HEADER + DURABLE;
    public static final String JMS_AMQP_HEADER_PRIORITY = JMS_AMQP_PREFIX + HEADER + PRIORITY;
    public static final String JMS_AMQP_PROPERTIES = JMS_AMQP_PREFIX + PROPERTIES;
-   public static final String JMS_AMQP_ORIGINAL_ENCODING = JMS_AMQP_PREFIX + ORIGINAL_ENCODING;
    public static final String JMS_AMQP_NATIVE = JMS_AMQP_PREFIX + NATIVE;
    public static final String JMS_AMQP_FIRST_ACQUIRER = JMS_AMQP_PREFIX + FIRST_ACQUIRER;
    public static final String JMS_AMQP_CONTENT_TYPE = JMS_AMQP_PREFIX + CONTENT_TYPE;
@@ -108,12 +157,6 @@ public final class AMQPMessageSupport {
    public static final byte TEMP_QUEUE_TYPE = 0x02;
    public static final byte TEMP_TOPIC_TYPE = 0x03;
 
-
-   /**
-    * Content type used to mark Data sections as containing a serialized java object.
-    */
-   public static final String SERIALIZED_JAVA_OBJECT_CONTENT_TYPE = "application/x-java-serialized-object";
-
    /**
     * Content type used to mark Data sections as containing arbitrary bytes.
     */

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d279278c/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/AmqpCoreConverter.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/AmqpCoreConverter.java
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/AmqpCoreConverter.java
index 6ba1754..656f2f2 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/AmqpCoreConverter.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/AmqpCoreConverter.java
@@ -58,14 +58,6 @@ import org.apache.qpid.proton.amqp.messaging.Section;
 import org.apache.qpid.proton.codec.WritableBuffer;
 
 import static org.apache.activemq.artemis.api.core.Message.HDR_SCHEDULED_DELIVERY_TIME;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_DATA;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_NULL;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_SEQUENCE;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_VALUE_BINARY;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_VALUE_LIST;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_VALUE_MAP;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_VALUE_NULL;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_VALUE_STRING;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_CONTENT_ENCODING;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_CONTENT_TYPE;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_FIRST_ACQUIRER;
@@ -74,7 +66,6 @@ import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSup
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_HEADER_DURABLE;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_HEADER_PRIORITY;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_MESSAGE_ANNOTATION_PREFIX;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_ORIGINAL_ENCODING;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_REPLYTO_GROUP_ID;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.OCTET_STREAM_CONTENT_TYPE;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE;
@@ -99,7 +90,7 @@ public class AmqpCoreConverter {
       ServerJMSMessage result;
 
       if (body == null) {
-         if (isContentType(SERIALIZED_JAVA_OBJECT_CONTENT_TYPE, message.getProtonMessage()))
{
+         if (isContentType(SERIALIZED_JAVA_OBJECT_CONTENT_TYPE.toString(), message.getProtonMessage()))
{
             result = createObjectMessage(message.getMessageID());
          } else if (isContentType(OCTET_STREAM_CONTENT_TYPE, message.getProtonMessage())
|| isContentType(null, message.getProtonMessage())) {
             result = createBytesMessage(message.getMessageID());
@@ -111,12 +102,10 @@ public class AmqpCoreConverter {
                result = createMessage(message.getMessageID());
             }
          }
-
-         result.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_NULL);
       } else if (body instanceof Data) {
          Binary payload = ((Data) body).getValue();
 
-         if (isContentType(SERIALIZED_JAVA_OBJECT_CONTENT_TYPE, message.getProtonMessage()))
{
+         if (isContentType(SERIALIZED_JAVA_OBJECT_CONTENT_TYPE.toString(), message.getProtonMessage()))
{
             result = createObjectMessage(message.getMessageID(), payload.getArray(), payload.getArrayOffset(),
payload.getLength());
          } else if (isContentType(OCTET_STREAM_CONTENT_TYPE, message.getProtonMessage()))
{
             result = createBytesMessage(message.getMessageID(), payload.getArray(), payload.getArrayOffset(),
payload.getLength());
@@ -136,7 +125,6 @@ public class AmqpCoreConverter {
             }
          }
 
-         result.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_DATA);
       } else if (body instanceof AmqpSequence) {
          AmqpSequence sequence = (AmqpSequence) body;
          ServerJMSStreamMessage m = createStreamMessage(message.getMessageID());
@@ -145,33 +133,28 @@ public class AmqpCoreConverter {
          }
 
          result = m;
-         result.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_SEQUENCE);
       } else if (body instanceof AmqpValue) {
          Object value = ((AmqpValue) body).getValue();
          if (value == null || value instanceof String) {
             result = createTextMessage(message.getMessageID(), (String) value);
 
-            result.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, value == null ? AMQP_VALUE_NULL
: AMQP_VALUE_STRING);
          } else if (value instanceof Binary) {
             Binary payload = (Binary) value;
 
-            if (isContentType(SERIALIZED_JAVA_OBJECT_CONTENT_TYPE, message.getProtonMessage()))
{
+            if (isContentType(SERIALIZED_JAVA_OBJECT_CONTENT_TYPE.toString(), message.getProtonMessage()))
{
                result = createObjectMessage(message.getMessageID(), payload);
             } else {
                result = createBytesMessage(message.getMessageID(), payload.getArray(), payload.getArrayOffset(),
payload.getLength());
             }
 
-            result.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_VALUE_BINARY);
          } else if (value instanceof List) {
             ServerJMSStreamMessage m = createStreamMessage(message.getMessageID());
             for (Object item : (List<Object>) value) {
                m.writeObject(item);
             }
             result = m;
-            result.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_VALUE_LIST);
          } else if (value instanceof Map) {
             result = createMapMessage(message.getMessageID(), (Map<String, Object>)
value);
-            result.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_VALUE_MAP);
          } else {
             ByteBuf buf = PooledByteBufAllocator.DEFAULT.heapBuffer(1024);
             try {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d279278c/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/CoreAmqpConverter.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/CoreAmqpConverter.java
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/CoreAmqpConverter.java
index d82abff..44f925b 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/CoreAmqpConverter.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/CoreAmqpConverter.java
@@ -56,7 +56,6 @@ import org.apache.qpid.proton.amqp.UnsignedInteger;
 import org.apache.qpid.proton.amqp.messaging.AmqpSequence;
 import org.apache.qpid.proton.amqp.messaging.AmqpValue;
 import org.apache.qpid.proton.amqp.messaging.ApplicationProperties;
-import org.apache.qpid.proton.amqp.messaging.Data;
 import org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations;
 import org.apache.qpid.proton.amqp.messaging.Footer;
 import org.apache.qpid.proton.amqp.messaging.Header;
@@ -69,13 +68,6 @@ import org.jboss.logging.Logger;
 
 import static org.apache.activemq.artemis.api.core.FilterConstants.NATIVE_MESSAGE_ID;
 import static org.apache.activemq.artemis.api.core.Message.HDR_SCHEDULED_DELIVERY_TIME;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_DATA;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_NULL;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_SEQUENCE;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_UNKNOWN;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_VALUE_BINARY;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_VALUE_LIST;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_VALUE_STRING;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.EMPTY_BINARY;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_CONTENT_ENCODING;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_CONTENT_TYPE;
@@ -87,7 +79,6 @@ import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSup
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_HEADER_PRIORITY;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_MESSAGE_ANNOTATION_PREFIX;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_NATIVE;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_ORIGINAL_ENCODING;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_PREFIX;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_PROPERTIES;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_REPLYTO_GROUP_ID;
@@ -123,13 +114,13 @@ public class CoreAmqpConverter {
 
       long messageFormat = 0;
       Header header = null;
-      Properties properties = null;
+      final Properties properties = new Properties();
       Map<Symbol, Object> daMap = null;
-      Map<Symbol, Object> maMap = null;
+      final Map<Symbol, Object> maMap = new HashMap<>();
       Map<String, Object> apMap = null;
       Map<Object, Object> footerMap = null;
 
-      Section body = convertBody(message);
+      Section body = convertBody(message, maMap, properties);
 
       if (message.getInnerMessage().isDurable()) {
          if (header == null) {
@@ -146,16 +137,10 @@ public class CoreAmqpConverter {
       }
       String type = message.getJMSType();
       if (type != null) {
-         if (properties == null) {
-            properties = new Properties();
-         }
          properties.setSubject(type);
       }
       String messageId = message.getJMSMessageID();
       if (messageId != null) {
-         if (properties == null) {
-            properties = new Properties();
-         }
          try {
             properties.setMessageId(AMQPMessageIdHelper.INSTANCE.toIdObject(messageId));
          } catch (ActiveMQAMQPIllegalStateException e) {
@@ -164,31 +149,16 @@ public class CoreAmqpConverter {
       }
       Destination destination = message.getJMSDestination();
       if (destination != null) {
-         if (properties == null) {
-            properties = new Properties();
-         }
          properties.setTo(toAddress(destination));
-         if (maMap == null) {
-            maMap = new HashMap<>();
-         }
          maMap.put(JMS_DEST_TYPE_MSG_ANNOTATION, destinationType(destination));
       }
       Destination replyTo = message.getJMSReplyTo();
       if (replyTo != null) {
-         if (properties == null) {
-            properties = new Properties();
-         }
          properties.setReplyTo(toAddress(replyTo));
-         if (maMap == null) {
-            maMap = new HashMap<>();
-         }
          maMap.put(JMS_REPLY_TO_TYPE_MSG_ANNOTATION, destinationType(replyTo));
       }
       String correlationId = message.getJMSCorrelationID();
       if (correlationId != null) {
-         if (properties == null) {
-            properties = new Properties();
-         }
          try {
             properties.setCorrelationId(AMQPMessageIdHelper.INSTANCE.toIdObject(correlationId));
          } catch (ActiveMQAMQPIllegalStateException e) {
@@ -207,16 +177,10 @@ public class CoreAmqpConverter {
          }
          header.setTtl(new UnsignedInteger((int) ttl));
 
-         if (properties == null) {
-            properties = new Properties();
-         }
          properties.setAbsoluteExpiryTime(new Date(expiration));
       }
       long timeStamp = message.getJMSTimestamp();
       if (timeStamp != 0) {
-         if (properties == null) {
-            properties = new Properties();
-         }
          properties.setCreationTime(new Date(timeStamp));
       }
 
@@ -225,23 +189,14 @@ public class CoreAmqpConverter {
          if (key.startsWith("JMSX")) {
             if (key.equals("JMSXUserID")) {
                String value = message.getStringProperty(key);
-               if (properties == null) {
-                  properties = new Properties();
-               }
                properties.setUserId(new Binary(value.getBytes(StandardCharsets.UTF_8)));
                continue;
             } else if (key.equals("JMSXGroupID")) {
                String value = message.getStringProperty(key);
-               if (properties == null) {
-                  properties = new Properties();
-               }
                properties.setGroupId(value);
                continue;
             } else if (key.equals("JMSXGroupSeq")) {
                UnsignedInteger value = new UnsignedInteger(message.getIntProperty(key));
-               if (properties == null) {
-                  properties = new Properties();
-               }
                properties.setGroupSequence(value);
                continue;
             }
@@ -250,9 +205,6 @@ public class CoreAmqpConverter {
             if (key.equals(JMS_AMQP_NATIVE)) {
                // skip..internal use only
                continue;
-            } else if (key.equals(JMS_AMQP_ORIGINAL_ENCODING)) {
-               // skip..internal use only
-               continue;
             } else if (key.equals(JMS_AMQP_FIRST_ACQUIRER)) {
                if (header == null) {
                   header = new Header();
@@ -277,9 +229,6 @@ public class CoreAmqpConverter {
                header.setPriority(UnsignedByte.valueOf(priority));
                continue;
             } else if (key.startsWith(JMS_AMQP_PROPERTIES)) {
-               if (properties == null) {
-                  properties = new Properties();
-               }
                continue;
             } else if (key.startsWith(JMS_AMQP_DELIVERY_ANNOTATION_PREFIX)) {
                if (daMap == null) {
@@ -289,28 +238,16 @@ public class CoreAmqpConverter {
                daMap.put(Symbol.valueOf(name), message.getObjectProperty(key));
                continue;
             } else if (key.startsWith(JMS_AMQP_MESSAGE_ANNOTATION_PREFIX)) {
-               if (maMap == null) {
-                  maMap = new HashMap<>();
-               }
                String name = key.substring(JMS_AMQP_MESSAGE_ANNOTATION_PREFIX.length());
                maMap.put(Symbol.valueOf(name), message.getObjectProperty(key));
                continue;
             } else if (key.equals(JMS_AMQP_CONTENT_TYPE)) {
-               if (properties == null) {
-                  properties = new Properties();
-               }
                properties.setContentType(Symbol.getSymbol(message.getStringProperty(key)));
                continue;
             } else if (key.equals(JMS_AMQP_CONTENT_ENCODING)) {
-               if (properties == null) {
-                  properties = new Properties();
-               }
                properties.setContentEncoding(Symbol.getSymbol(message.getStringProperty(key)));
                continue;
             } else if (key.equals(JMS_AMQP_REPLYTO_GROUP_ID)) {
-               if (properties == null) {
-                  properties = new Properties();
-               }
                properties.setReplyToGroupId(message.getStringProperty(key));
                continue;
             } else if (key.startsWith(JMS_AMQP_FOOTER_PREFIX)) {
@@ -323,9 +260,6 @@ public class CoreAmqpConverter {
             }
          } else if (key.equals("_AMQ_GROUP_ID")) {
             String value = message.getStringProperty(key);
-            if (properties == null) {
-               properties = new Properties();
-            }
             properties.setGroupId(value);
             continue;
          } else if (key.equals(NATIVE_MESSAGE_ID)) {
@@ -379,7 +313,9 @@ public class CoreAmqpConverter {
          byte[] data = new byte[buffer.writerIndex()];
          buffer.readBytes(data);
 
-         return new AMQPMessage(messageFormat, data);
+         AMQPMessage amqpMessage = new AMQPMessage(messageFormat, data);
+         amqpMessage.setMessageID(message.getInnerMessage().getMessageID());
+         return amqpMessage;
 
       } finally {
          TLSEncode.getEncoder().setByteBuffer((WritableBuffer) null);
@@ -387,52 +323,27 @@ public class CoreAmqpConverter {
       }
    }
 
-   private static Section convertBody(ServerJMSMessage message) throws JMSException {
+   private static Section convertBody(ServerJMSMessage message, Map<Symbol, Object>
maMap, Properties properties) throws JMSException {
 
       Section body = null;
-      short orignalEncoding = AMQP_UNKNOWN;
-
-      try {
-         orignalEncoding = message.getShortProperty(JMS_AMQP_ORIGINAL_ENCODING);
-      } catch (Exception ex) {
-         // Ignore and stick with UNKNOWN
-      }
 
       if (message instanceof ServerJMSBytesMessage) {
          Binary payload = getBinaryFromMessageBody((ServerJMSBytesMessage) message);
 
+         maMap.put(AMQPMessageSupport.JMS_MSG_TYPE, AMQPMessageSupport.JMS_BYTES_MESSAGE);
          if (payload == null) {
             payload = EMPTY_BINARY;
-         }
-
-         switch (orignalEncoding) {
-            case AMQP_NULL:
-               break;
-            case AMQP_VALUE_BINARY:
-               body = new AmqpValue(payload);
-               break;
-            case AMQP_DATA:
-            case AMQP_UNKNOWN:
-            default:
-               body = new Data(payload);
-               break;
+         } else {
+            body = new AmqpValue(payload);
          }
       } else if (message instanceof ServerJMSTextMessage) {
-         switch (orignalEncoding) {
-            case AMQP_NULL:
-               break;
-            case AMQP_DATA:
-               body = new Data(getBinaryFromMessageBody((ServerJMSTextMessage) message));
-               break;
-            case AMQP_VALUE_STRING:
-            case AMQP_UNKNOWN:
-            default:
-               body = new AmqpValue(((TextMessage) message).getText());
-               break;
-         }
+         body = new AmqpValue(((TextMessage) message).getText());
+         maMap.put(AMQPMessageSupport.JMS_MSG_TYPE, AMQPMessageSupport.JMS_TEXT_MESSAGE);
       } else if (message instanceof ServerJMSMapMessage) {
          body = new AmqpValue(getMapFromMessageBody((ServerJMSMapMessage) message));
+         maMap.put(AMQPMessageSupport.JMS_MSG_TYPE, AMQPMessageSupport.JMS_MAP_MESSAGE);
       } else if (message instanceof ServerJMSStreamMessage) {
+         maMap.put(AMQPMessageSupport.JMS_MSG_TYPE, AMQPMessageSupport.JMS_STREAM_MESSAGE);
          ArrayList<Object> list = new ArrayList<>();
          final ServerJMSStreamMessage m = (ServerJMSStreamMessage) message;
          try {
@@ -442,57 +353,41 @@ public class CoreAmqpConverter {
          } catch (MessageEOFException e) {
          }
 
-         switch (orignalEncoding) {
-            case AMQP_SEQUENCE:
-               body = new AmqpSequence(list);
-               break;
-            case AMQP_VALUE_LIST:
-            case AMQP_UNKNOWN:
-            default:
-               body = new AmqpValue(list);
-               break;
-         }
+         body = new AmqpSequence(list);
       } else if (message instanceof ServerJMSObjectMessage) {
+         properties.setContentType(AMQPMessageSupport.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE);
+         maMap.put(AMQPMessageSupport.JMS_MSG_TYPE, AMQPMessageSupport.JMS_OBJECT_MESSAGE);
          Binary payload = getBinaryFromMessageBody((ServerJMSObjectMessage) message);
 
          if (payload == null) {
             payload = EMPTY_BINARY;
          }
 
-         switch (orignalEncoding) {
-            case AMQP_VALUE_BINARY:
-               body = new AmqpValue(payload);
-               break;
-            case AMQP_DATA:
-            case AMQP_UNKNOWN:
-            default:
-               body = new Data(payload);
-               break;
-         }
+         body = new AmqpValue(payload);
 
          // For a non-AMQP message we tag the outbound content type as containing
          // a serialized Java object so that an AMQP client has a hint as to what
          // we are sending it.
          if (!message.propertyExists(JMS_AMQP_CONTENT_TYPE)) {
-            message.setStringProperty(JMS_AMQP_CONTENT_TYPE, SERIALIZED_JAVA_OBJECT_CONTENT_TYPE);
+            message.setStringProperty(JMS_AMQP_CONTENT_TYPE, SERIALIZED_JAVA_OBJECT_CONTENT_TYPE.toString());
          }
       } else if (message instanceof ServerJMSMessage) {
+         maMap.put(AMQPMessageSupport.JMS_MSG_TYPE, AMQPMessageSupport.JMS_MESSAGE);
          // If this is not an AMQP message that was converted then the original encoding
          // will be unknown so we check for special cases of messages with special data
          // encoded into the server message body.
-         if (orignalEncoding == AMQP_UNKNOWN) {
-            ICoreMessage internalMessage = message.getInnerMessage();
-            int readerIndex = internalMessage.getBodyBuffer().readerIndex();
-            try {
-               Object s = internalMessage.getBodyBuffer().readNullableSimpleString();
-               if (s != null) {
-                  body = new AmqpValue(s.toString());
-               }
-            } catch (Throwable ignored) {
-               logger.debug("Exception ignored during conversion", ignored.getMessage(),
ignored);
-            } finally {
-               internalMessage.getBodyBuffer().readerIndex(readerIndex);
+         ICoreMessage internalMessage = message.getInnerMessage();
+         int readerIndex = internalMessage.getBodyBuffer().readerIndex();
+         try {
+            Object s = internalMessage.getBodyBuffer().readNullableSimpleString();
+            if (s != null) {
+               body = new AmqpValue(s.toString());
             }
+         } catch (Throwable ignored) {
+            logger.debug("Exception ignored during conversion", ignored.getMessage(), ignored);
+            body = new AmqpValue("Conversion to AMQP error!");
+         } finally {
+            internalMessage.getBodyBuffer().readerIndex(readerIndex);
          }
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d279278c/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
index 1bb15b3..4e33c9b 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
@@ -518,6 +518,7 @@ public class ProtonServerSenderContext extends ProtonInitializable implements
Pr
             try {
                sessionSPI.ack(null, brokerConsumer, message);
             } catch (Exception e) {
+               e.printStackTrace();
                throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.errorAcknowledgingMessage(message.toString(),
e.getMessage());
             }
          } else if (remoteState instanceof Released) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d279278c/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/AMQPContentTypeSupportTest.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/AMQPContentTypeSupportTest.java
b/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/AMQPContentTypeSupportTest.java
index c6108b4..54a98e6 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/AMQPContentTypeSupportTest.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/AMQPContentTypeSupportTest.java
@@ -218,7 +218,7 @@ public class AMQPContentTypeSupportTest {
    @Test
    public void testParseContentTypeWithApplicationJavaSerialized() throws Exception {
       // Expect null as this is not a textual type
-      doParseContentTypeTestImpl(AMQPMessageSupport.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE,
null);
+      doParseContentTypeTestImpl(AMQPMessageSupport.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE.toString(),
null);
    }
 
    private void doParseContentTypeTestImpl(String contentType, Charset expected) throws ActiveMQAMQPInvalidContentTypeException
{

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d279278c/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/JMSMappingInboundTransformerTest.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/JMSMappingInboundTransformerTest.java
b/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/JMSMappingInboundTransformerTest.java
index 963be20..a0e9fd5 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/JMSMappingInboundTransformerTest.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/JMSMappingInboundTransformerTest.java
@@ -116,7 +116,7 @@ public class JMSMappingInboundTransformerTest {
    @Test
    public void testCreateObjectMessageFromNoBodySectionAndContentType() throws Exception
{
       Message message = Message.Factory.create();
-      message.setContentType(AMQPMessageSupport.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE);
+      message.setContentType(AMQPMessageSupport.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE.toString());
 
       javax.jms.Message jmsMessage = ServerJMSMessage.wrapCoreMessage(new AMQPMessage(message).toCore());
 
@@ -231,7 +231,7 @@ public class JMSMappingInboundTransformerTest {
       Message message = Proton.message();
       Binary binary = new Binary(new byte[0]);
       message.setBody(new Data(binary));
-      message.setContentType(AMQPMessageSupport.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE);
+      message.setContentType(AMQPMessageSupport.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE.toString());
 
       javax.jms.Message jmsMessage = ServerJMSMessage.wrapCoreMessage(new AMQPMessage(message).toCore());
 
@@ -393,7 +393,7 @@ public class JMSMappingInboundTransformerTest {
    public void testCreateObjectMessageFromAmqpValueWithBinaryAndContentType() throws Exception
{
       Message message = Message.Factory.create();
       message.setBody(new AmqpValue(new Binary(new byte[0])));
-      message.setContentType(AMQPMessageSupport.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE);
+      message.setContentType(AMQPMessageSupport.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE.toString());
 
       javax.jms.Message jmsMessage = ServerJMSMessage.wrapCoreMessage(new AMQPMessage(message).toCore());
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d279278c/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/JMSMappingOutboundTransformerTest.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/JMSMappingOutboundTransformerTest.java
b/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/JMSMappingOutboundTransformerTest.java
index e56b8ff..b584627 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/JMSMappingOutboundTransformerTest.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/JMSMappingOutboundTransformerTest.java
@@ -54,7 +54,6 @@ import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSup
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_SEQUENCE;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_UNKNOWN;
 import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.AMQP_VALUE_BINARY;
-import static org.apache.activemq.artemis.protocol.amqp.converter.AMQPMessageSupport.JMS_AMQP_ORIGINAL_ENCODING;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -92,7 +91,6 @@ public class JMSMappingOutboundTransformerTest {
    @Test
    public void testConvertTextMessageToAmqpMessageWithNoBodyOriginalEncodingWasNull() throws
Exception {
       ServerJMSTextMessage outbound = createTextMessage();
-      outbound.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_NULL);
       outbound.encode();
 
       Message amqp = AMQPConverter.getInstance().fromCore(outbound.getInnerMessage()).getProtonMessage();
@@ -159,7 +157,6 @@ public class JMSMappingOutboundTransformerTest {
    @Test
    public void testConvertEmptyBytesMessageToAmqpMessageWithAmqpValueBody() throws Exception
{
       ServerJMSBytesMessage outbound = createBytesMessage();
-      outbound.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_VALUE_BINARY);
       outbound.encode();
 
       Message amqp = AMQPConverter.getInstance().fromCore(outbound.getInnerMessage()).getProtonMessage();
@@ -174,7 +171,6 @@ public class JMSMappingOutboundTransformerTest {
    public void testConvertUncompressedBytesMessageToAmqpMessageWithAmqpValueBody() throws
Exception {
       byte[] expectedPayload = new byte[] {8, 16, 24, 32};
       ServerJMSBytesMessage outbound = createBytesMessage();
-      outbound.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_VALUE_BINARY);
       outbound.writeBytes(expectedPayload);
       outbound.encode();
 
@@ -196,7 +192,6 @@ public class JMSMappingOutboundTransformerTest {
    public void testConvertCompressedBytesMessageToAmqpMessageWithAmqpValueBody() throws Exception
{
       byte[] expectedPayload = new byte[] {8, 16, 24, 32};
       ServerJMSBytesMessage outbound = createBytesMessage(true);
-      outbound.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_VALUE_BINARY);
       outbound.writeBytes(expectedPayload);
       outbound.encode();
 
@@ -308,7 +303,6 @@ public class JMSMappingOutboundTransformerTest {
    @Test
    public void testConvertStreamMessageToAmqpMessageWithAmqpSequencey() throws Exception
{
       ServerJMSStreamMessage outbound = createStreamMessage();
-      outbound.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_SEQUENCE);
       outbound.encode();
 
       Message amqp = AMQPConverter.getInstance().fromCore(outbound.getInnerMessage()).getProtonMessage();
@@ -340,7 +334,6 @@ public class JMSMappingOutboundTransformerTest {
    @Test
    public void testConvertCompressedStreamMessageToAmqpMessageWithAmqpSequencey() throws
Exception {
       ServerJMSStreamMessage outbound = createStreamMessage(true);
-      outbound.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_SEQUENCE);
       outbound.writeBoolean(false);
       outbound.writeString("test");
       outbound.encode();
@@ -374,7 +367,6 @@ public class JMSMappingOutboundTransformerTest {
    @Test
    public void testConvertEmptyObjectMessageToAmqpMessageUnknownEncodingGetsDataSection()
throws Exception {
       ServerJMSObjectMessage outbound = createObjectMessage();
-      outbound.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_UNKNOWN);
       outbound.encode();
 
       Message amqp = AMQPConverter.getInstance().fromCore(outbound.getInnerMessage()).getProtonMessage();
@@ -387,7 +379,6 @@ public class JMSMappingOutboundTransformerTest {
    @Test
    public void testConvertEmptyObjectMessageToAmqpMessageWithAmqpValueBody() throws Exception
{
       ServerJMSObjectMessage outbound = createObjectMessage();
-      outbound.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_VALUE_BINARY);
       outbound.encode();
 
       Message amqp = AMQPConverter.getInstance().fromCore(outbound.getInnerMessage()).getProtonMessage();
@@ -417,7 +408,6 @@ public class JMSMappingOutboundTransformerTest {
    @Test
    public void testConvertObjectMessageToAmqpMessageUnknownEncodingGetsDataSection() throws
Exception {
       ServerJMSObjectMessage outbound = createObjectMessage(TEST_OBJECT_VALUE);
-      outbound.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_UNKNOWN);
       outbound.encode();
 
       Message amqp = AMQPConverter.getInstance().fromCore(outbound.getInnerMessage()).getProtonMessage();
@@ -434,7 +424,6 @@ public class JMSMappingOutboundTransformerTest {
    @Test
    public void testConvertObjectMessageToAmqpMessageWithAmqpValueBody() throws Exception
{
       ServerJMSObjectMessage outbound = createObjectMessage(TEST_OBJECT_VALUE);
-      outbound.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_VALUE_BINARY);
       outbound.encode();
 
       Message amqp = AMQPConverter.getInstance().fromCore(outbound.getInnerMessage()).getProtonMessage();
@@ -468,7 +457,6 @@ public class JMSMappingOutboundTransformerTest {
    @Test
    public void testConvertCompressedObjectMessageToAmqpMessageUnknownEncodingGetsDataSection()
throws Exception {
       ServerJMSObjectMessage outbound = createObjectMessage(TEST_OBJECT_VALUE, true);
-      outbound.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_UNKNOWN);
       outbound.encode();
 
       Message amqp = AMQPConverter.getInstance().fromCore(outbound.getInnerMessage()).getProtonMessage();
@@ -485,7 +473,6 @@ public class JMSMappingOutboundTransformerTest {
    @Test
    public void testConvertCompressedObjectMessageToAmqpMessageWithAmqpValueBody() throws
Exception {
       ServerJMSObjectMessage outbound = createObjectMessage(TEST_OBJECT_VALUE, true);
-      outbound.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_VALUE_BINARY);
       outbound.encode();
 
       Message amqp = AMQPConverter.getInstance().fromCore(outbound.getInnerMessage()).getProtonMessage();
@@ -518,7 +505,6 @@ public class JMSMappingOutboundTransformerTest {
    public void testConvertTextMessageCreatesBodyUsingOriginalEncodingWithDataSection() throws
Exception {
       String contentString = "myTextMessageContent";
       ServerJMSTextMessage outbound = createTextMessage(contentString);
-      outbound.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_DATA);
       outbound.encode();
 
       Message amqp = AMQPConverter.getInstance().fromCore(outbound.getInnerMessage()).getProtonMessage();
@@ -536,7 +522,6 @@ public class JMSMappingOutboundTransformerTest {
    public void testConvertTextMessageContentNotStoredCreatesBodyUsingOriginalEncodingWithDataSection()
throws Exception {
       String contentString = "myTextMessageContent";
       ServerJMSTextMessage outbound = createTextMessage(contentString);
-      outbound.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_DATA);
       outbound.encode();
 
       Message amqp = AMQPConverter.getInstance().fromCore(outbound.getInnerMessage()).getProtonMessage();
@@ -580,7 +565,6 @@ public class JMSMappingOutboundTransformerTest {
    public void testConvertCompressedTextMessageCreatesDataSectionBody() throws Exception
{
       String contentString = "myTextMessageContent";
       ServerJMSTextMessage outbound = createTextMessage(contentString, true);
-      outbound.setShortProperty(JMS_AMQP_ORIGINAL_ENCODING, AMQP_DATA);
       outbound.encode();
 
       Message amqp = AMQPConverter.getInstance().fromCore(outbound.getInnerMessage()).getProtonMessage();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d279278c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7388068..bb0030a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -82,11 +82,11 @@
       <jetty.version>9.4.0.M1</jetty.version>
       <jgroups.version>3.6.9.Final</jgroups.version>
       <maven.assembly.plugin.version>2.4</maven.assembly.plugin.version>
-      <netty.version>4.1.5.Final</netty.version>
+      <netty.version>4.1.8.Final</netty.version>
       <proton.version>0.17.0</proton.version>
       <resteasy.version>3.0.19.Final</resteasy.version>
       <slf4j.version>1.7.21</slf4j.version>
-      <qpid.jms.version>0.11.0</qpid.jms.version>
+      <qpid.jms.version>0.20.0-SNAPSHOT</qpid.jms.version>
       <johnzon.version>0.9.5</johnzon.version>
       <json-p.spec.version>1.0-alpha-1</json-p.spec.version>
       <javax.inject.version>1</javax.inject.version>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d279278c/tests/artemis-test-support/src/main/java/org/apache/activemq/transport/amqp/client/transport/PartialPooledByteBufAllocator.java
----------------------------------------------------------------------
diff --git a/tests/artemis-test-support/src/main/java/org/apache/activemq/transport/amqp/client/transport/PartialPooledByteBufAllocator.java
b/tests/artemis-test-support/src/main/java/org/apache/activemq/transport/amqp/client/transport/PartialPooledByteBufAllocator.java
index 12f5568..17f601a 100644
--- a/tests/artemis-test-support/src/main/java/org/apache/activemq/transport/amqp/client/transport/PartialPooledByteBufAllocator.java
+++ b/tests/artemis-test-support/src/main/java/org/apache/activemq/transport/amqp/client/transport/PartialPooledByteBufAllocator.java
@@ -37,6 +37,11 @@ public class PartialPooledByteBufAllocator implements ByteBufAllocator
{
    }
 
    @Override
+   public int calculateNewCapacity(int minNewCapacity, int maxCapacity) {
+      return POOLED.calculateNewCapacity(minNewCapacity, maxCapacity);
+   }
+
+   @Override
    public ByteBuf buffer() {
       return UNPOOLED.heapBuffer();
    }


Mime
View raw message