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

jamie/kafkaadmin #392

Merged
merged 25 commits into from
Mar 3, 2022
Merged

jamie/kafkaadmin #392

merged 25 commits into from
Mar 3, 2022

Conversation

jamiealquiza
Copy link
Collaborator

@jamiealquiza jamiealquiza commented Feb 11, 2022

kafkaadmin

Adds and implements the following kafkaadmin interface methods:

SetThrottle(context.Context, ThrottleConfig) error
RemoveThrottle(context.Context, RemoveThrottleConfig) error
GetDynamicConfigs(context.Context, string, []string) (ResourceConfigs, error)

SetThrottle allows per-broker inbound and outbound throttle rates. Example request:

config := kafkaadmin.SetThrottleConfig{
  // Specify what topics will have throttled brokers.
  Topics: []string{
    "test1",
    "test2",
  },
  // Specify broker throttles.
  Brokers: map[int]kafkaadmin.BrokerThrottleConfig{
    1003: {
      InboundLimitBytes:  2000,
      OutboundLimitBytes: 4000,
    },
    1004: {
      InboundLimitBytes:  2000,
      OutboundLimitBytes: 4000,
    },
  },
}

// Apply.
err := k.SetThrottle(ctx, config)

Tested working.

@jamiealquiza jamiealquiza changed the title [wip] jamie/kafkaadmin jamie/kafkaadmin Feb 22, 2022
@jamiealquiza jamiealquiza marked this pull request as ready for review February 22, 2022 22:12
@jamiealquiza jamiealquiza merged commit c50d6f7 into master Mar 3, 2022
@jamiealquiza jamiealquiza deleted the jamie/kafkaadmin branch March 3, 2022 14:31
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.

1 participant