Skip to content

Commit

Permalink
breaking: rename RecordTimeout to RecordDeliveryTimeout
Browse files Browse the repository at this point in the history
This is closer to Kafka's naming of delivery.timeout.ms, but we keep the
Record prefix for two reasons:
1) delivery timeout is a bit ambiguous as to _what_ is being delivered,
2) godoc will alphabetically organize this option close to the other
record options.

The new name better implies the purpose of this option / what it is
doing.
  • Loading branch information
twmb committed Sep 1, 2021
1 parent 76ae8f5 commit 577c73a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/kgo/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -930,8 +930,8 @@ func ManualFlushing() ProducerOpt {
return producerOpt{func(cfg *cfg) { cfg.manualFlushing = true }}
}

// RecordTimeout sets a rough time of how long a record can sit around in a
// batch before timing out, overriding the unlimited default.
// RecordDeliveryTimeout sets a rough time of how long a record can sit around
// in a batch before timing out, overriding the unlimited default.
//
// If idempotency is enabled (as it is by default), this option is only
// enforced if it is safe to do so without creating invalid sequence numbers.
Expand All @@ -953,7 +953,7 @@ func ManualFlushing() ProducerOpt {
// produce response. Thus, a sink backoff may delay record timeout slightly.
//
// This option is roughly equivalent to delivery.timeout.ms.
func RecordTimeout(timeout time.Duration) ProducerOpt {
func RecordDeliveryTimeout(timeout time.Duration) ProducerOpt {
return producerOpt{func(cfg *cfg) { cfg.recordTimeout = timeout }}
}

Expand Down

0 comments on commit 577c73a

Please sign in to comment.