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 2021/08/12 12:06:20 UTC

[GitHub] [pulsar] 315157973 commented on a change in pull request #11553: Exposing the broker entry metadata to client

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: commits-unsubscribe@pulsar.apache.org

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