[rabbitmq-discuss] Alternate Exchanges: How to?

Simon MacMullen simon at rabbitmq.com
Fri Apr 1 13:36:22 BST 2011


On 01/04/11 11:44, Alfonso wrote:
> 1. How to do it using .NET API?

I'm not very familiar with the .net API but something like:

IModel channel = ...;
channel.ExchangeDeclare("alternate", "fanout", true);
IDictionary args = new Dictionary();
args.Add("alternate-exchange", "alternate");
channel.ExchangeDeclare("main", "topic", true, false, args);

This would declare two exchanges, "main" and "alternate". "alternate" is 
the alternate-exchange for "main".

> 2. How to do it from the web admin console (what parameters should be
> used)?

Next to "Arguments" enter "alternate-exchange" in the first field on the 
left, and the name of the alternate exchange in the second field on the 
right.

> 3. And the most difficult: In a cluster with 2 Rabbits where Exchanges
> are replicated (If I'm not wrong) how is the best approach to do it?

Not sure I understand. Exchanges exist in all nodes in a cluster 
simultaneously - so using alternate exchanges is no different in a cluster.

Cheers, Simon

-- 
Simon MacMullen
Staff Engineer, RabbitMQ
SpringSource, a division of VMware



More information about the rabbitmq-discuss mailing list