[rabbitmq-discuss] HA with C#. Ending server does not cause HandleBasicCancel

Mike Barry michael.john.barry at gmail.com
Tue Sep 18 19:37:06 BST 2012


I have a 2 node (both disk) cluster setup. In an attempt to simulate a node 
failure I am killing the erlang process hosting rabbit on the master for a 
durable queue. I would expect to get a HandleBasicCancel as defined in the 
documentation, however I am only getting an OnCancel. Is this expected? 
Should I be simulating a node failure in another way? I tried setting the 
client capabilities but it seems the C# client sends true for 
consumer_cancel_notify no matter what I specify. I validate this via the 
management website for the connection and see:

publisher_confirms: true
exchange_exchange_bindings: true
consumer_cancel_notify: true
basic.nack: true

I create the queue with the following code:

ConnectionFactory factory = new ConnectionFactory();                       
factory.HostName = "localhost";                

this.connection = factory.CreateConnection();                
this.channel = this.connection.CreateModel();                               
this.queueConsumer = new FabricNotificationQueueConsumer(this.region, 
this.groupName, this.serializer,

Dictionary<string, object> queueArgs = new Dictionary<string, object>();
queueArgs.Add("x-ha-policy", "all");

this.channel.QueueDeclare(QueueName, true, false, false, queueArgs);
this.channel.QueueBind(QueueName, exchange, string.Format("{0}.{1}.*", 
this.region, this.groupName));
this.channel.BasicConsume(QueueName, true, this.queueConsumer);

Thanks for your help,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120918/19362ef7/attachment.htm>

More information about the rabbitmq-discuss mailing list