From 41b387b8a67eda9f4bd13c1712979c5dbc82545d Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Sun, 23 May 2021 16:29:55 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E6=8F=90=E4=BE=9B=E9=85=8D=E7=BD=AE=20backend=20listener=20?= =?UTF-8?q?queue=20size?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/metersphere/config/KafkaProperties.java | 1 + .../performance/parse/xml/reader/jmx/JmeterDocumentParser.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/config/KafkaProperties.java b/backend/src/main/java/io/metersphere/config/KafkaProperties.java index 38f5efc72a..c5ce188c15 100644 --- a/backend/src/main/java/io/metersphere/config/KafkaProperties.java +++ b/backend/src/main/java/io/metersphere/config/KafkaProperties.java @@ -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(); diff --git a/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java index 6d55d0fd23..736c5b7d56 100644 --- a/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java +++ b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java @@ -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");