Tinkoff / gatling-amqp-plugin

Plugin for support performance testing with AMQP in Gatling (3.7.x)
Apache License 2.0
33 stars 20 forks source link

Request/Reply : send message in Exchange reply in multi exchange #32

Open riadhsat opened 3 years ago

riadhsat commented 3 years ago

Hey Guys,

I want to send one msg in exchange and I want to reply in multi queue Any solution Please ?

Example : val scn : ScenarioBuilder = scenario("scenario with multi reply") .feed(correlationIds) .exec( amqp("test AMQ").requestReply .directExchange("exchange1", "keyrouting1") .replyExchange("queue 1") .replyExchange("queue 2") .bytesMessage(RawFileBody("file.json")) .contentType("application/json") .headers("action" -> "process", "correlationId" -> "${correlationId}") .priority(0) )

Thanks :)

ehmkah commented 3 years ago

I think this is not possible (at the moment). The reason lies in the way messages are handled.

In short each sent message has an identifier which is stored. If a message is read from the replyqueue it is checked, that this identifier has been found and the message is marked as received. If you have two consuming queues its not clear what should happen if the second queue reads the message, because at this moment its not possible to find a message anymore - it has been used for the first reading from queue1.

Maybe its possible to extend the plugin that its possible to say, how many message will be expected. So that there is not only stored the id of the message but also the number of messages expected for this ID.