You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/01/11 07:18:08 UTC

[GitHub] merlimat commented on a change in pull request #1054: Populate message properties after building a message

merlimat commented on a change in pull request #1054: Populate message properties after building a message
URL: https://github.com/apache/incubator-pulsar/pull/1054#discussion_r160879283
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageImpl.java
 ##########
 @@ -75,12 +81,8 @@ static MessageImpl create(MessageMetadata.Builder msgMetadataBuilder, ByteBuffer
         this.payload = Unpooled.copiedBuffer(payload);
 
         if (msgMetadata.getPropertiesCount() > 0) {
-            Map<String, String> properties = Maps.newTreeMap();
-            for (KeyValue entry : msgMetadata.getPropertiesList()) {
-                properties.put(entry.getKey(), entry.getValue());
-            }
-
-            this.properties = Collections.unmodifiableMap(properties);
+            this.properties = Collections.unmodifiableMap(msgMetadataBuilder.getPropertiesList().stream()
 
 Review comment:
   I think this might also affect the replicator messages, in where we don't really care about the properties

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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