jmeter发送数据到sasl加密的kafka
-
在选项-plugins Manager中搜索kafka,然后将对应的kafka插件安装

-
添加kafka的配置元件

3. 主要需要注意的参数如下
kafka brokers中填写自己的kafka地址
Type选择SASL_PLAINTEXT
在下方添加三个参数
security.protocol 为SASL_PLAINTEXT
sasl.mechanism 为PLAIN或者SCRAM-SHA-256,根据自己kafka的加密方式选择
sasl.jaas.config 为以下两种,根据自己kafka的加密方式选择,注意最后的分号不要漏掉了。
org.apache.kafka.common.security.plain.PlainLoginModule required username="账号" password="密码";
或者
org.apache.kafka.common.security.scram.ScramLoginModule required username="账号" password="密码";

4. 添加kafka取样器

5. 填写对应的topic名称和数据,发送即可

