Closed jamiealquiza closed 2 years ago
Adds and implements the following kafkaadmin interface methods:
kafkaadmin
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:
SetThrottle
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.
kafkaadmin
Adds and implements the following
kafkaadmin
interface methods:SetThrottle
allows per-broker inbound and outbound throttle rates. Example request:Tested working.