Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support nack backoff policy for SDK #660

Merged
merged 12 commits into from
Nov 8, 2021
Merged
Prev Previous commit
Next Next commit
fix action ciu
Signed-off-by: xiaolongran <xiaolongran@tencent.com>
  • Loading branch information
wolfstudy committed Nov 4, 2021
commit 16c0912149feb356df4a4b96e9f5d2c4e18e3ad0
2 changes: 1 addition & 1 deletion pulsar/consumer_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func newConsumer(client *client, options ConsumerOptions) (Consumer, error) {
}
}

if options.NackBackoffPolicy == nil && options.EnableDefaultNackBackoffPolicy == true {
if options.NackBackoffPolicy == nil && options.EnableDefaultNackBackoffPolicy {
options.NackBackoffPolicy = new(defaultNackBackoffPolicy)
}

Expand Down
1 change: 1 addition & 0 deletions pulsar/negative_backoff_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type NackBackoffPolicy interface {
Next(redeliveryCount uint32) int64
}

// defaultNackBackoffPolicy is default impl for NackBackoffPolicy.
type defaultNackBackoffPolicy struct {}

func (nbp *defaultNackBackoffPolicy) Next(redeliveryCount uint32) int64 {
Expand Down