You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by fadams <fr...@blueyonder.co.uk> on 2011/07/03 20:58:22 UTC
QMF2 creating queues
I'm playing with QMF2 from JMS and I seem to be able to create queues using
the following:
MapMessage request = requestResponseSession.createMapMessage();
request.setJMSReplyTo(responseQueue);
request.setStringProperty("x-amqp-0-10.app-id", "qmf2");
request.setStringProperty("qmf.opcode", "_method_request");
Map objectId = new HashMap();
objectId.put("_object_name", "org.apache.qpid.broker:broker:amqp-broker");
request.setObject("_object_id", objectId);
request.setString("_method_name", "create");
Map arguments = new HashMap();
arguments.put("type", "queue");
arguments.put("name", name);
request.setObject("_arguments", arguments);
requestProducer.send(request);
Message response = responseConsumer.receive(10*1000);
if (response != null) {
etc....
This seems to work fine with the 0.10 broker, however with the 0.8 broker
(both C++) I get the following exception when I decode the response...
"No object found with
ID=0-0-0--0(org.apache.qpid.broker:broker:amqp-broker)"
Is is possible to create queues etc. at runtime with the 0.8 broker??
well clearly it is because qpid-config works fine and queues get created
fine from address strings, but I thought my snippet above was the correct
way to do this with the QMF2 protocol
Any ideas???
--
View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/QMF2-creating-queues-tp6543876p6543876.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: QMF2 creating queues
Posted by Gordon Sim <gs...@redhat.com>.
On 07/03/2011 07:58 PM, fadams wrote:
> Is is possible to create queues etc. at runtime with the 0.8 broker??
Yes, but not with QMF. The create/delete methods were added to the
brokers schema in 0.10.
> well clearly it is because qpid-config works fine and queues get created
> fine from address strings, but I thought my snippet above was the correct
> way to do this with the QMF2 protocol
>
> Any ideas???
qpid-config uses the queue-declare etc commands in the underlying 0-10
protocol for creating queues it only uses QF for querying existing
queues etc (as this is not supported by the underlying protocol)
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org