Code Monkey home page Code Monkey logo

Comments (5)

firesh-bakhda avatar firesh-bakhda commented on August 10, 2024 1

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 tag.

Secondly, make sure your JMeter version complies to the JMeter version you are using.
2.13

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

<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.

from mqttjmeter.

hemikak avatar hemikak commented on August 10, 2024

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.

from mqttjmeter.

andreibosco avatar andreibosco commented on August 10, 2024

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] -----------------------------------------------------

from mqttjmeter.

hemikak avatar hemikak commented on August 10, 2024

Hi @andreibosco ,

What is the maven version you are using ?
I am using 3.0.5.

from mqttjmeter.

andreibosco avatar andreibosco commented on August 10, 2024

I'm using 3.3.3. I've just changed maven-shade-plugin from 2.0 to 2.1 and now it builds fine.

from mqttjmeter.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.