The aim of the project is to allow load testing of applications using ZeroMQ with the help of the Gatling tool.
SBT dependency:
"com.softwaremill.gatling-zeromq" %% "gatling-zeromq" % "0.1.0"
Gradle dependency:
"com.softwaremill.gatling-zeromq:gatling-zeromq_2.11:0.1.0"
gatling-zeromq
is available for Scala 2.11 and requires Java 8.
You need to add a dependency on Gatling tool to your project since it is not bundled in this library.
Tests in the project can be started with:
sbt gatling:test
For more information look at the Gatling SBT plugin.
The project uses JeroMQ as the ZeroMQ connector.
Before running a scenario, you have to provide host and port to connect to. For example:
val config = zmqConfig
.host("localhost")
.port("8916")
The plugin supports:
- the publishing side of the PUB-SUB pattern (
zmqPub("...")
), - the requesting side of the REQ-REP pattern (
zmqReq("...")
), - and the pushing side of the PUSH-PULL pattern (
zmqPush("...")
),
Sending of a message and a multi-part message is supported:
scenario("Scenario A")
.exec(
zmqPub("a request")
.send("a message")
)
scenario("Scenario B")
.exec(
zmqPub("a request")
.sendMore("a multi")
.sendMore("part")
.send("message")
)
Types of data can be String
, Array[Byte]
, numeric ones and Gatling's Expression Language strings as well.
Take a look at the open issues and pick a task you'd like to work on!