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.
On Tue, Sep 29, 2009 at 5:39 PM, Robert Godfrey <rob.j.godfrey@gmail.com> wrote:
> 2009/9/29 mARK bLOORE <mbloore@gmail.com>
>
>> With this in my virtualhosts.xml file
>> <exchanges>
>> <exchange>
>> <type>fanout</type>
>> <name>test-exchange</name>
>> <durable>true</durable>
>> </exchange>
>> <.exchanges>
>>
>> When I try to declare test-exchange to be fanout I get
>>
>> 'Attempt to redeclare exchange: test-exchange of type direct to
>> fanout. [error code 530: not allowed]'
>>
>> Without that config things work fine, but the exchange does not exist
>> at startup.
>>
>> What am I doing wrong?
>>
>>
> The error code indicates that you are trying to declare the exchange as a
> "direct" exchange within your application, while in the configuration you
> are declaring it as type "fanout" - the server will not let you change the
> type of an existing exchange. You need to make sure that when you declare
> the exchange you pass in the correct type... Which client are you using
> (Python/Java etc)?
>
> Hope this helps,
> Rob
>
>
>> --
>> mARK bLOORE <mbloore@gmail.com>
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project: http://qpid.apache.org
>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>>
>>
>
--
mARK bLOORE <mbloore@gmail.com>
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
|