You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2019/06/21 13:47:31 UTC

[GitHub] [activemq-artemis] tabish121 commented on a change in pull request #2725: AETEMIS-2390 JMSMessageID header can be null when messages are cross-protocol

tabish121 commented on a change in pull request #2725: AETEMIS-2390 JMSMessageID header can be null when messages are cross-protocol
URL: https://github.com/apache/activemq-artemis/pull/2725#discussion_r296240264
 
 

 ##########
 File path: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/AmqpCoreConverter.java
 ##########
 @@ -345,6 +346,12 @@ private static ServerJMSMessage processProperties(ServerJMSMessage jms, Properti
             }
          }
          Object correlationID = properties.getCorrelationId();
+
+         if (properties.getMessageId() != null) {
+            //core jms clients get JMSMessageID from UserID which is a UUID object
+            jms.getInnerMessage().setUserID(UUIDGenerator.getInstance().generateUUID());
 
 Review comment:
   If the Core bits truly use UUID here then one thing you could do is attempt to preserve the original ID by checking if it is a UUID as that is one of the legal Message ID types:
   http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-message-id-uuid
   
   By preserving a true UUID as message ID you'd also be reducing the cost of the conversion by avoiding string operations to create the UUID string and also to encode the string to UTF8 for on the wire vs sending a couple longs and a byte to represent the value.  

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services