BewareMyPower commented on code in PR #402:
URL: https://github.com/apache/pulsar-client-cpp/pull/402#discussion_r1495363450


##########
lib/HandlerBase.h:
##########
@@ -52,6 +52,7 @@ class HandlerBase : public 
std::enable_shared_from_this<HandlerBase> {
     ClientConnectionWeakPtr getCnx() const;
     void setCnx(const ClientConnectionPtr& cnx);
     void resetCnx() { setCnx(nullptr); }
+    void setRedirectedClusterURI(const std::string serviceUrl) { 
redirectedClusterURI_ = serviceUrl; }

Review Comment:
   Use `const std::string&` as the parameter type.



##########
lib/HandlerBase.h:
##########
@@ -145,6 +146,8 @@ class HandlerBase : public 
std::enable_shared_from_this<HandlerBase> {
     mutable std::mutex connectionMutex_;
     std::atomic<bool> reconnectionPending_;
     ClientConnectionWeakPtr connection_;
+    std::string redirectedClusterURI_;

Review Comment:
   This field could be accessed in different threads. You should use a mutex to 
protect it.



##########
lib/ProducerImpl.cc:
##########
@@ -144,7 +144,11 @@ Future<Result, bool> ProducerImpl::connectionOpened(const 
ClientConnectionPtr& c
         return promise.getFuture();
     }
 
+    LOG_DEBUG("Creating producer for topic:" << topic() << ", producerName:" 
<< producerName_ << " on "

Review Comment:
   Maybe we can use `LOG_INFO` like Java client?



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