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>

Search Discussions

  • Andrius Norkaitis at Jul 5, 2010 at 3:21 pm
    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>
  • Emile Joubert at Jul 5, 2010 at 4:08 pm
    Hi Andrius,

    Thanks for bringing this to our attention. The less-than-ideal behaviour
    you describe is caused partly by changes that were introduced during
    AMQP 0.9.1 compatibility. We also did not fully anticipate your use of
    the Subscription abstraction, which is to declare queues and exchanges
    outside the abstraction.

    Your code will continue to work on version 1.7.2 while we consider how
    to address the problem. You could also implement your own version of
    Subscription, which is a very slim class. By declaring your own queues
    and exchanges you are already doing much of that work.

    Regards

    Emile

    On 05/07/10 16:21, Andrius Norkaitis wrote:
    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



    _______________________________________________
    rabbitmq-discuss mailing list
    rabbitmq-discuss at lists.rabbitmq.com
    https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedJul 5, '10 at 2:50p
activeJul 5, '10 at 4:08p
posts3
users2
websiterabbitmq.com
irc#rabbitmq

People

Translate

site design / logo © 2021 Grokbase