Skip to content

kgo: add ProducerBatchMaxBytesFn for per-topic batch size limits#1269

Open
twmb wants to merge 1 commit intomasterfrom
1251
Open

kgo: add ProducerBatchMaxBytesFn for per-topic batch size limits#1269
twmb wants to merge 1 commit intomasterfrom
1251

Conversation

@twmb
Copy link
Owner

@twmb twmb commented Feb 28, 2026

Users producing to multiple topics with different broker-side max.message.bytes need per-topic control over the batch max bytes. ProducerBatchMaxBytesFn(func(string) int32) follows the existing RetryTimeout/RetryTimeoutFn pattern, taking a topic name and returning the max batch size for that topic. ProducerBatchMaxBytes now delegates to ProducerBatchMaxBytesFn.

Closes #1251

Users producing to multiple topics with different broker-side
max.message.bytes need per-topic control over the batch max bytes.
ProducerBatchMaxBytesFn(func(string) int32) follows the existing
RetryTimeout/RetryTimeoutFn pattern, taking a topic name and returning
the max batch size for that topic. ProducerBatchMaxBytes now delegates
to ProducerBatchMaxBytesFn.

Closes #1251
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Per-topic ProducerBatchMaxBytes

1 participant