availability RabbitMQ server pair via WCF
I'm trying to figure out what is the best solution to work with rabbitmq cluster via wcf.
Current setup:
Web role posts messages to rabbit1 node and worker listens to rabbit1 node too. If rabbit1 node fails system(both web and worker) should switch to rabbit2. And that's the question, how to implement this in more elegant way rather than handling connection failures in application code.
First and the only approach I see now is to use wcf4 routing backup endpoints feature. This way solves problem on client side(web role) only but doesn't solve problem on wcf service side(worker role).
One way is to create a wrapper around your service host, used for storing a list of connection strings (which can come from config).
Add a handler to the service faulted event, where you can close and reopen the host with a different connection string.
链接地址: http://www.djcxy.com/p/34164.html下一篇: 通过WCF提供RabbitMQ服务器对