Unbind needed

14 views
Skip to first unread message

DOBRO Sergei

unread,
Feb 2, 2010, 6:11:48 AM2/2/10
to amq...@googlegroups.com
Hi Dan,

If I'm not mistaken, there is no "unbind" ( MQ.queue().unbind() ) method in javascript API, yet. Sometimes It is really needed.
Could you add this method?

BTW,

I found out that MQ.queue().bind() declares topic exchange if no exchange declared before by calling MQ.exchange().

As result, if I try to declare exchange of type "direct", it causes the error in firebug console like this:
"Connection Closing unexpectedly!,530,NOT_ALLOWED - cannot redeclare exchange 'fooExchange' in vhost '/' of type 'direct' with type 'topic' ".

Let me suggest a new scheme. If no exchange declared before we call MQ.queue().bind(), then (depending on routing key):

- fanout exchange is declared if no routing key presented;
- topic exchange is declared if routing key contains "*" or "#" symbols;
- direct exchange is declared if routing key does not contain "*" or "#" symbols.


Thanks.

dan.simpson

unread,
Feb 2, 2010, 12:50:13 PM2/2/10
to amqp-js
In regards to unbind, 0-8 doesnt support it, so unless you are running
0-9 at the broker I can't really help you. I had made a 0-9 branch,
but I am not sure about it's health at this point. I will have to
check.

In regards to the auto declare exchange policy by scanning the key, I
like it.

--Dan

On Feb 2, 3:11 am, DOBRO Sergei <vertolet...@yandex.ru> wrote:
> Hi Dan,
> If I'm not mistaken, there is no "unbind" ( MQ.queue().unbind() ) method in javascript API, yet. Sometimes It is really needed.
> Could you add this method?
> BTW,
> I found out that MQ.queue().bind() declares topic exchange if no exchange declared before by calling MQ.exchange().

> As result, if I try to declare exchange of type "direct", it causes the error in firebug console like this:"Connection Closing unexpectedly!,530,NOT_ALLOWED - cannot redeclare exchange 'fooExchange' in vhost '/' of type 'direct' with type 'topic'".Let me suggest a new scheme. If no exchange declared before we call MQ.queue().bind(), then (depending on routing key):

DOBRO Sergei

unread,
Feb 2, 2010, 3:13:20 PM2/2/10
to amq...@googlegroups.com
I'm using RabbitMQ 1.7.0. Unbind method is supported in this release.


02.02.10, 23:09, "dan.simpson" <dan.s...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages