easynetq

Declare response queue with specific name for Request/Response pattern in EasyNetQ


When using the Request/Response messaging pattern within EasyNetQ I need to declare a private response queue (with a specific name) before sending the message on the request queue?

I presume the framework declares the response queue in the background but how can I give this response queue a specific name?

I don't see any information on this within the documentation at https://github.com/EasyNetQ/EasyNetQ/wiki/Request-Response


Solution

  • This is the default implementation of the naming conventions: https://github.com/EasyNetQ/EasyNetQ/blob/develop/Source/EasyNetQ/Conventions.cs

    So perhaps you can try something like this:

    bus.Advanced.Conventions.RpcReturnQueueNamingConvention = () => "MyReturnQueue";