Hi *,

while adding support for queue arguments to a node.js amqp library, we
noticed a puzzling behaviour on dev.rabbitmq.com: Redeclaring an existing
queue with differing x-expire values is accepted, even over the same
connection. Discusson here: https://github.com/postwait/node-amqp/pull/25

Both my 2.6.1 build from the rabbitmq macports repository as well as a
current hg build done by another developer throw a PRECONDITION_FAILED
error in that case. Curiously, using different values for x-ha-policy
(instead of x-expires) works as expected: it raises the error on
dev.rabbitmq.com as well.

There seems to be something different on that host wrt. x-expire.
We'd rather use x-expire for the test since x-ha-policy only exists from
2.6.x. onward.

Can anybody shed any light on this?

thanks in advance,
bkw

Search Discussions

  • Matthias Radestock at Sep 27, 2011 at 6:09 am
    Bernhard,
    On 27/09/11 01:29, Bernhard Weisshuhn wrote:
    while adding support for queue arguments to a node.js amqp library, we
    noticed a puzzling behaviour on dev.rabbitmq.com: Redeclaring an existing
    queue with differing x-expire values is accepted, even over the same
    connection. Discusson here: https://github.com/postwait/node-amqp/pull/25
    I suspect the queue is expiring before the second queue.declare. The
    expiry value in the test is just 300 milliseconds. Depending on network
    conditions and load on dev.rabbitmq.com, that could easily get exceeded.

    So a) choose a higher value, and b) consider using 'nowait=true' in the
    queue.declare and pipeline the two requests (I have no idea whether
    node.amqp can do that, but it should ;) in order to minimise the effects
    of network latency.

    Regards,

    Matthias.
  • Bernhard Weisshuhn at Sep 27, 2011 at 12:43 pm

    On Tue, Sep 27, 2011 at 07:09:14AM +0100, Matthias Radestock wrote:

    I suspect the queue is expiring before the second queue.declare. The
    expiry value in the test is just 300 milliseconds. Depending on
    network conditions and load on dev.rabbitmq.com, that could easily
    get exceeded.
    That explains it all - I was under the impression there where mere
    seconds instead of milleseconds. Thanks for clearing up the confusion,
    it all makes sense now.

    kind regards,
    bkw

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedSep 27, '11 at 12:29a
activeSep 27, '11 at 12:43p
posts3
users2
websiterabbitmq.com
irc#rabbitmq

People

Translate

site design / logo © 2022 Grokbase