LeBW commented on a change in pull request #11553:
URL: https://github.com/apache/pulsar/pull/11553#discussion_r691230182



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarCommandSenderImpl.java
##########
@@ -243,8 +243,13 @@ public ChannelPromise sendMessagesToConsumer(long 
consumerId, String topicName,
                 // increment ref-count of data and release at the end of 
process:
                 // so, we can get chance to call entry.release
                 metadataAndPayload.retain();
-                // skip raw message metadata since broker timestamp only used 
in broker side
-                Commands.skipBrokerEntryMetadataIfExist(metadataAndPayload);
+                // skip broker entry metadata if consumer-client doesn't 
support broker entry metadata or the
+                // features is not enabled
+                if (cnx.getRemoteEndpointProtocolVersion() < 
ProtocolVersion.v18.getValue()

Review comment:
       > It is better to use the `FeatureFlag` mechanism instead of checking 
the `ProtocolVersion`. This will ensure clients can phase in with the support 
of this feature.
   
   Thanks for your suggestion. Maybe it's better to check the `FeatureFlag` and 
the `ProtocolVersion` Both?




-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to