Open matheus-fonseca opened 9 years ago
This is because fusesource library files are not getting included in the mqtt plugin jar. Add the pom file fix mentioned in https://github.com/tuanhiep/mqtt-jmeter/pull/1/files and see.
I've tried using the fixed pom file and now I can't build the project: [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.304 s [INFO] Finished at: 2015-06-13T14:15:36-03:00 [INFO] Final Memory: 18M/45M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.0:shade (default) on project mqtt-jmeter: Execution default of goal org.apache.maven.plugins:maven-shade-plugin:2.0:shade failed: A required class was missing while executing org.apache.maven.plugins:maven-shade-plugin:2.0:shade: org/sonatype/aether/version/VersionConstraint [ERROR] -----------------------------------------------------
Hi @andreibosco ,
What is the maven version you are using ? I am using 3.0.5.
I'm using 3.3.3. I've just changed maven-shade-plugin from 2.0 to 2.1 and now it builds fine.
You will need to build JMeter with dependencies. Add the following to the POM.xml
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
Add this to the
Secondly, make sure your JMeter version complies to the JMeter version you are using.
Third, change the mqtt-client library version to 1.10 instead of 1.4 (Thou i think both are working as what i tried)
<dependency>
<groupId>org.fusesource.mqtt-client</groupId>
<artifactId>mqtt-client</artifactId>
<version>1.10</version>
</dependency>
By doing this you eliminate all the FutureListener exceptions, input string "" errors and so on. 1) Publisher: Input string "" errors are becoz of Suffix Length is empty on the UI, so make sure you have value
2) Subscriber: Input string "" errors are becoz of Timeout is empty, make sure put a timeout there
Full Sample pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.liglab.erods.jmeter.mqtt</groupId>
<artifactId>mqtt-jmeter</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Apache JMeter :: MQTT Injector</name>
<description>MQTT Injector for Apache JMeter</description>
<properties>
<jmeter-version>2.13</jmeter-version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.jmeter</groupId>
<artifactId>ApacheJMeter_core</artifactId>
<version>${jmeter-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.jmeter</groupId>
<artifactId>ApacheJMeter_java</artifactId>
<version>${jmeter-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.fusesource.mqtt-client</groupId>
<artifactId>mqtt-client</artifactId>
<version>1.10</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
Current remaining issues that i still see :
1) Publisher : Client ID value on UI is not retained. 2) Publisher & Subscriber : Suffix Length Values are not retained 3) Subscriber : Keeps saying Received 0 messages thou there is something published.
@tuanhiep - Do have a look and see if i make any sense to ease your understanding.
I'm trying to make a MQTT test (pub/sub) but Jmeter gives me this Exception:
I followed your installation instructions at README.