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:
[email protected]


With regards,
Apache Git Services

Reply via email to