cckellogg commented on a change in pull request #660:
URL: https://github.com/apache/pulsar-client-go/pull/660#discussion_r744035482



##########
File path: pulsar/consumer.go
##########
@@ -158,6 +158,17 @@ type ConsumerOptions struct {
 
        // Decryption decryption related fields to decrypt the encrypted message
        Decryption *MessageDecryptionInfo
+
+       // If enabled, the default implementation of NackBackoffPolicy will be 
used to calculate the delay time of
+       // nack backoff, Default: false.
+       EnableDefaultNackBackoffPolicy bool

Review comment:
       To me a cleaner API is to just have `NackBackoffPolicy` and expose the 
basic/default policy. If the policy is not set than it uses the current 
behavior. This way there is only 1 configuration knob to worry about.
   
   ```
   // current behavior
   ConsumerOpts{}
   
   // custom behavior
   ConsumerOpts{
     NackBackoffPolicy: pulsar.NewExpNackBackoffPolicy(),
   }
   ```
   
   
   




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