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!

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
5 participants