Skip to content

Conversation

paulojmdias
Copy link
Member

@paulojmdias paulojmdias commented Oct 1, 2025

Description

This PR adds support for a new setting named max_partition_fetch_size to be used with kgo.FetchMaxPartitionBytes franz-go option.

Link to tracking issue

Fixes #43097

Testing

Updated tests to ensure the new config is applied and works as expected.

Documentation

Documentation updated with the new setting, and referencing will only work while using franz-go as Sarama doesn't have support for it.

Co-authored-by: Vihas Makwana <[email protected]>
- `default_fetch_size` (default = `1048576`): The default number of message bytes to fetch in a request, defaults to 1MB.
- `max_fetch_size` (default = `0`): The maximum number of message bytes to fetch in a request, defaults to unlimited.
- `max_fetch_wait` (default = `250ms`): The maximum amount of time the broker should wait for `min_fetch_size` bytes to be available before returning anyway.
- `max_partition_fetch_size` (default = `1048576`): The default number of message bytes to fetch in a request per partition, defaults to 1MB. If a single record batch is larger than this value, the broker will still return it to ensure the consumer can make progress. This setting only applies while using [`franz-go`](https://github.com/twmb/franz-go).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A thing we can work as a follow-up is to use human readable formats in documentation.

We can use 1 MiB instead of 1048576

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a necessity for this PR as there few more places in this README.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VihasMakwana I opened a new issue for this and other components.

Copy link
Contributor

@axw axw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@VihasMakwana VihasMakwana added the ready to merge Code review completed; ready to merge by maintainers label Oct 6, 2025
@VihasMakwana
Copy link
Contributor

Good to merge, as it is approved by codeowner!

@songy23 songy23 merged commit 1f3d27b into open-telemetry:main Oct 6, 2025
202 checks passed
@github-actions github-actions bot added this to the next release milestone Oct 6, 2025
@paulojmdias paulojmdias deleted the feat/43097 branch October 6, 2025 13:12
graphaelli pushed a commit to graphaelli/opentelemetry-collector-contrib that referenced this pull request Oct 6, 2025
…en-telemetry#43105)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This PR adds support for a new setting named `max_partition_fetch_size`
to be used with `kgo.FetchMaxPartitionBytes` franz-go option.

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#43097

<!--Describe what testing was performed and which tests were added.-->
#### Testing

Updated tests to ensure the new config is applied and works as expected.

<!--Describe the documentation added.-->
#### Documentation

Documentation updated with the new setting, and referencing will only
work while using `franz-go` as Sarama doesn't have support for it.

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Signed-off-by: Paulo Dias <[email protected]>
Co-authored-by: Vihas Makwana <[email protected]>
mashhurs pushed a commit to mashhurs/opentelemetry-collector-contrib that referenced this pull request Oct 9, 2025
…en-telemetry#43105)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This PR adds support for a new setting named `max_partition_fetch_size`
to be used with `kgo.FetchMaxPartitionBytes` franz-go option.

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#43097

<!--Describe what testing was performed and which tests were added.-->
#### Testing

Updated tests to ensure the new config is applied and works as expected.

<!--Describe the documentation added.-->
#### Documentation

Documentation updated with the new setting, and referencing will only
work while using `franz-go` as Sarama doesn't have support for it.

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Signed-off-by: Paulo Dias <[email protected]>
Co-authored-by: Vihas Makwana <[email protected]>
tommyers-elastic pushed a commit to tommyers-elastic/opentelemetry-collector-contrib that referenced this pull request Oct 10, 2025
…en-telemetry#43105)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This PR adds support for a new setting named `max_partition_fetch_size`
to be used with `kgo.FetchMaxPartitionBytes` franz-go option.

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#43097

<!--Describe what testing was performed and which tests were added.-->
#### Testing

Updated tests to ensure the new config is applied and works as expected.

<!--Describe the documentation added.-->
#### Documentation

Documentation updated with the new setting, and referencing will only
work while using `franz-go` as Sarama doesn't have support for it.

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Signed-off-by: Paulo Dias <[email protected]>
Co-authored-by: Vihas Makwana <[email protected]>
songy23 pushed a commit that referenced this pull request Oct 10, 2025
#### Description

I would like to propose adding @paulojmdias as a code owner of the Kafka
components. He has been doing excellent work across all of those
components (and more besides!).

-
#42507
-
#42796
-
#43105
-
#42181
-
#42327
-
#42507
-
#42796
-
#43019
-
#43083
-
#43105

#### Link to tracking issue

N/A

#### Testing

N/A

#### Documentation

N/A
ChrsMark pushed a commit to ChrsMark/opentelemetry-collector-contrib that referenced this pull request Oct 20, 2025
#### Description

I would like to propose adding @paulojmdias as a code owner of the Kafka
components. He has been doing excellent work across all of those
components (and more besides!).

-
open-telemetry#42507
-
open-telemetry#42796
-
open-telemetry#43105
-
open-telemetry#42181
-
open-telemetry#42327
-
open-telemetry#42507
-
open-telemetry#42796
-
open-telemetry#43019
-
open-telemetry#43083
-
open-telemetry#43105

#### Link to tracking issue

N/A

#### Testing

N/A

#### Documentation

N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal/kafka pkg/kafka/configkafka ready to merge Code review completed; ready to merge by maintainers receiver/kafka

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[receiver/kafka] franz-go: missing max partition fetch bytes config support

6 participants