QMF Request from Qpid JMS

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

QMF Request from Qpid JMS

mottese
This post was updated on .
I am using JMS 0.11.1 (Have to use Java 7) and was wondering how I can use QMF to get a list of bindings from the broker. Using C++ I would have done:

        Sender s = session.createSender("qmf.default.direct/broker");

        Message request;
        request.setContentType("amqp/map");
        request.setProperty("x-amqp-0-10.app-id", "qmf2");
        request.setProperty("qmf.opcode", "_query_request");
        Variant::Map schemaId;
        schemaId["_class_name"] = "binding";
        Variant::Map content;
        content["_what"] = "OBJECT";
        content["_schema_id"] = schemaId;

        request.setContentObject(content);
        s.send(request);

How would I do this via JMS? Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: QMF Request from Qpid JMS

Chris Richardson
Hi mottese,

I think I've actually read your post properly this time ;)
You might find some info in this post from last December (this assumes
you're using the C++ broker):
http://qpid.2158936.n2.nabble.com/Qpid-QMF-with-qpid-jms-client-0-10-0-td7656627.html

In that thread I attached a java class which does something similar
for queues and exchanges using JMS and QMF. The OP also posted some
feedback with an account of their experiences.

Chris

On 7 June 2017 at 21:03, mottese <[hidden email]> wrote:

> I am using JMS 0.11.1 (Have to use Java 7) and was wondering how I can use
> QMF to get a list of bindings from the broker. Using C++ I would have done:
>
>         Sender s = session.createSender("qmf.default.direct/broker");
>
>         Message request;
>         request.setContentType("amqp/map");
>         request.setProperty("x-amqp-0-10.app-id", "qmf2");
>         request.setProperty("qmf.opcode", "_query_request");
>         Variant::Map schemaId;
>         schemaId["_class_name"] = "binding";
>         Variant::Map content;
>         content["_what"] = "OBJECT";
>         content["_schema_id"] = schemaId;
>
>         request.setContentObject(content);
>         s.send(request);
>
> How would I do this via JMS? Thanks
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/QMF-Request-from-Qpid-JMS-tp7663863.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
Chris Richardson, System Architect
[hidden email]

FourC AS, Vestre Rosten 81, Trekanten, NO-7075 Tiller, Norway
www.fourc.eu

Follow us on LinkedIn, Facebook, Google+ and Twitter!

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: QMF Request from Qpid JMS

mottese
Chris Richardson wrote
Hi mottese,

I think I've actually read your post properly this time ;)
You might find some info in this post from last December (this assumes
you're using the C++ broker):
http://qpid.2158936.n2.nabble.com/Qpid-QMF-with-qpid-jms-client-0-10-0-td7656627.html

In that thread I attached a java class which does something similar
for queues and exchanges using JMS and QMF. The OP also posted some
feedback with an account of their experiences.

Chris
Thanks Chris. This worked for me.
Loading...