Skip to content

Commit

Permalink
kgo: add ConcurrentTransactionsBackoff, MaxProduceRequestsInflightPer…
Browse files Browse the repository at this point in the history
…Broker

See docs on the options -- these were commented out for the v1.3.3
release. This also pluralizes ConcurrentTransactionBackoff to be in line
with the error itself.
  • Loading branch information
twmb committed Mar 1, 2022
1 parent 0d5fbb5 commit 336d2c9
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions pkg/kgo/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -791,9 +791,7 @@ func WithHooks(hooks ...Hook) Opt {
return clientOpt{func(cfg *cfg) { cfg.hooks = append(cfg.hooks, hooks...) }}
}

/* TODO: commenting out for a v1.3.3 release
// ConcurrentTransactionBackoff sets the backoff interval to use during
// ConcurrentTransactionsBackoff sets the backoff interval to use during
// transactional requests in case we encounter CONCURRENT_TRANSACTIONS error,
// overriding the default 20ms.
//
Expand All @@ -802,12 +800,10 @@ func WithHooks(hooks ...Hook) Opt {
// are expected to backoff slightly and retry the operation. Lower backoffs may
// increase load on the brokers, while higher backoffs may increase transaction
// latency in clients.
func ConcurrentTransactionBackoff(backoff time.Duration) Opt {
func ConcurrentTransactionsBackoff(backoff time.Duration) Opt {
return clientOpt{func(cfg *cfg) { cfg.txnBackoff = backoff }}
}

*/

////////////////////////////
// PRODUCER CONFIGURATION //
////////////////////////////
Expand Down Expand Up @@ -864,8 +860,6 @@ func DisableIdempotentWrite() ProducerOpt {
return producerOpt{func(cfg *cfg) { cfg.disableIdempotency = true }}
}

/* TODO: commenting out for a v1.3.3 release
// MaxProduceRequestsInflightPerBroker changes the number of allowed produce
// requests in flight per broker if you disable idempotency, overriding the
// default of 1. If using idempotency, this option has no effect: the maximum
Expand All @@ -877,8 +871,6 @@ func MaxProduceRequestsInflightPerBroker(n int) ProducerOpt {
return producerOpt{func(cfg *cfg) { cfg.maxProduceInflight = n }}
}

*/

// ProducerBatchCompression sets the compression codec to use for producing
// records.
//
Expand Down

0 comments on commit 336d2c9

Please sign in to comment.