From 577c73a3bd96122cebbfa7b1c6b70b393743e59a Mon Sep 17 00:00:00 2001 From: Travis Bischel Date: Tue, 31 Aug 2021 22:50:44 -0600 Subject: [PATCH] breaking: rename RecordTimeout to RecordDeliveryTimeout 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. --- pkg/kgo/config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/kgo/config.go b/pkg/kgo/config.go index 7b33dce6..a2133893 100644 --- a/pkg/kgo/config.go +++ b/pkg/kgo/config.go @@ -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. @@ -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 }} }