Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional kafka_franz input kafka consumer configuration #2573

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

hendoxc
Copy link

@hendoxc hendoxc commented May 9, 2024

What

Adding addition kafka configuration parameters that can be passed from kafka_franz input to the underlying franz client opts.

the configurations added are:

		kgo.FetchMinBytes(int32(f.fetchMinBytes)),
		kgo.FetchMaxWait(f.fetchMaxWaitDuration),
		kgo.FetchMaxPartitionBytes(int32(f.maxPartitionFetchBytes)),

Why

  • This allows greater flexibility for configuring consumerthroughput of benthos apps using kafka_franz
  • The configs I've added are commonly tuned parameters (across all kafka client implementations) for improving consumer throughput (at the cost of latency)

Notes

for Default() I've used the defaults from franz-go client opts as to not introduce new behaviour

@hendoxc hendoxc requested a review from Jeffail as a code owner May 9, 2024 19:56
@hendoxc hendoxc changed the title Additional kafka franz consumer configuration Additional kafka_franz input kafka consumer configuration May 9, 2024
- `fetch_min_bytes`
- `fetch_max_wait_ms`
- `max_partition_fetch_bytes`
- `max_poll_records`

I've used the defaults, as what kafka defaults are

Signed-off-by: hendoxc <hagen.henderson@smartcontract.com>
matches what franz go library expects when configuring a client

Signed-off-by: hendoxc <hagen.henderson@smartcontract.com>
Signed-off-by: hendoxc <hagen.henderson@smartcontract.com>
additionally removes `max_poll_records` as its not an available client option

Signed-off-by: hendoxc <hagen.henderson@smartcontract.com>
Signed-off-by: hendoxc <hagen.henderson@smartcontract.com>
this is the franz client's default

Signed-off-by: hendoxc <hagen.henderson@smartcontract.com>
@hendoxc hendoxc force-pushed the addititional-kafka-franz-consumer-configuration branch from f5c819d to 0a86319 Compare May 10, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant