Same thing with Exchange. Look at the Subscription.cs source:

public void Bind(string exchangeName, string exchangeType, string


m_model.ExchangeDeclare(exchangeName, exchangeType);

m_model.QueueBind(m_queueName, exchangeName, routingKey, false,


If I use other exchange than default (non-passive, non-durable,
non-autodelete, and non-internal) I got the exception.

From: rabbitmq-discuss-bounces at
[mailto:rabbitmq-discuss-bounces at] On Behalf Of Andrius
Sent: Monday, July 05, 2010 5:51 PM
To: rabbitmq-discuss at
Subject: [rabbitmq-discuss] .net client and Subscription

Hi. As from 1.8 there is queue equivalence verification I started getting
exception when I declare queue and later use it with Subscription class.

ch.QueueDeclare(clientID, false, false, true, true, false, null);

var sub = new Subscription(ch, clientID, false, RabbitMQexchange,
RabbitMQexchangeType, "");

As you can see I declare queue with Autodelete flag set to TRUE.

But if I specify queue name, Subscriber tries to re-declare this queue with
autodelete set to FALSE and exception rises.

Check the code from the client source:

public Subscription(IModel model, string queueName, bool noAck)


m_model = model;

if (queueName == null || queueName.Equals("")) {

m_queueName = m_model.QueueDeclare();

m_shouldDelete = true;

} else {

m_queueName = m_model.QueueDeclare(queueName);

m_shouldDelete = false;


m_consumer = new QueueingBasicConsumer(m_model);

m_consumerTag = m_model.BasicConsume(m_queueName, m_noAck, null,

m_latestEvent = null;


Is this expected behaviour? What if I want to subscribe to autodelete queue
using Subscribtion class and specifying the name of the queue?

Best regards

Andrius Norkaitis

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
grouprabbitmq-discuss @
postedJul 5, '10 at 2:50p
activeJul 5, '10 at 4:08p



site design / logo © 2021 Grokbase