Skip to content

Commit 6a784dc

Browse files
authored
DOC-1220 Add Franz-Go timeout fields (#221)
1 parent c2f8b70 commit 6a784dc

File tree

10 files changed

+252
-32
lines changed

10 files changed

+252
-32
lines changed

modules/components/pages/inputs/kafka_franz.adoc

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,16 @@ input:
5656
client_certs: [] # No default (optional)
5757
sasl: [] # No default (optional)
5858
metadata_max_age: 5m
59+
request_timeout_overhead: 10s
60+
conn_idle_timeout: 20s
5961
topics: [] # No default (required)
6062
regexp_topics: false
6163
rack_id: "" # No default (optional)
6264
instance_id: "" No default (optional)
6365
rebalance_timeout: 45s
6466
session_timeout: 1m
6567
heartbeat_interval: 3s
66-
start_from_oldest: true
68+
start_offset: earliest
6769
fetch_max_bytes: 50MiB
6870
fetch_max_wait: 5s
6971
fetch_min_bytes: 1B
@@ -477,6 +479,22 @@ The maximum period of time after which metadata is refreshed.
477479

478480
*Default*: `5m`
479481

482+
=== `request_timeout_overhead`
483+
484+
Grants an additional buffer or overhead to requests that have timeout fields defined. This field is based on the behavior of Apache Kafka's `request.timeout.ms` parameter.
485+
486+
*Type*: `string`
487+
488+
*Default*: `10s`
489+
490+
=== `conn_idle_timeout`
491+
492+
Define how long connections can remain idle before they are closed.
493+
494+
*Type*: `string`
495+
496+
*Default*: `20s`
497+
480498
=== `topics`
481499

482500
A list of topics to consume from. Use commas to separate multiple topics in a single element.
@@ -485,7 +503,7 @@ When a `consumer_group` is specified, partitions are automatically distributed a
485503

486504
Alternatively, you can specify explicit partitions to consume by using a colon after the topic name. For example, `foo:0` would consume the partition `0` of the topic foo. This syntax supports ranges. For example, `foo:0-10` would consume partitions `0` through to `10` inclusive.
487505

488-
It is also possible to specify an explicit offset to consume from by adding another colon after the partition. For example, `foo:0:10` would consume the partition `0` of the topic `foo` starting from the offset `10`. If the offset is not present (or remains unspecified) then the field `start_from_oldest` determines which offset to start from.
506+
It is also possible to specify an explicit offset to consume from by adding another colon after the partition. For example, `foo:0:10` would consume the partition `0` of the topic `foo` starting from the offset `10`. If the offset is not present (or remains unspecified) then the field `start_offset` determines which offset to start from.
489507

490508
*Type*: `array`
491509

@@ -581,13 +599,29 @@ client
581599

582600
*Default*: `3s`
583601

584-
=== `start_from_oldest`
602+
=== `start_offset`
585603

586-
Whether to consume from the oldest available offset. Otherwise, messages are consumed from the latest offset. This setting is applied when creating a new consumer group or the saved offset no longer exists.
604+
Specify the offset from which this input starts or restarts consuming messages. Restarts occur when the `OffsetOutOfRange` error is seen during a fetch.
587605

588-
*Type*: `bool`
606+
*Type*: `string`
607+
608+
*Default*: `earliest`
609+
610+
Options:
611+
612+
|===
613+
| Option | Description
614+
615+
| `earliest` (default)
616+
| Start from the earliest offset. This option is equivalent to Kafka's `auto.offset.reset=earliest`.
617+
618+
| `committed`
619+
| Start from the earliest committed offset, which prevents message consumption from a partition in a consumer group that has no prior commits. This option is equivalent to Kafka's `auto.offset.reset=none`.
620+
621+
| `latest`
622+
| Start from the latest offset. This option is equivalent to Kafka's `auto.offset.reset=latest`.
623+
|===
589624

590-
*Default*: `true`
591625

592626
=== `fetch_max_bytes`
593627

modules/components/pages/inputs/ockam_kafka.adoc

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ input:
6767
rebalance_timeout: 45s
6868
session_timeout: 1m
6969
heartbeat_interval: 3s
70-
start_from_oldest: true
70+
start_offset: earliest
7171
fetch_max_bytes: 50MiB
7272
fetch_max_wait: 5s
7373
fetch_min_bytes: 1B
@@ -261,7 +261,7 @@ If you specify a `consumer_group`, partitions are automatically distributed acro
261261

262262
Alternatively, add a colon after the topic name to set the explicit partitions to consume. For example, `foo:0` consumes the partition `0` of the topic `foo`. This syntax also supports ranges. For example, `foo:0-10` consumes all partitions from `0` through to `10` inclusively.
263263

264-
Finally, add another colon after the partition to set an explicit offset to consume from. For example, `foo:0:10` consumes the partition `0` of the topic `foo` starting from the offset `10`. If the offset is not present (or remains unspecified) then the field `start_from_oldest` determines which offset to start from.
264+
Finally, add another colon after the partition to set an explicit offset to consume from. For example, `foo:0:10` consumes the partition `0` of the topic `foo` starting from the offset `10`. If the offset is not present (or remains unspecified) then the field `start_offset` determines which offset to start from.
265265

266266
*Type*: `array`
267267

@@ -356,13 +356,28 @@ client
356356

357357
*Default*: `3s`
358358

359-
=== `kafka.start_from_oldest`
359+
=== `kafka.start_offset`
360360

361-
Whether to consume from the oldest available offset. Otherwise, messages are consumed from the latest offset. This setting is applied when creating a new consumer group or the saved offset no longer exists.
361+
Specify the offset from which this input starts or restarts consuming messages. Restarts occur when the `OffsetOutOfRange` error is seen during a fetch.
362362

363-
*Type*: `bool`
363+
*Type*: `string`
364+
365+
*Default*: `earliest`
366+
367+
Options:
368+
369+
|===
370+
| Option | Description
371+
372+
| `earliest` (default)
373+
| Start from the earliest offset. This option is equivalent to Kafka's `auto.offset.reset=earliest`.
364374

365-
*Default*: `true`
375+
| `committed`
376+
| Start from the earliest committed offset, which prevents message consumption from a partition in a consumer group that has no prior commits. This option is equivalent to Kafka's `auto.offset.reset=none`.
377+
378+
| `latest`
379+
| Start from the latest offset. This option is equivalent to Kafka's `auto.offset.reset=latest`.
380+
|===
366381

367382
=== `kafka.fetch_max_bytes`
368383

modules/components/pages/inputs/redpanda.adoc

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Advanced::
3939
--
4040
4141
```yml
42-
# All config fields, showing default values
42+
# All configuration fields, showing default values
4343
input:
4444
label: "" # No default (optional)
4545
redpanda:
@@ -54,14 +54,16 @@ input:
5454
client_certs: [] # No default (optional)
5555
sasl: [] # No default (optional)
5656
metadata_max_age: 5m
57+
request_timeout_overhead: 10s
58+
conn_idle_timeout: 20s
5759
topics: [] # No default (required)
5860
regexp_topics: false
5961
rack_id: "" # No default (optional)
6062
instance_id: "" # No default (optional)
6163
rebalance_timeout: 45s
6264
session_timeout: 1m
6365
heartbeat_interval: 3s
64-
start_from_oldest: true
66+
start_offset: earliest
6567
fetch_max_bytes: 50MiB
6668
fetch_max_wait: 5s
6769
fetch_min_bytes: 1B
@@ -495,6 +497,22 @@ The maximum period of time after which metadata is refreshed.
495497

496498
*Default*: `5m`
497499

500+
=== `request_timeout_overhead`
501+
502+
Grants an additional buffer or overhead to requests that have timeout fields defined. This field is based on the behavior of Apache Kafka's `request.timeout.ms` parameter.
503+
504+
*Type*: `string`
505+
506+
*Default*: `10s`
507+
508+
=== `conn_idle_timeout`
509+
510+
Define how long connections can remain idle before they are closed.
511+
512+
*Type*: `string`
513+
514+
*Default*: `20s`
515+
498516
=== `topics`
499517

500518
A list of topics to consume from. Use commas to separate multiple topics in a single element.
@@ -503,7 +521,7 @@ When a `consumer_group` is specified, partitions are automatically distributed a
503521

504522
Alternatively, you can specify explicit partitions to consume by using a colon after the topic name. For example, `foo:0` would consume the partition `0` of the topic foo. This syntax supports ranges. For example, `foo:0-10` would consume partitions `0` through to `10` inclusive.
505523

506-
It is also possible to specify an explicit offset to consume from by adding another colon after the partition. For example, `foo:0:10` would consume the partition `0` of the topic `foo` starting from the offset `10`. If the offset is not present (or remains unspecified) then the field `start_from_oldest` determines which offset to start from.
524+
It is also possible to specify an explicit offset to consume from by adding another colon after the partition. For example, `foo:0:10` would consume the partition `0` of the topic `foo` starting from the offset `10`. If the offset is not present (or remains unspecified) then the field `start_offset` determines which offset to start from.
507525

508526

509527
*Type*: `array`
@@ -599,13 +617,28 @@ client
599617

600618
*Default*: `3s`
601619

602-
=== `start_from_oldest`
620+
=== `start_offset`
603621

604-
Determines whether to consume from the oldest available offset. Otherwise, messages are consumed from the latest offset. This setting is applied when creating a new consumer group or the saved offset no longer exists.
622+
Specify the offset from which this input starts or restarts consuming messages. Restarts occur when the `OffsetOutOfRange` error is seen during a fetch.
605623

606-
*Type*: `bool`
624+
*Type*: `string`
607625

608-
*Default*: `true`
626+
*Default*: `earliest`
627+
628+
Options:
629+
630+
|===
631+
| Option | Description
632+
633+
| `earliest` (default)
634+
| Start from the earliest offset. This option is equivalent to Kafka's `auto.offset.reset=earliest`.
635+
636+
| `committed`
637+
| Start from the earliest committed offset, which prevents message consumption from a partition in a consumer group that has no prior commits. This option is equivalent to Kafka's `auto.offset.reset=none`.
638+
639+
| `latest`
640+
| Start from the latest offset. This option is equivalent to Kafka's `auto.offset.reset=latest`.
641+
|===
609642

610643
=== `fetch_max_bytes`
611644

modules/components/pages/inputs/redpanda_common.adoc

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ input:
5151
rebalance_timeout: 45s
5252
session_timeout: 1m
5353
heartbeat_interval: 3s
54-
start_from_oldest: true
54+
start_offset: earliest
5555
fetch_max_bytes: 50MiB
5656
fetch_max_wait: 5s
5757
fetch_min_bytes: 1B
@@ -171,7 +171,7 @@ When a `consumer_group` is specified, partitions are automatically distributed a
171171

172172
Alternatively, you can specify explicit partitions to consume by using a colon after the topic name. For example, `foo:0` would consume the partition `0` of the topic foo. This syntax supports ranges. For example, `foo:0-10` would consume partitions `0` through to `10` inclusive.
173173

174-
It is also possible to specify an explicit offset to consume from by adding another colon after the partition. For example, `foo:0:10` would consume the partition `0` of the topic `foo` starting from the offset `10`. If the offset is not present (or remains unspecified) then the field `start_from_oldest` determines which offset to start from.
174+
It is also possible to specify an explicit offset to consume from by adding another colon after the partition. For example, `foo:0:10` would consume the partition `0` of the topic `foo` starting from the offset `10`. If the offset is not present (or remains unspecified) then the field `start_offset` determines which offset to start from.
175175

176176
*Type*: `array`
177177

@@ -266,13 +266,28 @@ client
266266

267267
*Default*: `3s`
268268

269-
=== `start_from_oldest`
269+
=== `start_offset`
270270

271-
Whether to consume from the oldest available offset. Otherwise, messages are consumed from the latest offset. This setting is applied when creating a new consumer group or the saved offset no longer exists.
271+
Specify the offset from which this input starts or restarts consuming messages. Restarts occur when the `OffsetOutOfRange` error is seen during a fetch.
272272

273-
*Type*: `bool`
273+
*Type*: `string`
274274

275-
*Default*: `true`
275+
*Default*: `earliest`
276+
277+
Options:
278+
279+
|===
280+
| Option | Description
281+
282+
| `earliest` (default)
283+
| Start from the earliest offset. This option is equivalent to Kafka's `auto.offset.reset=earliest`.
284+
285+
| `committed`
286+
| Start from the earliest committed offset, which prevents message consumption from a partition in a consumer group that has no prior commits. This option is equivalent to Kafka's `auto.offset.reset=none`.
287+
288+
| `latest`
289+
| Start from the latest offset. This option is equivalent to Kafka's `auto.offset.reset=latest`.
290+
|===
276291

277292
=== `fetch_max_bytes`
278293

modules/components/pages/inputs/redpanda_migrator.adoc

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ input:
6363
rebalance_timeout: 45s
6464
session_timeout: 1m
6565
heartbeat_interval: 3s
66-
start_from_oldest: true
66+
start_offset: earliest
6767
fetch_max_bytes: 50MiB
6868
fetch_max_wait: 5s
6969
fetch_min_bytes: 1B
@@ -72,6 +72,8 @@ input:
7272
consumer_group: "" # No default (optional)
7373
commit_period: 5s
7474
metadata_max_age: 5m
75+
request_timeout_overhead: 10s
76+
conn_idle_timeout: 20s
7577
partition_buffer_bytes: 1MB
7678
auto_replay_nacks: true
7779
topic_lag_refresh_period: 5s
@@ -478,7 +480,7 @@ When a `consumer_group` is specified, partitions are automatically distributed a
478480

479481
Alternatively, you can specify explicit partitions to consume by using a colon after the topic name. For example, `foo:0` would consume the partition `0` of the topic foo. This syntax supports ranges. For example, `foo:0-10` would consume partitions `0` through to `10` inclusive.
480482

481-
It is also possible to specify an explicit offset to consume from by adding another colon after the partition. For example, `foo:0:10` would consume the partition `0` of the topic `foo` starting from the offset `10`. If the offset is not present (or remains unspecified) then the field `start_from_oldest` determines which offset to start from.
483+
It is also possible to specify an explicit offset to consume from by adding another colon after the partition. For example, `foo:0:10` would consume the partition `0` of the topic `foo` starting from the offset `10`. If the offset is not present (or remains unspecified) then the field `start_offset` determines which offset to start from.
482484

483485

484486
*Type*: `array`
@@ -576,14 +578,28 @@ client
576578

577579
*Default*: `3s`
578580

579-
=== `start_from_oldest`
581+
=== `start_offset`
580582

581-
Determines whether to consume from the oldest available offset, otherwise messages are consumed from the latest offset. This setting is applied when creating a new consumer group or the saved offset no longer exists.
583+
Specify the offset from which this input starts or restarts consuming messages. Restarts occur when the `OffsetOutOfRange` error is seen during a fetch.
582584

585+
*Type*: `string`
583586

584-
*Type*: `bool`
587+
*Default*: `earliest`
585588

586-
*Default*: `true`
589+
Options:
590+
591+
|===
592+
| Option | Description
593+
594+
| `earliest` (default)
595+
| Start from the earliest offset. This option is equivalent to Kafka's `auto.offset.reset=earliest`.
596+
597+
| `committed`
598+
| Start from the earliest committed offset, which prevents message consumption from a partition in a consumer group that has no prior commits. This option is equivalent to Kafka's `auto.offset.reset=none`.
599+
600+
| `latest`
601+
| Start from the latest offset. This option is equivalent to Kafka's `auto.offset.reset=latest`.
602+
|===
587603

588604
=== `fetch_max_bytes`
589605

@@ -666,6 +682,22 @@ The maximum period of time after which metadata is refreshed. Reducing this valu
666682

667683
*Default*: `5m`
668684

685+
=== `request_timeout_overhead`
686+
687+
Grants an additional buffer or overhead to requests that have timeout fields defined. This field is based on the behavior of Apache Kafka's `request.timeout.ms` parameter.
688+
689+
*Type*: `string`
690+
691+
*Default*: `10s`
692+
693+
=== `conn_idle_timeout`
694+
695+
Define how long connections can remain idle before they are closed.
696+
697+
*Type*: `string`
698+
699+
*Default*: `20s`
700+
669701
=== `partition_buffer_bytes`
670702

671703
A buffer size (in bytes) for each consumed partition, which allows the internal queuing of records before they are flushed. Increasing this value may improve throughput but results in higher memory utilization.

modules/components/pages/outputs/kafka_franz.adoc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ output:
8484
client_certs: []
8585
sasl: [] # No default (optional)
8686
metadata_max_age: 5m
87+
request_timeout_overhead: 10s
88+
conn_idle_timeout: 20s
8789
timestamp_ms: ${! timestamp_unix_milli() } # No default (optional)
8890
```
8991
@@ -718,6 +720,22 @@ The maximum period of time after which metadata is refreshed.
718720

719721
*Default*: `5m`
720722

723+
=== `request_timeout_overhead`
724+
725+
Grants an additional buffer or overhead to requests that have timeout fields defined. This field is based on the behavior of Apache Kafka's `request.timeout.ms` parameter, but with the option to extend the timeout deadline.
726+
727+
*Type*: `string`
728+
729+
*Default*: `10s`
730+
731+
=== `conn_idle_timeout`
732+
733+
Define how long connections can remain idle before they are closed.
734+
735+
*Type*: `string`
736+
737+
*Default*: `20s`
738+
721739

722740
=== `timestamp_ms`
723741

0 commit comments

Comments
 (0)