You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Rajith Attapattu <ra...@gmail.com> on 2010/03/15 14:51:44 UTC

Re: Problem with Session.addBroker(), Exchange names beginning with "amq." or "qpid." are reserved.

-Dqpid.declare_exchanges=false. will not work here as that works only
at the JMS layer.

Rajith

On Mon, Mar 15, 2010 at 6:37 AM, Gordon Sim <gs...@redhat.com> wrote:
> On 03/13/2010 06:18 PM, Joan Bellver Faus wrote:
>>
>> Hi, I have a problem when trying to connect to a broker in order to
>> manage a session with the managament, well my code is as follows:
>>
>>
>> String connectionBroker =
>>
>> "amqp://guest:guest@/test?brokerlist='tcp://localhost:5671?ssl='true',sasl_mechs='EXTERNAL''";
>>
>> sess.addBroker(connectionBroker);
>>
>>
>> The error is this:
>>
>> Exception in thread "Thread-3" org.apache.qpid.console.ConsoleException:
>> org.apache.qpid.transport.SessionException: ch=0 id=0
>> ExecutionException(errorCode=NOT_ALLOWED, commandId=10, classCode=7,
>> commandCode=1, fieldIndex=0, description=not-allowed: Exchange names
>> beginning with "amq." or "qpid." are reserved.
>> (exchange="qpid.management") (qpid/broker/SessionAdapter.cpp:89),
>> errorInfo={})
>> at org.apache.qpid.console.Broker.tryToConnect(Broker.java:421)
>> at org.apache.qpid.console.Broker.<init>(Broker.java:87)
>> at org.apache.qpid.console.Session.addBroker(Session.java:70)
>>
>> I am using the trunk version for both the broker c++ as for the java
>> client.
>>
>> thank you very much.
>
> As a workaround you could perhaps turn off declaring of exchanges using the
> system property -Dqpid.declare_exchanges=false.
>
> However I think this really requires a minor change along the lines of the
> patch attached. (Some refactoring may be appropriate here to avoid repeating
> the same check in two different places).
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>



-- 
Regards,

Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Problem with Session.addBroker(), Exchange names beginning with "amq." or "qpid." are reserved.

Posted by Rajith Attapattu <ra...@gmail.com>.
On Mon, Mar 15, 2010 at 10:01 AM, Gordon Sim <gs...@redhat.com> wrote:
> On 03/15/2010 01:51 PM, Rajith Attapattu wrote:
>>
>> -Dqpid.declare_exchanges=false. will not work here as that works only
>> at the JMS layer.
>
> I believe that is the layer at which org.apache.qpid.console.Broker
> operates.

My bad, yes it is !

>>
>> Rajith
>>
>> On Mon, Mar 15, 2010 at 6:37 AM, Gordon Sim<gs...@redhat.com>  wrote:
>>>
>>> On 03/13/2010 06:18 PM, Joan Bellver Faus wrote:
>>>>
>>>> Hi, I have a problem when trying to connect to a broker in order to
>>>> manage a session with the managament, well my code is as follows:
>>>>
>>>>
>>>> String connectionBroker =
>>>>
>>>>
>>>> "amqp://guest:guest@/test?brokerlist='tcp://localhost:5671?ssl='true',sasl_mechs='EXTERNAL''";
>>>>
>>>> sess.addBroker(connectionBroker);
>>>>
>>>>
>>>> The error is this:
>>>>
>>>> Exception in thread "Thread-3" org.apache.qpid.console.ConsoleException:
>>>> org.apache.qpid.transport.SessionException: ch=0 id=0
>>>> ExecutionException(errorCode=NOT_ALLOWED, commandId=10, classCode=7,
>>>> commandCode=1, fieldIndex=0, description=not-allowed: Exchange names
>>>> beginning with "amq." or "qpid." are reserved.
>>>> (exchange="qpid.management") (qpid/broker/SessionAdapter.cpp:89),
>>>> errorInfo={})
>>>> at org.apache.qpid.console.Broker.tryToConnect(Broker.java:421)
>>>> at org.apache.qpid.console.Broker.<init>(Broker.java:87)
>>>> at org.apache.qpid.console.Session.addBroker(Session.java:70)
>>>>
>>>> I am using the trunk version for both the broker c++ as for the java
>>>> client.
>>>>
>>>> thank you very much.
>>>
>>> As a workaround you could perhaps turn off declaring of exchanges using
>>> the
>>> system property -Dqpid.declare_exchanges=false.
>>>
>>> However I think this really requires a minor change along the lines of
>>> the
>>> patch attached. (Some refactoring may be appropriate here to avoid
>>> repeating
>>> the same check in two different places).
>>>
>>>
>>> ---------------------------------------------------------------------
>>> Apache Qpid - AMQP Messaging Implementation
>>> Project:      http://qpid.apache.org
>>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>



-- 
Regards,

Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Problem with Session.addBroker(), Exchange names beginning with "amq." or "qpid." are reserved.

Posted by Gordon Sim <gs...@redhat.com>.
On 03/15/2010 01:51 PM, Rajith Attapattu wrote:
> -Dqpid.declare_exchanges=false. will not work here as that works only
> at the JMS layer.

I believe that is the layer at which org.apache.qpid.console.Broker 
operates.

>
> Rajith
>
> On Mon, Mar 15, 2010 at 6:37 AM, Gordon Sim<gs...@redhat.com>  wrote:
>> On 03/13/2010 06:18 PM, Joan Bellver Faus wrote:
>>>
>>> Hi, I have a problem when trying to connect to a broker in order to
>>> manage a session with the managament, well my code is as follows:
>>>
>>>
>>> String connectionBroker =
>>>
>>> "amqp://guest:guest@/test?brokerlist='tcp://localhost:5671?ssl='true',sasl_mechs='EXTERNAL''";
>>>
>>> sess.addBroker(connectionBroker);
>>>
>>>
>>> The error is this:
>>>
>>> Exception in thread "Thread-3" org.apache.qpid.console.ConsoleException:
>>> org.apache.qpid.transport.SessionException: ch=0 id=0
>>> ExecutionException(errorCode=NOT_ALLOWED, commandId=10, classCode=7,
>>> commandCode=1, fieldIndex=0, description=not-allowed: Exchange names
>>> beginning with "amq." or "qpid." are reserved.
>>> (exchange="qpid.management") (qpid/broker/SessionAdapter.cpp:89),
>>> errorInfo={})
>>> at org.apache.qpid.console.Broker.tryToConnect(Broker.java:421)
>>> at org.apache.qpid.console.Broker.<init>(Broker.java:87)
>>> at org.apache.qpid.console.Session.addBroker(Session.java:70)
>>>
>>> I am using the trunk version for both the broker c++ as for the java
>>> client.
>>>
>>> thank you very much.
>>
>> As a workaround you could perhaps turn off declaring of exchanges using the
>> system property -Dqpid.declare_exchanges=false.
>>
>> However I think this really requires a minor change along the lines of the
>> patch attached. (Some refactoring may be appropriate here to avoid repeating
>> the same check in two different places).
>>
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project:      http://qpid.apache.org
>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>>
>
>
>


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org