dferstay commented on a change in pull request #535:
URL: https://github.com/apache/pulsar-client-go/pull/535#discussion_r655572053



##########
File path: pulsar/consumer_partition.go
##########
@@ -1113,6 +1114,17 @@ func (pc *partitionConsumer) 
discardCorruptedMessage(msgID *pb.MessageIdData,
                })
 }
 
+func (pc *partitionConsumer) _setConn(conn internal.Connection) {
+       pc.conn.Store(conn)
+}
+
+func (pc *partitionConsumer) _getConn() internal.Connection {

Review comment:
       @jonyhy96 ,
   
   I wanted to make it clear that these methods should not be used by other 
components in the `pulsar` package, but I could remove this if you don't like 
it.  Admittedly this style of naming is not used anywhere else in the codebase. 

##########
File path: pulsar/consumer_partition.go
##########
@@ -21,6 +21,7 @@ import (
        "fmt"
        "math"
        "sync"
+       syncAtomic "sync/atomic"

Review comment:
       @jonyhy96 ,
   
   Good suggestion; I've cut over to using 
[uber-go.atomic.Value](https://github.com/uber-go/atomic/blob/master/value.go)




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


Reply via email to