A JMeter plug-in that enables you to send test results to a Kafka server.
JMeter Backend Listener Kafka is a JMeter plugin enabling you to send test results to a Kafka server. It is inspired from JMeter ElasticSearch backend listener plug-in.
Filters
filter1;filter2;filter3
or sampleLabel_must_contain_this
.Specific fields field1;field2;field3
Verbose, semi-verbose, error only, and quiet mode:
Use Logstash/NiFi or any other tool to consume data from Kafka topic and then ingest it into a Database of your liking.
<dependency>
<groupId>io.github.rahulsinghai</groupId>
<artifactId>jmeter.backendlistener.kafka</artifactId>
<version>1.0.1</version>
</dependency>
SSH to a Unix machine with X-11 Forwarding enabled, and then set DISPLAY variable:
export DISPLAY=Your_terminal_IP:0.0
Download JMeter binary and extract it:
mkdir -P /home/jmeter
cd /home/jmeter
curl -O -k http://mirror.vorboss.net/apache//jmeter/binaries/apache-jmeter-5.1.1.tgz
tar -zxvf apache-jmeter-5.1.1.tgz
ln -s apache-jmeter-5.1.1 ./current
export JMETER_HOME=/data/elastic/jmeter/current
Download and install Plugin Manager to lib/ext
folder:
curl -O -k http://search.maven.org/remotecontent?filepath=kg/apc/jmeter-plugins-manager/1.3/jmeter-plugins-manager-1.3.jar
mv jmeter-plugins-manager-1.3.jar apache-jmeter-5.1.1/lib/ext/
Detailed instructions on installing Plug-ins Manager are available at this blog.
Start JMeter:
cd $JMETER_HOME
JVM_ARGS="-Dhttps.proxyHost=myproxy.com -Dhttps.proxyPort=8080 -Dhttp.proxyUser=user -Dhttp.proxyPass=***" ./bin/jmeter.sh
Build the artefact: Execute below mvn command. Make sure JAVA_HOME is set properly
mvn clean package
Move the resulting JAR to your JMETER_HOME/lib/ext
.
mv target/jmeter.backendlistener.kafka-1.0.0-SNAPSHOT.jar $JMETER_HOME/lib/ext/
Restart JMeter
Go to Options > Plugins Manager
You will find Kafka Backend listener plug-in mentioned in the Installed plug-ins tab.
io.github.rahulsinghai.jmeter.backendlistener.kafka.KafkaBackendClient
as Backend Listener Implementation
.You can run the test plan in GUI mode or in CLI mode using command like below:
bin/jmeter -H [HTTP proxy server] -P [HTTP proxy port] -N "localhost|127.0.0.1|*.singhaiuklimited.com" -n -t test_kafkaserver.jmx -l test_kafkaserver_result.jtl
For more information, here's a little documentation.
Feel free to contribute by branching and making pull requests, or simply by suggesting ideas through the "Issues" tab.
Please find instructions here on how to configure your IntelliJ or Eclipse to format the source code according to Google style.
Once configured in IntelliJ, format code as normal with Ctrl + Alt + L
.
Adding the XML file alone and auto-formatting the whole document could replace imports with wildcard imports, which isn't always what we want.
File
→ Settings
→ Editor
→ Code Style
→ Java
and select the Imports
tab.Class Count to use import with '*'
and Names count to us static import with '*'
to a higher value; anything over 999
should be fine.You can now reformat code throughout your project without imports being changed to Wildcard imports.
You also need to use maven-git-code-format
plugin in pom.xml
to auto format the code according to Google code style before any Git commit.
Use remark-cli to format markdown files. It ensures a single style is used: list items use one type of bullet (, -, +), emphasis ( or _) and importance (__ or **) use a standard marker, table fences are aligned, and more.
Install remark-cli
and remark-preset-lint-recommended
npm install remark-cli -g
npm install remark-preset-lint-recommended -g
# Add a table of contents to `README.md`
remark README.md --use toc --output
# Lint markdown files in the current directory
# according to the markdown style guide.
remark README.md --use remark-preset-lint-recommended -o
# Rewrite all applicable files
remark . -o