merlimat commented on a change in pull request #1066: Issue 937: add 
CommandGetLastMessageId to make reader know the end of topic
URL: https://github.com/apache/incubator-pulsar/pull/1066#discussion_r168054738
 
 

 ##########
 File path: 
pulsar-common/src/main/java/org/apache/pulsar/common/api/Commands.java
 ##########
 @@ -952,4 +952,8 @@ public static ByteBuf newLookup(String topic, boolean 
authoritative, String orig
         lookupBroker.recycle();
         return res;
     }
+
+    public static boolean peerSupportsGetLastMessageId() {
+        return getCurrentProtocolVersion() >= ProtocolVersion.v12.getNumber();
 
 Review comment:
   This is just checking our own protocol version (which is always the "latest" 
from when we compiled the protobuf), though we need to check the other side 
version in this case the broker. 
   
   this should be like : 
   
   ```java
   public static boolean peerSupportsGetLastMessageId(ClientCnx cnx) {
      return ctx.getRemoteEndpointProtocolVersion() >= 
ProtocolVersion.v12.getNumber();
   }
   ```

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to