qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Godfrey <rob.j.godf...@gmail.com>
Subject Re: can't config a fanout exchange
Date Wed, 30 Sep 2009 00:11:11 GMT
Hi Mark,

2009/9/30 mARK bLOORE <mbloore@gmail.com>

> Thanks for the reply, Rob, but actually I set the exchange to fanout
> in the config file, and declared it to be fanout in my code, but the
> broker seems to think it was configured as direct.
> If I don't configure it the code runs fine, but I would rather have it
> already exist, so that I can publish to it without having to ensure
> that a queue is bound to it first.
My apologies, I read the error message in haste.... and must have mentally
swapped the order of "fanout" and "direct"

The error code from the Java Broker says

'Attempt to redeclare exchange: test-exchange of type direct to
fanout. [error code 530: not allowed]'

This is generated by the following code inside the Java Broker:

else if (!exchange.getType().equals(body.getType()))

                throw new AMQConnectionException(AMQConstant.NOT_ALLOWED,
"Attempt to redeclare exchange: " + body.getExchange() + " of type " +
exchange.getType() + " to " + body.getType() +".",body.getClazz(),

So it appears that the config is creating a direct exchange and not a fanout
exchange as you would expect...

I'm presuming that your config:


is not a completely accurate cut and paste (i.e. the last line is actually
</exchanges> in the config file?)

However looking at the current codebase I can see no reason why an exchange
declared in the config would be created as direct... Can you confirm which
release of the broker you are using?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message