Quoting Gordon Sim <[email protected]>:
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).
Hi, I tried to make me sugested changes in the last two mails and
perfect work for me, also made another small change like you said up
in class Broker.java.
This changes are:
BasicMessageProducer_0_10.java:
@@ -72,7 +72,7 @@
(name,
destination.getExchangeClass().toString(),
null, null,
- name.startsWith("amq.") ? Option.PASSIVE : Option.NONE);
+ (name.startsWith("amq.")
|| name.startsWith("qpid.")) ? Option.PASSIVE :
Option.NONE);
}
else
{
AMQSession\_0\_10.java
@@ -647,7 +647,7 @@
type,
alternateExchange,
args,
- name.toString().startsWith("amq.") ? Option.PASSIVE
+ (name.toString().startsWith("amq.") ||
name.toString().startsWith("qpid.")) ? Option.PASSIVE
: Option.NONE);
// We need to sync so that we get notify of an error.
if (!nowait)
Index: management/console/src/main/java/org/apache/qpid/console/Broker.java
-
"management://qpid.management//topic-%s?exclusive='True'&autodelete='True'";,
+
"management-topic://qpid.management//topic-%s?exclusive='True'&autodelete='True'";,
brokerId);
reply = session.createQueue(replyName);
MessageConsumer cons = session.createConsumer(reply);
-
String destName =
String.format(``management://qpid.management//?routingkey='%s''',
+
String destName =
String.format(``management-topic://qpid.management//?routingkey='%s''',
You can review the changes and tell me if the changes are correct? Or
if there is a better solution please let me know.
Another problem is that when you test the trunk version of broker c++
with a Java client when the execution finish and delete the queue that
i created (with the method queueDelete(String name))in the part of
broker gives me the following error: "Queue 'name of queue' has been
deleted",as well if i close the session with session.close() gives me
another error in the broker.
The session variable is a qpid.transport.Session type.
In this new version of broker,suposed that not close the session and
delete the queues??
Thank you very much.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]