Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RabbitMQ with WCF and a persistent queue

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.

  1. 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.

  2. 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?

like image 533
Vadim Rybak Avatar asked Nov 04 '11 21:11

Vadim Rybak


1 Answers

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).

like image 85
scvalex Avatar answered Nov 03 '22 06:11

scvalex