BewareMyPower commented on code in PR #16969:
URL: https://github.com/apache/pulsar/pull/16969#discussion_r954744575


##########
pulsar-client-cpp/lib/MultiTopicsConsumerImpl.h:
##########
@@ -134,11 +142,19 @@ class MultiTopicsConsumerImpl : public ConsumerImplBase,
     void handleOneTopicUnsubscribedAsync(Result result, 
std::shared_ptr<std::atomic<int>> consumerUnsubed,
                                          int numberPartitions, TopicNamePtr 
topicNamePtr,
                                          std::string& topicPartitionName, 
ResultCallback callback);
+    void runPartitionUpdateTask();
+    void topicPartitionUpdate();
+    void handleGetPartitions(const TopicNamePtr topicName, const Result result,

Review Comment:
   ```suggestion
       void handleGetPartitions(TopicNamePtr topicName, Result result,
   ```
   
   Remove `const` for parameter that is neither a pointer (BTW, 
`std::shared_ptr` is a object, not a pointer) or a reference, see 
https://abseil.io/tips/109



##########
pulsar-client-cpp/lib/MultiTopicsConsumerImpl.h:
##########
@@ -134,11 +142,19 @@ class MultiTopicsConsumerImpl : public ConsumerImplBase,
     void handleOneTopicUnsubscribedAsync(Result result, 
std::shared_ptr<std::atomic<int>> consumerUnsubed,
                                          int numberPartitions, TopicNamePtr 
topicNamePtr,
                                          std::string& topicPartitionName, 
ResultCallback callback);
+    void runPartitionUpdateTask();
+    void topicPartitionUpdate();
+    void handleGetPartitions(const TopicNamePtr topicName, const Result result,
+                             const LookupDataResultPtr& lookupDataResult, int 
currentNumPartitions);
+    void subscribeSingleNewConsumer(const int numPartitions, TopicNamePtr 
topicName, int partitionIndex,

Review Comment:
   ```suggestion
       void subscribeSingleNewConsumer(int numPartitions, TopicNamePtr 
topicName, int partitionIndex,
   ```



##########
pulsar-client-cpp/lib/MultiTopicsConsumerImpl.h:
##########
@@ -122,9 +131,8 @@ class MultiTopicsConsumerImpl : public ConsumerImplBase,
 
     void handleOneTopicSubscribed(Result result, Consumer consumer, const 
std::string& topic,
                                   std::shared_ptr<std::atomic<int>> 
topicsNeedCreate);
-    void subscribeTopicPartitions(const Result result, const 
LookupDataResultPtr partitionMetadata,
-                                  TopicNamePtr topicName, const std::string& 
consumerName,
-                                  ConsumerConfiguration conf,
+    void subscribeTopicPartitions(const int numPartitions, TopicNamePtr 
topicName,

Review Comment:
   ```suggestion
       void subscribeTopicPartitions(int numPartitions, TopicNamePtr topicName,
   ```



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