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



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PulsarCommandSenderImpl.java
##########
@@ -243,8 +243,12 @@ 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()
+                        || 
!cnx.isExposingBrokerEntryMetadataToClientEnabled()) {

Review comment:
       We can get the configuration through the following dependency paths
   PulsarCommandSenderImpl -> ServerCnx -> BrokerService -> PulsarService -> 
configuration
   `isExposingBrokerEntryMetadataToClientEnabled` in ServerCnx can be removed




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to