[
https://issues.apache.org/jira/browse/QPID-4444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500356#comment-13500356
]
Robbie Gemmell commented on QPID-4444:
--------------------------------------
Hi Andrew,
The python tools are for the C++ broker, not the Java broker. They use QMFv2 to
communicate with the C++ broker, and the Java broker does not implement this
(plus had its limited/incomplete QMFv1 support removed recently). What you are
seeing is the result of the broker not having an Exchange named
'qmf.default.topic' since that forms part of the QMFv2 implementation.
To add a queue from the command line on the Java broker you could either use
the JMX interface via a simple Java program, or alternatively use the REST
interface via e.g curl (or anything else you like).
See here for a basic Java example of using JMX (I just updated it to make it
work again after we quoted some ObjectName values, so do an update if you have
your own checkout):
http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/management/example/src/main/java/org/apache/qpid/example/jmxexample/AddQueue.java
After building trunk it can be run from the build dir using e.g:
java -cp
"lib/qpid-management-example-0.19.jar:lib/qpid-management-common-0.19.jar"
org.apache.qpid.example.jmxexample.AddQueue
(The dependency on qpid-management-common could be broken by making use of text
based MBeanServer method invocation instead of using the MBean Proxy objects
the example does, which then requires the MBean interfaces).
There is also an http management interface since 0.18
(http://localhost:8080/management by default) which is basically javascript
making use of a REST interface, so you could for example use curl or such like
against that yourself. It isn't yet documented, but you can figure out most of
the API 'easily enough' by inspecting the HTTP commands sent to the broker as
you use the web UI (e.g some developers I know use the Firebug plugin for
Firefox). Some examples below to get you started though:
E.g to create a queue:
curl -X PUT -d '{"durable":true}'
http://localhost:8080/rest/queue/<vhostname>/<queuename>
curl -X PUT -d '{"durable":true,"type":"priority"}'
http://localhost:8080/rest/queue/<vhostname>/<queuename>
E.g to bind a queue to an exchange (other than the default exchange it is bound
to by default):
curl -X PUT -d '{}'
http://localhost:8080/rest/binding/<vhostname>/<exchangename>/<queue-name>/<binding-name>
The above commands will work as the ANONYMOUS user if you haven't enabled any
ACLs, but if you have configured ACLs then you would either have to
specifically allow the ANONYMOUS user to still do such things in the ACL, or
use BASIC auth ( add -u <username> option to above commands) via an HTTPS
connection, or enable BASIC auth when using HTTP (its disabled by default for
HTTP, enabled for HTTPS).
You can enable basic-auth on HTTP by adding the basic-auth config element as
shown below (the same element name works within the https element too if you
for example wanted to turn basic-auth off entirely):
{noformat}
...
<management>
<http>
<basic-auth>true</basic-auth>
</http>
</management>
...
{noformat}
Regards,
Robbie
> QPID Broker fails when running qpid-config command
> --------------------------------------------------
>
> Key: QPID-4444
> URL: https://issues.apache.org/jira/browse/QPID-4444
> Project: Qpid
> Issue Type: Bug
> Components: Java Broker
> Affects Versions: 0.19
> Environment: linux
> Reporter: Andrew Burks
> Labels: newbie
>
> I have checked out the updated source code (up to revision 1411028) and when
> executing "qpid-config -a guest/guest@protoqpid:5672", I receive the error
> "Failed: RuntimeError: Timed out waiting for broker to synchronize".
> Note: protoqpid is just an alias to localhost
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]