[ https://issues.apache.org/jira/browse/KAFKA-14210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
dengziming resolved KAFKA-14210. -------------------------------- Resolution: Not A Problem > <default> client quota config key is sanitized in Kraft broker > -------------------------------------------------------------- > > Key: KAFKA-14210 > URL: https://issues.apache.org/jira/browse/KAFKA-14210 > Project: Kafka > Issue Type: Improvement > Reporter: dengziming > Assignee: dengziming > Priority: Major > > we sanitized the key in zk mode but don't sanitized in Kraft mode. > {code:java} > public class AdminClientExample { > public static void main(String[] args) throws ExecutionException, > InterruptedException { > Properties properties = new Properties(); > properties.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, > "localhost:9092"); > Admin admin = Admin.create(properties); > // Alter config > admin.alterClientQuotas(Collections.singleton( > new ClientQuotaAlteration( > new > ClientQuotaEntity(Collections.singletonMap(ClientQuotaEntity.CLIENT_ID, > "default")), > Collections.singletonList(new > ClientQuotaAlteration.Op("request_percentage", 0.02))) > )).all().get(); > Map<ClientQuotaEntity, Map<String, Double>> clientQuotaEntityMapMap = > admin.describeClientQuotas( > > ClientQuotaFilter.contains(Collections.singletonList(ClientQuotaFilterComponent.ofDefaultEntity(ClientQuotaEntity.CLIENT_ID))) > ).entities().get(); > System.out.println(clientQuotaEntityMapMap); > } > } {code} > The code should have return request_percentage=0.02, but it returned > Map.empty. -- This message was sent by Atlassian Jira (v8.20.10#820010)