-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(producer): rack-aware partitioner #3198
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -196,6 +196,8 @@ type Config struct { | |
| // (defaults to hashing the message key). Similar to the `partitioner.class` | ||
| // setting for the JVM producer. | ||
| Partitioner PartitionerConstructor | ||
| // Controls whether the partitioner is rack-aware. This also affects custom partitioners. | ||
| PartitionerRackAware bool | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤔 Do we have any Java-side Kafka config value to inform this config name? Does Java’s Kafka even support this?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the Java version is |
||
| // If enabled, the producer will ensure that exactly one copy of each message is | ||
| // written. | ||
| Idempotent bool | ||
|
|
@@ -546,6 +548,8 @@ func NewConfig() *Config { | |
| c.Producer.Return.Errors = true | ||
| c.Producer.CompressionLevel = CompressionLevelDefault | ||
|
|
||
| c.Producer.PartitionerRackAware = false | ||
|
|
||
| c.Producer.Transaction.Timeout = 1 * time.Minute | ||
| c.Producer.Transaction.Retry.Max = 50 | ||
| c.Producer.Transaction.Retry.Backoff = 100 * time.Millisecond | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.