[rabbitmq-discuss] .net client and Subscription

Andrius Norkaitis andrius.norkaitis at oryo.lt
Mon Jul 5 16:21:19 BST 2010


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

 

public void Bind(string exchangeName, string exchangeType, string
routingKey)

        {

            m_model.ExchangeDeclare(exchangeName, exchangeType);

            m_model.QueueBind(m_queueName, exchangeName, routingKey, false,
null);

        }

 

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 lists.rabbitmq.com
[mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Andrius
Norkaitis
Sent: Monday, July 05, 2010 5:51 PM
To: rabbitmq-discuss at lists.rabbitmq.com
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_consumer);

            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: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100705/14c4fcd0/attachment.htm>


More information about the rabbitmq-discuss mailing list