jonyhy96 commented on a change in pull request #360:
URL: https://github.com/apache/pulsar-client-go/pull/360#discussion_r503058339
##########
File path: pulsar/producer.go
##########
@@ -138,6 +138,9 @@ type ProducerOptions struct {
// A chain of interceptors, These interceptors will be called at some
points defined in ProducerInterceptor interface
Interceptors ProducerInterceptors
+
+ // MaxReconnectToBroker set the maximum retry number of
reconnectToBroker. (default: no retry)
+ MaxReconnectToBroker int
Review comment:
> We can consider setting -1 as the default value, and then check
whether MaxReconnectToBroker is set, and if so, use the user-defined value.
I understand,but how can we determine whether MaxReconnectToBroker is set or
not when it's default value is meaningful. e.g. user set this option to 0.
> At present, I see that you have added the option of MaxReconnectToBroker
to the relevant test cases. This may not be very user-friendly. We need to
ensure that the interface is as simple as possible.
I totally agree, how about we use the origin commit of this pr to implement
this feature?
----------------------------------------------------------------
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]