Skip to content

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

Open
riadhsat opened this issue May 7, 2021 · 1 comment
Open

Comments

@riadhsat
Copy link

riadhsat commented May 7, 2021

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
Copy link
Contributor

ehmkah commented May 13, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants