qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Ross <tr...@redhat.com>
Subject Re: Java Client - Question
Date Thu, 12 Jun 2008 13:54:31 GMT
Rajith Attapattu wrote:
> On Thu, Jun 12, 2008 at 6:18 AM, <mehtar@cs.man.ac.uk> wrote:
>
>   
>> Hi All,
>>
>> Thanks Carl for giving me a good starting point. So I am focusing on the
>> first step from the following step (regarding JMX/WSDM Bridge project):
>>
>> 1. Creating a Java Client which can talk to Qpid C++ Broker. Thus I can
>> fetch the schema out from the broker
>>
>> 2. Once I will get the schema, I will translate it into JMS object
>>
>> 3. Then, we can expose those to WSDM
>>
>> One question on the first step, I am creating an individual Java Client for
>> this. I dont really understand how I will bind Queue of my Java client to
>> exchange so that I can receive messages and updates periodically from the
>> exchange. Carl, did you want me to create an individual java client, if so
>> how can I bind it with the exchange?
>>
>> Secondly, will I use the Client APIs of Qpid broker to make the connection
>> and create/declare queues and bind them to exchange?
>>
>> For instance, I did find the APIs for the same under this directory
>> structure:
>>
>>
>> https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/amqpexample/
>>     
>
>
> I wrote them a while back and haven't looked at them recently.
> These examples compile so I assume it reflects the latests AMQP java API.
>
> However if you are not doing any management specific commands and only wants
> to bind to an exchange and receive messages, maybe you can get away with
> JMS.
>
> Regards,
>
> Rajith
>
>   
Rahul,

For your purposes, you need to create two private queues.  The first, 
the "management" queue, must be bound to the topic exchange called 
"qpid.management" with a binding key of "mgmt.#".  The second, the 
"reply" queue, must be bound to amq.direct with a binding key that is 
identical to the name of the queue.

You will then be sending messages to the "qpid.management" exchange and 
receiving messages from both private queues.

You can use the JMS API for message transfer.  You will need the AMQP 
codec from the non-JMS Java API to encode and decode the bodies of the 
management messages.

-Ted


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message