Gatling Passing all the feeder data generated into next exec block

I am trying to implement a performance testing for rabbitMQ application. I know there is no official support for the AMQP protocol in gatling. I done a work around and implemented this using Http requests,

def publishMessage() = {
repeat(1) {

def getMessage() = {
repeat(1) {

“count”: “1”,

.check( ),jsonPath("$[0].payload").saveAs(“payload”)).check(substring("${uuid}").exists))
val scn = scenario("Code ")
scn.inject( nothingFor(5 seconds),
rampUsers(10) during (10 seconds))
).protocols(httpConf).maxDuration(1 minute)

the above code is working fine for one user, but when i increase the number of users it is breaking randomly (uuid is not matching). Here what i am doing is the uuid from the feeder input to publishMessage() request body is comparing with the response of the getMessage() json response body ,Since the first method is posting data to a queue we cant guarantee which message is going to be published there first when number of users increasing.

So my question is, is there any way i can store all the generated uuid from feeder to a list/Map and compare whether it is present in the second requests(getMessage) response body.

Sadly, this cannot work.
You can’t guarantee the virtual user that will consume the “response” message is the same as the one that sent the “request” one.

Thanks for the quick reply. So is there any way i can implement(may be some workaround ) this using gatling

We have in our documentation a list of third party extensions we’re aware of:
There’s one for AMQP. It seems to be actively maintained, even though it’s not up-to-date.
You can try your luck with it.

I tried with the plugin by the example provided (RequestReply as mentioned in there)
But here it is not acknowledge the message response(hence failing the test), even though i can see all the messages are being consumed from the queue ( rep-queue-mq) by the test suite.
I am not sure what i am missing here, may be some additional check block.i think i miss some kind of comparison or protocol configuration here ( i tried to figure out whether id exists in response with jsonPath("$.id").exists, but its failing in runtime due to

type mismatch; found : io.gatling.core.check.CheckBuilder[io.gatling.core.check.jsonpath.JsonPathCheckType,com.fasterxml.jackson.databind.JsonNode,String] required: ru.tinkoff.gatling.amqp.AmqpCheck (which expands to) io.gatling.core.check.Check[ru.tinkoff.gatling.amqp.request.AmqpProtocolMessage] bodyString.exists,jsonPath("$.id").exists)

I am fairly new to scala and gatling, so i am not exactly sure of what is causing the issue( seems the plugin is expecting some other type expression: check(bodyString.exists,jsonPath("$.id").exists)).

lass RequestReply extends Simulation{

  val amqpConf: AmqpProtocolBuilder = amqp

  val scn: ScenarioBuilder = scenario("AMQP")
    .feed(idFeeder) /
      amqp("Consume Publish Test").requestReply
        .directExchange("", "direcs.rk")
        .replyExchange("rep-queue-mq") // here i given the queue name where the message is published by the application after processing (this queue is another exchange)
        .property("content_type", "application/json")

Note : I tried to publish and consume from the same queue …its working there.( tried to print the response in this case and found the below output as expected.

Response body:
Response body:
Response body:

  ).exec({session =>
  val response = session("BODY").as[String]
  println(s"Response body: \n$response")

You won’t find help on third party plugins here.
This group is only for official components.
Please reach authors on this third party project’s Github bugtracker.

Thanks Stephane.Will check with the authors :slight_smile: