[rabbitmq-discuss] .net client and Subscription

Andrius Norkaitis andrius.norkaitis at oryo.lt
Mon Jul 5 15:50:41 BST 2010


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/f81a8942/attachment.htm>


More information about the rabbitmq-discuss mailing list