refactor(性能测试): 提供配置 backend listener queue size

This commit is contained in:
Captain.B 2021-05-23 16:29:55 +08:00 committed by 刘瑞斌
parent de17d9b09c
commit 41b387b8a6
2 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@ public class KafkaProperties {
private String batchSize;
private String clientId;
private String connectionsMaxIdleMs;
private String queueSize = "5000";
private KafkaProperties.Ssl ssl = new KafkaProperties.Ssl();
private KafkaProperties.Log log = new KafkaProperties.Log();

View File

@ -618,7 +618,7 @@ public class JmeterDocumentParser implements DocumentParser {
// 清空child
removeChildren(backendListener);
backendListener.appendChild(createStringProp(document, "classname", "io.github.rahulsinghai.jmeter.backendlistener.kafka.KafkaBackendClient"));
backendListener.appendChild(createStringProp(document, "QUEUE_SIZE", "5000"));
backendListener.appendChild(createStringProp(document, "QUEUE_SIZE", kafkaProperties.getQueueSize()));
// elementProp
Element elementProp = document.createElement("elementProp");
elementProp.setAttribute("name", "arguments");