[EMAIL PROTECTED] wrote:
Hi Arnaud,

Thanks for your help. Your sample codes are really very useful to get an idea. At this moment, I can fetch the following information (decoded) from the broker by "management" queue bound on "qpid.management" exchange.


A
M
1
c
0
Package Name: qpid
Class Name: broker
-6506066772830834859
3980601858483200060
Current Sample: Wed Jul 06 22:54:31 CEST 38476878
Object Created: Sat Jul 24 16:10:25 CEST 38476877
Object Deleted: Thu Jan 01 01:00:00 CET 1970
16777218
--------
A
M
1
c
0
Package Name: qpid
Class Name: vhost
-8836930437367238452
6978501457256817678
Current Sample: Wed Jul 06 22:55:54 CEST 38476878
Object Created: Sat Jul 24 16:10:31 CEST 38476877
Object Deleted: Thu Jan 01 01:00:00 CET 1970
16777219
-------------

A
M
1
c
0
Package Name: qpid
Class Name: exchange
-5418781513850411724
-4895665811244006470
Current Sample: Wed Jul 06 22:57:02 CEST 38476878
Object Created: Sat Jul 24 16:11:00 CEST 38476877
Object Deleted: Thu Jan 01 01:00:00 CET 1970
33554433
------------
A
M
1
c
0
Package Name: qpid
Class Name: client
2274936829591414069
7716666671830073968
Current Sample: Wed Jul 06 23:10:41 CEST 38476878
Object Created: Thu Oct 14 02:14:24 CEST 38476877
Object Deleted: Thu Jan 01 01:00:00 CET 1970
19421773476921347
---------------
A
M
1
c
0
Package Name: qpid
Class Name: session
7627530833415044037
7647849998445955049
Current Sample: Wed Jul 06 23:12:52 CEST 38476878
Object Created: Fri Oct 15 13:01:40 CEST 38476877
Object Deleted: Thu Jan 01 01:00:00 CET 1970
19421773476921348
--------------
A
M
1
i
0
Package Name: qpid
Class Name: queue
1347274480851610151
7548280486574577882
Current Sample: Wed Jul 06 23:16:10 CEST 38476878
Object Created: Fri Oct 15 13:03:14 CEST 38476877
Object Deleted: Thu Jan 01 01:00:00 CET 1970
19421773476921349
------------
A
M
1
h
0
Sun Dec 13 05:38:09 CET 38476882
-------------------------------------

I am wondering if you can give me a sample example to send message to broker so that I can get the schema from broker. I have another queue called "reply" bound on "amq.direct" with the routing key "reply" but dont know how to get the management schema in it (cannt find the example for sending the message to broker to fetch the management information). I have read the qpid management notes and now know how to fetch the schema (in theory) but it will be nice to see the sample.

It will also be nice if you can explain a little about management interface you mentioned.

Also, if you can let me know where I can put my work?
Just to update you, I started working on a ppt file and on documentation for this project.


Thanks in advance.


Best Regards,
Rahul

Rahul,

To get the schema from the broker, there are three protocol exchanges you need to execute:

1) Request the list of schema packages.
2) For each package (or the package of interest), request the list of classes.
3) For each class (or the class of interest), request the schema details.

To send protocol messages to the management broker, create the message with AMQP types via the Java encoder/decoder, then send them to the "qpid.management" exchange using "agent" as the routing key.

Replies will be transmitted according the the key in the replyTo field of the message. Make sure the replyTo attribute is set on the message (setJMSReplyTo) to amq.direct/reply.

Here are the protocol references (see http://cwiki.apache.org/confluence/display/qpid/Management+Design+notes for protocol details):

1) Request packages by sending a "Package Query" message. You will receive a "Package Indication" message on your reply queue for each package known to the broker. The "qpid" package contains classes for the broker itself.

2) Request classes-per-package by sending a "Class Query" message. You will receive a "Class Indication" message for each class in the package. Note that a class is identified by the following tuple: (package-name, class-name, class-hash). The hash is included because there may be more than one version of the schema for a particular class.

3) To request the schema details for a class, send a "Schema Request" message to the broker. A "Schema Response" message will be sent in reply which contains the details of the class schema.

If you have further questions, don't hesitate to ask.

Regards,

-Ted

?

Reply via email to