pardahlman / RawRabbit

A modern .NET framework for communication over RabbitMq
MIT License
746 stars 144 forks source link

Why does MessageSequence create an answer queue? #372

Closed lmoe closed 6 years ago

lmoe commented 6 years ago

Hey there.

Currently I'm working on a smaller project, but I wanted to use RabbitMQ for scalability and learning. I'm using the RPC pattern with the provided MessageSequence as explained in the docs (But with RawRabbit 2): https://rawrabbit.readthedocs.io/en/master/message-sequence.html

There is one thing I don't understand. The pattern seems to create a temporary queue for each response which seems odd. In my understanding a message with a globally known id shouldn't require it's own queue, as the message can be identified at the requesting client.

As far as I know creating a temporary queue can take up some resources and time. And while I was testing my PoC with an empty message I didn't get over 200msg/s. Starting more listeners and clients didn't scale as expected.

Am I doing something fundamentally wrong? I hope someone can give me a heads up. Thanks in advance! :)

lmoe commented 6 years ago

Oh well. The documentation mislead me (which was my own fault). After changing to request/response async I got exactly what I needed.

Thank you for this great library! :)