[rabbitmq-discuss] Publish to queue fails but publish to direct exchange works
matthias at rabbitmq.com
Fri Jun 18 08:07:09 BST 2010
Raphael Simon wrote:
> <matthias at rabbitmq.com <mailto:matthias at rabbitmq.com>> wrote:
> Simply running 'rabbitmqctl list_bindings' should give the same
> results. Please do that, just to check.
> Yes indeed but where is the fun in doing that? OK more seriously I did
> not understand the subtlety of the empty spaces, now I do (as a side
> note it would be nice to have something rather than blank in this case
> maybe *** or ---).
The reason we don't map the blank exchange name to something else is
that RabbitMQ permits anything in the exchange name, so *** and ---
actually are valid exchange names.
> I can't think of a place where we would delete a binding. We only
> ever delete queues.
Are all AMQP interactions going through nanite? I can see there aren't
any queue.unbind actions in that code base.
> Is this reproducible at all? I suspect not :(
> No it has only happens about 15 times on the course of two days. During
> these two days our system was having issues and weird things could have
> happened on the broker (e.g. the queue could have been deleted and
Queue creation and deletion, and all they entail, e.g. addition/removal
of the default bindings, are meant to be atomic. And the code dealing
with that looks correct. But ...
> What version of rabbit are you running?
I suggest you upgrade. The queue and exchange code has changed quite a
bit in the recent release. While I do not recall us spotting any
problems in the previous version that would explain the behaviour you
are seeing, it is nevertheless possible that there was a bug in the
previous code which has been eradicated by other changes.
> Interesting. auto-delete exchanges are very rare. In fact I do not
> know of anybody else using them. So it's possible there is a bug in
> that code that has laid dormant for years. Can you explain your
> use-case for auto-delete exchanges?
> Embarrassingly enough, I can't :) The fact that we are using direct
> exchanges for these queues was a bug we introduced, we will be removing
ok. If you *do* think of a use case for auto-delete exchanges, please
let us know. The AMQP 0-9-1 spec actually removes that feature, but we
are having second thoughts on whether that was the right thing to do.
> I recreated some bindings from within the broker (directly in mnesia)
> and now things started working again. Is there a better way to re-create
> the binding to the default exchange without having to re-create the queue?
You should be able to issue an appropriate queue.bind command. As I
mentioned earlier, such explicit operations on the default exchange
should imo not be permitted, but rabbit does and it's a grey area of the
spec. So currently it should work, just don't write any code that
depends on it.
> I should probably mention that sending the following queue.bind
> packet didn't seem to help (rabbitmqctl list_bindings still shows the
> binding missing).
The exchange in the above should be blank.
More information about the rabbitmq-discuss