jonyhy96 commented on a change in pull request #360:
URL: https://github.com/apache/pulsar-client-go/pull/360#discussion_r476259932



##########
File path: pulsar/consumer.go
##########
@@ -140,6 +140,9 @@ type ConsumerOptions struct {
 
        // A chain of interceptors, These interceptors will be called at some 
points defined in ConsumerInterceptor interface.
        Interceptors ConsumerInterceptors
+
+       // MaxReconnectToBroker set the maximum retry number of 
reconnectToBroker. (default: ultimate)
+       MaxReconnectToBroker *uint

Review comment:
       > I see your point, but it's common to use int for this kind of 
configuration, such as 
[go-redis](https://github.com/go-redis/redis/blob/master/options.go#L59) / 
[nats.go](https://github.com/nats-io/nats.go/blob/master/nats.go#L266), we can 
make the following convention for the config to cope with different scenarios,
   > 
   > * 0 for no retry
   > * negative number for retry forever
   > * positive number to set retry attempts
   > 
   > As the current library is still in pre-1.0, i think it's ok to make a 
break change.
   
   Totally agree, Do we need to ask for other maintainer's opinions?




----------------------------------------------------------------
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:
[email protected]


Reply via email to