[rabbitmq-discuss] Binding routing key to queue on default exchange

5 views
Skip to first unread message

Irmo Manie

unread,
Oct 29, 2010, 11:09:12 AM10/29/10
to RabbitMQ
If you declare a queue, there is an automatic binding where the queue
name is used as the routing key.
Now I want to bind a different routing key to that same queue name
without specifying an exchange name, which according to the specs
should be possible correct?

With the 1.8.0 server this was possible, but with the latest 2.1.1 I
get an access_refused back.

Is there an explanation for this, or do I understand the specs wrongly here?

Meta code:

val connection = connectionFactory.newConnection
val channel = connection.createChannel
val queue = channel.queueDeclare.getQueue
val queueBind = channel.queueBind(queue, "", "some.routing.key")


Cheers,
Irmo
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq...@lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

Matthew Sackman

unread,
Oct 29, 2010, 11:14:30 AM10/29/10
to rabbitmq...@lists.rabbitmq.com
On Fri, Oct 29, 2010 at 05:09:12PM +0200, Irmo Manie wrote:
> If you declare a queue, there is an automatic binding where the queue
> name is used as the routing key.
> Now I want to bind a different routing key to that same queue name
> without specifying an exchange name, which according to the specs
> should be possible correct?

Nope. See http://dev.rabbitmq.com/wiki/Amqp091Errata#section_14

> With the 1.8.0 server this was possible, but with the latest 2.1.1 I
> get an access_refused back.

Yes, we corrected the behaviour! The default exchange is an exchange
that can only be used for publishing messages to. All other actions on
it are refused.

Matthew

Irmo Manie

unread,
Oct 29, 2010, 11:17:42 AM10/29/10
to rabbitmq...@lists.rabbitmq.com
Ah, I see. So the current specs still specify it's possible for a
queue bind ,but actually its now since that will be removed in 0.10.

Thanks :-)

Matthew Sackman

unread,
Oct 29, 2010, 11:30:01 AM10/29/10
to rabbitmq...@lists.rabbitmq.com
On Fri, Oct 29, 2010 at 05:17:42PM +0200, Irmo Manie wrote:
> Ah, I see. So the current specs still specify it's possible for a
> queue bind ,but actually its now since that will be removed in 0.10.

Well, don't forget that 0-9-1 came out after 0-10. And I don't think
it's a secret that we're extremely unlikely to ever implement 0-10. It's
more that 0-9-1 or 0-8 don't really specify clearly the role of the
default exchange. MikeB interprets it not as an exchange, but as a
separate publishing mechanism, that is accessible by publishing messages
with no exchange specified - there's no real reason why it has to be a
concrete exchange at all. Thus in light of that, there's substantial
debate whether it makes sense to be able to do any binding actions etc
to it.

Personally, I think the model is cleaner if that exchange/mechanism
doesn't exist at all! But it's clear that it has a lot of utility.

Reply all
Reply to author
Forward
0 new messages