-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
Description
Component(s)
receiver/kafka
Is your feature request related to a problem? Please describe.
Hello everyone 👋
This is my first feature request proposal. I want to add rack-aware consuming to reduce cross-AZ traffic cost. I found article https://aws.amazon.com/blogs/big-data/reduce-network-traffic-costs-of-your-amazon-msk-consumers-with-rack-awareness/ and I found out that kafkareceiver is missing config option for rack. If following solution is accepted I can implement it.
Describe the solution you'd like
Add to README.md
- `client_rack` (default = ""): The rack identifier for this client. When set and brokers are configured with a rack-aware replica selector, the client will prefer fetching from the closest replica.
// config.go
// Rack provides the rack identifier for this client to enable rack-aware
// replica selection when supported by the brokers. This maps to Kafka's
// standard "client.rack" setting. By default, this is empty.
Rack string `mapstructure:"client_rack"`// client.go
if config.Rack != "" {
saramaConfig.RackID = config.Rack
}// franz_client.go
if clientCfg.Rack != "" {
opts = append(opts, kgo.Rack(clientCfg.Rack))
}Describe alternatives you've considered
No response
Additional context
No response
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.