I am trying to write a wcf service that works over the rabbitMQ binding. I was able to successfully create a server and a client and have the client send messages to the server via the queue. I am confused about 2 issues.
As soon as the service is shutdown the queue is deleted. Is there a way to configure wcf and rabbitMQ so that the queue is persistent? This way I dont have to worry about losing data if my server crashes.
I can't seem to control the name of the queue. When I run rabbitmqctl.bat list_queues
I see that the queue is called amq.gen-3IgZD30XvTEQWNRsezSUUA==
. Is there a way to control the name of the queue?
That cannot be done with the WCF bindings. See this mailing list thread for details.
Basically, you cannot control the queue name via WCF, which means you are limited to anonymous queues (like the one you are seeing), which, in turn, means that you can only use non-persistent queues.
If you need more control than is offered by the WCF bindings, you should consider using the full .NET client. It's quite easy to use, and there are a bunch of tutorials to help you get started (they are in Java, but the .NET API is very similar).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With