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 2020/06/01 09:45:21 UTC

[GitHub] [pulsar] 315157973 commented on a change in pull request #7118: fix NullPointerException with SubscriptionMode.NonDurable

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



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
##########
@@ -715,11 +715,11 @@ public void connectionOpened(final ClientCnx cnx) {
         }
 
         boolean isDurable = subscriptionMode == SubscriptionMode.Durable;
-        MessageIdData startMessageIdData;
+        MessageIdData startMessageIdData = null;
         if (isDurable) {
             // For regular durable subscriptions, the message id from where to restart will be determined by the broker.
             startMessageIdData = null;
-        } else {
+        } else if (startMessageId != null) {

Review comment:
       Reader will use the code here, startMessageId can be obtained from Broker. 
   However, a judgment was added to prevent scene triggers in the future.




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

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