Hi, I use kafka 0.10.0.0, the entity type enum may be different with yours. However, in the DynamicConfigManager.ConfigChangedNotificationHandler I found that the right format of a config change notification should be as: {"version": 1, "entity_type": "topic/client", "entity_name": "topic_name/client_id"}
What's more, it do match at the entrance like this: case Some(mapAnon: Map[_, _]) => val map = mapAnon collect { case (k: String, v: Any) => k -> v } require(map("version") == 1) >-----Original Message----- >From: SJTU胡昊坤 [mailto:geeku...@gmail.com] >Sent: Thursday, October 11, 2018 11:49 PM >To: users@kafka.apache.org >Subject: How to manage Kafka quota configuration with java code? > >Hi community, >I'm trying to implement quota configuration function in my own kafka portal >program written in Spring Boot. I found out that there is no API for me to do >that. So I read the source code and here is my way: > >write {"version":1,"config":{"producer_byte_rate":"1000"}} with path >"/config/clients/${clientId}" to zookeeper. >and write config change >like {"entity_path":"clients/${clientId}","version":2} with path >"/config/changes/config_change_0000000001" to zookeeper. >But the quota configuration function didn't work. >Then I use kafka-configs.sh to get the same result in zookeeper, but the script >work! >And I'm totally lost... >Is there anyone can help me please? >-- > >Haokun Hu > > > >E-mail: geeku...@gmail.com or 18817874...@163.com