Project Setup

Learn about how to set up your project to use the Gatling MQTT protocol.

License and limitations

The Gatling MQTT component is distributed under the Gatling Enterprise Component License.

The Gatling MQTT protocol can be used with both the Open Source and Enterprise versions of Gatling.

Its usage is unlimited when running on Gatling Enterprise. When used with Gatling Open Source, usage is limited to:

  • 5 users maximum
  • 5 minute duration tests

Limits after which the test will stop.

Getting started with the demo project

A demo project is available with most combinations of currently supported languages and build tools:

Adding the Gatling MQTT dependency

The Gatling MQTT plugin is not included with Gatling by default. Add the Gatling MQTT dependency, in addition to the usual Gatling dependencies.

For Java or Kotlin:

<dependencies>
  <dependency>
    <groupId>io.gatling</groupId>
    <artifactId>gatling-mqtt-java</artifactId>
    <version>${gatling-mqtt.version}</version>
    <scope>test</scope>
  </dependency>
</dependencies>

Base Gatling setup for Maven is documented here.

dependencies {
  gatlingImplementation("io.gatling:gatling-mqtt-java:$gatlingMqttVersion")
}

Base Gatling setup for Gradle is documented here.

For Scala:

<dependencies>
  <dependency>
    <groupId>io.gatling</groupId>
    <artifactId>gatling-mqtt</artifactId>
    <version>${gatling-mqtt.version}</version>
    <scope>test</scope>
  </dependency>
</dependencies>

Base Gatling setup for Maven is documented here.

dependencies {
  gatlingImplementation("io.gatling:gatling-mqtt:$gatlingMqttVersion")
}

Base Gatling setup for Gradle is documented here.

libraryDependencies += "io.gatling" % "gatling-mqtt" % gatlingMqttVersion % "test,it"

Base Gatling setup for sbt is documented here.

Edit this page on GitHub