summaryrefslogtreecommitdiff
path: root/qpid/doc/book/src/Management-Design-notes.xml
blob: 76f0dac92623c233c22906fe9ab141063c9a3f3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
<?xml version="1.0" encoding="utf-8"?>
<!--
 
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at
 
   http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 
-->

<section><title>
      Management Design notes
    </title><section role="h2" id="ManagementDesignnotes-StatusofThisDocument"><title>
            Status
            of This Document
          </title>

	 <para>
            This document does not track any current development activity. It
            is the specification of the management framework implemented in
            the M3 release of the C++ broker and will be left here for user
            and developer reference.
          </para><para>
            Development continues on the Qpid Management Framework (QMF) for
            M4. If you are using M3, this is the document you need. If you
            are using the SVN trunk, please refer to <xref linkend="qpid_Qpid-Management-Framework"/> for
            up-to-date information.
          </para>
	<!--h2--></section>

	  <section role="h2" id="ManagementDesignnotes-Introduction"><title>
            Introduction
          </title>

	 <para>
            This document describes the management features that are used in
            the QPID C++ broker as of the M3 milestone. These features do not
            appear in earlier milestones nor are they implemented in the Java
            broker.
          </para><para>
            This specification is <emphasis>not</emphasis> a standard and is not endorsed
            by the AMQP working group. When such a standard is adopted, the
            QPID implementation will be brought into compliance with that
            standard.
          </para>
	  <!--h2--></section>

	  <section role="h2" id="ManagementDesignnotes-Links"><title>
            Links
          </title>

	 <itemizedlist>
            <listitem><para>The schema is checked into <xref linkend="qpid_management-schema.xml"/>.
            </para></listitem>
          </itemizedlist><section role="h3" id="ManagementDesignnotes-DesignnoteforgettinginfoinandoutviaJMX"><title>
            Design
            note for getting info in and out via JMX
          </title>

	 <para>
            <xref linkend="qpid_JMX-Gateway"/>
          </para>
	<!--h3--></section>

	  <!--h2--></section>

	  <section role="h2" id="ManagementDesignnotes-ManagementRequirements"><title>
            Management
            Requirements
          </title>

	 <itemizedlist>
            <listitem><para>Must operate from a formally defined management schema.
            </para></listitem>
            <listitem><para>Must natively use the AMQP protocol and its type system.
            </para></listitem>
            <listitem><para>Must support the following operations
              <itemizedlist>
                <listitem><para>SET operation on configurable (persistent) aspects of
                objects
                </para></listitem>
                <listitem><para>GET operation on all aspects of objects
                </para></listitem>
                <listitem><para>METHOD invocation on schema-defined object-specific
                methods
                </para></listitem>
                <listitem><para>Distribution of unsolicited periodic updates of
                instrumentation data
                  <itemizedlist>
                    <listitem><para>Data updates shall carry an accurate sample timestamp
                    for rate calculation
                    </para></listitem>
                    <listitem><para>Updates shall carry object create/delete timestamps.
                    </para></listitem>
                    <listitem><para>Transient objects shall be fully accounted for via
                    updates. Note that short-lived transient objects may come
                    and go within a single update interval. All of the
                    information pertaining to such an object must be captured
                    and transmitted.
                    </para></listitem>
                  </itemizedlist>
                </para></listitem>
                <listitem><para>Distribution of unsolicited event and/or alert
                indications (schema defined)
                </para></listitem>
              </itemizedlist>
            </para></listitem>
            <listitem><para>Role-based access control at object, operation, and method
            granularity
            </para></listitem>
            <listitem><para>End-to-end encryption and signing of management content
            </para></listitem>
            <listitem><para>Schema must be self-describing so the management client need
            not have prior knowledge of the management model of the system
            under management.
            </para></listitem>
            <listitem><para>Must be extensible to support the management of objects
            beyond the QPID component set. This allows AMQP to be used as a
            general-purpose management protocol.
            </para></listitem>
          </itemizedlist>
	  <!--h2--></section>

	  <section role="h2" id="ManagementDesignnotes-DefinitionofTerms"><title>
            Definition
            of Terms
          </title>

	 <table><title/><tgroup cols="2">
            <tbody>
              <row>
                <entry>
                  class
                </entry>
                <entry>
                  A type definition for a manageable object.
                </entry>
              </row>
              <row>
                <entry>
                  package
                </entry>
                <entry>
                  A grouping of class definitions that are related to a
                  single software component. The package concept is used to
                  extend the management schema beyond just the QPID software
                  components.
                </entry>
              </row>
              <row>
                <entry>
                  object
                </entry>
                <entry>
                  Also "manageable object". An instantiation of a class. An
                  object represents a physical or logical component in the
                  core function of the system under management.
                </entry>
              </row>
              <row>
                <entry>
                  property
                </entry>
                <entry>
                  A typed member of a class which represents a configurable
                  attribute of the class. In general, properties don't change
                  frequently or may not change at all.
                </entry>
              </row>
              <row>
                <entry>
                  statistic
                </entry>
                <entry>
                  A typed member of a class which represents an
                  instrumentation attribute of the class. Statistics are
                  always read-only in nature and tend to change rapidly.
                </entry>
              </row>
              <row>
                <entry>
                  method
                </entry>
                <entry>
                  A member of a class which represents a callable procedure
                  on an object of the class. Methods may have an arbitrary
                  set of typed arguments and may supply a return code.
                  Methods typically have side effects on the associated
                  object.
                </entry>
              </row>
              <row>
                <entry>
                  event
                </entry>
                <entry>
                  A member of a class which represents the occurence of an
                  event of interest within the system under management.
                </entry>
              </row>
              <row>
                <entry>
                  management broker
                </entry>
                <entry>
                  A software component built into the messaging broker that
                  handles management traffic and distributes management data.
                </entry>
              </row>
              <row>
                <entry>
                  management agent
                </entry>
                <entry>
                  A software component that is separate from the messaging
                  broker, connected to the management broker via an AMQP
                  connection, which allows any software component to be
                  managed remotely by QPID.
                </entry>
              </row>
            </tbody>
          </tgroup></table>
	  <!--h2--></section>


	  <section role="h2" id="ManagementDesignnotes-OperationalScenarios-3ABasicvs.Extended"><title>
            Operational
            Scenarios: Basic vs. Extended
          </title>

	 <para>
            The extensibility requirement introduces complexity to the
            management protocol that is unnecessary and undesirable for the
            user/developer that wishes only to manage QPID message brokers.
            For this reason, the protocol is partitioned into two parts: The
            <emphasis>basic protocol</emphasis>, which contains only the capability to
            manage a single broker; and the <emphasis>extended protocol</emphasis>, which
            provides the hooks for managing an extended set of components. A
            management console can be implemented using only the basic
            protocol if the extended capabilities are not needed.
          </para>
<!--h2--></section>


	  <section role="h2" id="ManagementDesignnotes-ArchitecturalFramework"><title>
            Architectural
            Framework
          </title>

	 <para>
            <xref linkend="qpid_qmf_architecture"/>
          </para>
	  <!--h2--></section>

	  <section role="h2" id="ManagementDesignnotes-TheManagementExchange"><title>
            The
            Management Exchange
          </title>

	 <para>
            The management exchange (called "qpid.management" currently) is a
            special type of exchange used for remote management access to the
            Qpid broker. The management exchange is an extension of the
            standard "Topic" exchange. It behaves like a topic exchange with
            the following exceptions:
          </para><orderedlist>
            <listitem><para>When a queue is successfully bound to the exchange, a method
            is invoked on the broker's management agent to notify it of the
            presence of a new remote managment client.
            </para></listitem>
            <listitem><para>When messages arrive at the exchange for routing, the
            exchange examines the message's routing key and if the key
            represents a management command or method, it routes it directly
            to the management agent rather than routing it to queues using
            the topic algorithm.
              The management exchange is used by the management agent to
              distribute unsolicited management data. Such data is classified
              by the routing key allowing management clients to register for
              only the data they need.
            </para></listitem>
          </orderedlist><section role="h3" id="ManagementDesignnotes-RoutingKeyStructure"><title>
            Routing
            Key Structure
          </title>

	 <para>
            As noted above, the structure of the binding and routing keys
            used on the management exchange is important to the function of
            the management architecture. The routing key of a management
            message determines:
          </para><orderedlist>
            <listitem><para>The type of message (i.e. operation request or unsolicited
            update).
            </para></listitem>
            <listitem><para>The class of the object that the message pertains to.
            </para></listitem>
            <listitem><para>The specific operation or update type.
            </para></listitem>
            <listitem><para>The namespace in which the class belongs. This allows for
            plug-in expansion of the management schema for manageable objects
            that are outside of the broker itself.
            </para></listitem>
          </orderedlist><para>
            Placing this information in the routing key provides the ability
            to enforce access control at class, operation, and method
            granularity. It also separates the command structure from the
            content of the management message (i.e. element values) allowing
            the content to be encrypted and signed end-to-end while still
            allowing access control at the message-transport level. This
            means that special access control code need not be written for
            the management agent.
            There are two general types of routing/binding key:
          </para><itemizedlist>
            <listitem><para>
              <emphasis>Command</emphasis> messages use the key:
              agent.&lt;bank#&gt; or broker
            </para></listitem>
            <listitem><para>
              <emphasis>Unsolicited</emphasis> keys have the structure:
              mgmt.&lt;agent&gt;.&lt;type&gt;.&lt;package&gt;.&lt;class&gt;.&lt;severity&gt;
              where
              <itemizedlist>
                <listitem><para>
                  &lt;agent&gt; is the uuid of the originating
                  management agent,
                </para></listitem>
                <listitem><para>
                  &lt;type&gt; is one of "schema", "prop", "stat",
                  or "event",
                </para></listitem>
                <listitem><para>
                  &lt;package&gt; is the namespace in which the
                  &lt;class&gt; name is valid, and
                </para></listitem>
                <listitem><para>
                  &lt;class&gt; is the name of the class as defined
                  in the schema.
                </para></listitem>
                <listitem><para>
                  &lt;severity&gt; is relevant for events only. It
                  is one of "critical", "error", "warning", or "info".
                </para></listitem>
              </itemizedlist>
            </para></listitem>
          </itemizedlist><para>
            In both cases, the content of the message (i.e. method arguments,
            element values, etc.) is carried in the body segment of the
            message.
          </para><para>
            The &lt;package&gt; namespace allows this management
            framework to be extended with the addition of other software
            packages.
          </para>
	<!--h3--></section>
	<!--h2--></section>

	  <section role="h2" id="ManagementDesignnotes-TheProtocol"><title>
            The Protocol
          </title>

	 <section role="h3" id="ManagementDesignnotes-ProtocolHeader"><title>
            Protocol
            Header
          </title>

	 <para>
            The body segments of management messages are composed of
            sequences of binary-encoded data fields, in a manner consistent
            with the 0-10 version of the AMQP specification.
          </para><para>
            All management messages begin with a message header:
          </para>
            <programlisting>
          octet 0      1         2         3         4         5         6         7
        +---------+---------+---------+---------+---------+---------+---------+---------+
        |   'A'   |   'M'   |   '1'   | op-code |                sequence               |
        +---------+---------+---------+---------+---------+---------+---------+---------+
</programlisting>
          <para>
            The first three octets contain the protocol <emphasis>magic number</emphasis>
            "AM1" which is used to identify the type and version of the
            message.
          </para><para>
            The <emphasis>opcode</emphasis> field identifies the operation represented by
            the message
          </para>
	 <!--h3--></section>

	  <section role="h3" id="ManagementDesignnotes-ProtocolExchangePatterns"><title>
            Protocol
            Exchange Patterns
          </title>

	 <para>
            The following patterns are followed in the design of the
            protocol:
          </para><itemizedlist>
            <listitem><para>Request-Response
            </para></listitem>
            <listitem><para>Query-Indication
            </para></listitem>
            <listitem><para>Unsolicited Indication
            </para></listitem>
          </itemizedlist><section role="h4" id="ManagementDesignnotes-TheRequestResponsePattern"><title>
            The
            Request-Response Pattern
          </title>

	 <para>
            In the request-response pattern, a requestor sends a
            <emphasis>request</emphasis> message to one of its peers. The peer then does
            one of two things: If the request can be successfully processed,
            a single <emphasis>response</emphasis> message is sent back to the requestor.
            This response contains the requested results and serves as the
            positive acknowledgement that the request was successfully
            completed.
          </para><para>
            If the request cannot be successfully completed, the peer sends a
            <emphasis>command complete</emphasis> message back to the requestor with an
            error code and error text describing what went wrong.
          </para><para>
            The sequence number in the <emphasis>response</emphasis> or <emphasis>command
            complete</emphasis> message is the same as the sequence number in the
            <emphasis>request</emphasis>.
          </para>
            <programlisting>
    Requestor                                                          Peer
        |                                                               |
        | --- Request (seq) ------------------------------------------&gt; |
        |                                                               |
        | &lt;----------------------------------------- Response (seq) --- |
        |                                                               |
</programlisting>
          
            <programlisting>
    Requestor                                                          Peer
        |                                                               |
        | --- Request (seq) ------------------------------------------&gt; |
        |                                                               |
        | &lt;-------------------------- Command Complete (seq, error) --- |
        |                                                               |
</programlisting>
<!--h4--></section>

          <section role="h4" id="ManagementDesignnotes-TheQueryIndicationPattern"><title>
            The
            Query-Indication Pattern
          </title>

	 <para>
            The query-indication pattern is used when there may be zero or
            more answers to a question. In this case, the requestor sends a
            <emphasis>query</emphasis> message to its peer. The peer processes the query,
            sending as many <emphasis>indication</emphasis> messages as needed back to the
            requestor (zero or more). Once the last <emphasis>indication</emphasis> has
            been sent, the peer then sends a <emphasis>command complete</emphasis> message
            with a success code indicating that the query is complete.
          </para><para>
            If there is an error in the <emphasis>query</emphasis>, the peer may reply with
            a <emphasis>command complete</emphasis> message containg an error code. In this
            case, no <emphasis>indication</emphasis> messages may be sent.
          </para><para>
            All <emphasis>indication</emphasis> and <emphasis>command complete</emphasis> messages shall
            have the same sequence number that appeared in the <emphasis>query</emphasis>
            message.
          </para>
            <programlisting>
    Requestor                                                          Peer
        |                                                               |
        | --- Query (seq) --------------------------------------------&gt; |
        |                                                               |
        | &lt;--------------------------------------- Indication (seq) --- |
        | &lt;--------------------------------------- Indication (seq) --- |
        | &lt;--------------------------------------- Indication (seq) --- |
        | &lt;--------------------------------------- Indication (seq) --- |
        | &lt;--------------------------------------- Indication (seq) --- |
        |                                                               |
        | &lt;------------------------ Command Complete (seq, success) --- |
        |                                                               |
</programlisting>
          
            <programlisting>
    Requestor                                                          Peer
        |                                                               |
        | --- Query (seq) --------------------------------------------&gt; |
        |                                                               |
        | &lt;-------------------------- Command Complete (seq, error) --- |
        |                                                               |
</programlisting>
<!--h4--></section>

          <section role="h4" id="ManagementDesignnotes-TheUnsolicitedIndicationPattern"><title>
            The
            Unsolicited-Indication Pattern
          </title>

	 <para>
            The unsolicited-indication pattern is used when one peer needs to
            send unsolicited information to another peer, or to broadcast
            information to multiple peers via a topic exchange. In this case,
            indication messages are sent with the sequence number field set
            to zero.
          </para>
            <programlisting>
      Peer                                                             Peer
        |                                                               |
        | &lt;----------------------------------- Indication (seq = 0) --- |
        | &lt;----------------------------------- Indication (seq = 0) --- |
        | &lt;----------------------------------- Indication (seq = 0) --- |
        | &lt;----------------------------------- Indication (seq = 0) --- |
        |                                                               |
</programlisting>
<!--h4--></section>
<!--h3--></section>

          <section role="h3" id="ManagementDesignnotes-ObjectIdentifiers"><title>
            Object
            Identifiers
          </title>

	 <para>
            Manageable objects are tagged with a unique 64-bit object
            identifier. The object identifier space is owned and managed by
            the management broker. Objects managed by a single management
            broker shall have unique object identifiers. Objects managed by
            separate management brokers may have the same object identifier.
          </para><para>
            If a management console is designed to manage multiple management
            brokers, it must use the broker identifier as well as the object
            identifier to ensure global uniqueness.
          </para>
            <programlisting>
           62         48 47                   24 23                    0
        +-+-------------+-----------------------+-----------------------+
        |0|   sequence  |         bank          |        object         |
        +-+-------------+-----------------------+-----------------------+

        bit  63        - reserved, must be zero
        bits 63 .. 48  - broker boot sequence (32K)
        bits 47 .. 24  - bank (16M)
        bits 23 .. 0   - object (16M)
</programlisting>
          <itemizedlist>
            <listitem><para>For persistent IDs, boot-sequence is zero
            </para></listitem>
            <listitem><para>For non-persistent IDs, boot sequence is a constant number
            which increments each time the management broker is restarted.
            </para></listitem>
            <listitem><para>Bank number:
              <itemizedlist>
                <listitem><para>0 - reserved
                </para></listitem>
                <listitem><para>1 - broker-persistent objects
                </para></listitem>
                <listitem><para>2..4 - store-persistent objects
                </para></listitem>
                <listitem><para>&gt; 4 - transient objects
                </para></listitem>
              </itemizedlist>
            </para></listitem>
          </itemizedlist>
<!--h3--></section>


	  <section role="h3" id="ManagementDesignnotes-EstablishingCommunicationBetweenClientandAgent"><title>
            Establishing Communication Between Client and Agent
          </title>

	 <para>
            Communication is established between the management client and
            management agent using normal AMQP procedures. The client creates
            a connection to the broker and then establishes a session with
            its corresponding channel.
          </para><para>
            Two private queues are then declared (only one if method
            invocation is not needed). A management queue is declared and
            bound to the qpid.management exchange. If the binding key is
            "mgmt.#", all management-related messages sent to the exchange
            will be received by this client. A more specific binding key will
            result in a more restricted set of messages being received (see
            the section on Routing Key Structure below).
          </para><para>
            If methods are going to be invoked on managed objects, a second
            private queue must be declared so the client can receive method
            replies. This queue is bound to the amq.direct exchange using a
            routing key equal to the name of the queue.
          </para><para>
            When a client successfully binds to the qpid.management exchange,
            the management agent schedules a schema broadcast to be sent to
            the exchange. The agent will publish, via the exchange, a
            description of the schema for all manageable objects in its
            control.
          </para>
            <programlisting>
      Client                                                          Broker
        |                                                               |
        | --- AMQP Connection and Session Setup ----------------------&gt; |
        |                                                               |
        | --- Queue.declare (private data queue) ---------------------&gt; |
        | --- Bind queue to exchange 'qpid.management' key 'mgmt.#' --&gt; |
        |                                                               |
        | --- Queue.declare (private method-reply queue) -------------&gt; |
        | --- Bind queue to exchange 'amq.direct' --------------------&gt; |
        |                                                               |
        | --- Broker Request -----------------------------------------&gt; |
        | &lt;---------------------------------------- Broker Response --- |
        |                                                               |
        |                                                               |
        |                                                               |
        | &lt;------- Management schema via exchange 'qpid.management' --- |
        |                                                               |
</programlisting>
<!--h3--></section>

          <section role="h3" id="ManagementDesignnotes-BroadcastofConfigurationandInstrumentationUpdates"><title>
            Broadcast of Configuration and Instrumentation Updates
          </title>

	 <para>
            The management agent will periodically publish updates to the
            configuration and instrumentation of management objects under its
            control. Under normal circumstances, these updates are published
            only if they have changed since the last time they were
            published. Configuration updates are only published if
            configuration has changed and instrumentation updates are only
            published if instrumentation has changed. The exception to this
            rule is that after a management client binds to the
            qpid.management exchange, all configuration and instrumentation
            records are published as though they had changed whether or not
            they actually did.
          </para>
            <programlisting>
      Client                                                          Broker
        |                                                               |
        | &lt;------------------ Object properties via 'mgmt.*.prop.#' --- | |
        | &lt;------------------ Object statistics via 'mgmt.*.stat.#' --- | |
        |                                                               | |
        |                                                               | | Publish Interval
        |                                                               | |
        |                                                               | |
        |                                                               | V
        | &lt;------------------ Object properties via 'mgmt.*.prop.#' --- |
        | &lt;------------------ Object statistics via 'mgmt.*.stat.#' --- |
        |                                                               |
</programlisting>
<!--h3--></section>

          <section role="h3" id="ManagementDesignnotes-InvokingaMethodonaManagedObject"><title>
            Invoking
            a Method on a Managed Object
          </title>

	 <para>
            When the management client wishes to invoke a method on a managed
            object, it sends a method request message to the qpid.management
            exchange. The routing key contains the object class and method
            name (refer to Routing Key Structure below). The method request
            must have a header entry (reply-to) that contains the name of the
            method-reply queue so that the method response can be properly
            routed back to the requestor.
          </para><para>
            The method request contains a sequence number that is copied to
            the method reply. This number is opaque to the management agent
            and may be used by the management client to correlate the reply
            to the request. The asynchronous nature of requests and replies
            allows any number of methods to be in-flight at a time. Note that
            there is no guarantee that methods will be replied to in the
            order in which they were requested.
          </para>
            <programlisting>
      Client                                                          Broker
        |                                                               |
        | --- Method Request (to exchange 'qpid.management') ---------&gt; |
        |                                                               |
        |                                                               |
        | &lt;--------------- Method Reply (via exchange 'amq.direct') --- |
        |                                                               |
</programlisting>
<!--h3--></section>


          <section role="h3" id="ManagementDesignnotes-MessagesfortheBasicScenario"><title>
            Messages
            for the Basic Scenario
          </title>

	 <para>
            The principals in a management exchange are the <emphasis>management
            client</emphasis> and the <emphasis>management agent</emphasis>. The management
            agent is integrated into the QPID broker and the management
            client is a remote entity. A management agent may be managed by
            zero or more management clients at any given time. Additionally,
            a management client may manage multiple management agents at the
            same time.
          </para><para>
            For authentication and access control, management relies on the
            mechanisms supplied by the AMQP protocol.
          </para><section role="h4" id="ManagementDesignnotes-BasicOpcodes"><title>
            Basic Opcodes
          </title>

	 <table><title/><tgroup cols="3">
            <tbody>
              <row>
                <entry>
                  <emphasis>opcode</emphasis>
                </entry>
                <entry>
                  <emphasis>message</emphasis>
                </entry>
                <entry>
                  <emphasis>description</emphasis>
                </entry>
              </row>
              <row>
                <entry>
                  'B'
                </entry>
                <entry>
                  Broker Request
                </entry>
                <entry>
                  This message contains a broker request, sent from the
                  management console to the broker to initiate a management
                  session.
                </entry>
              </row>
              <row>
                <entry>
                  'b'
                </entry>
                <entry>
                  Broker Response
                </entry>
                <entry>
                  This message contains a broker response, sent from the
                  broker in response to a broker request message.
                </entry>
              </row>
              <row>
                <entry>
                  'z'
                </entry>
                <entry>
                  Command Completion
                </entry>
                <entry>
                  This message is sent to indicate the completion of a
                  request.
                </entry>
              </row>
              <row>
                <entry>
                  'Q'
                </entry>
                <entry>
                  Class Query
                </entry>
                <entry>
                  Class query messages are used by a management console to
                  request a list of schema classes that are known by the
                  management broker.
                </entry>
              </row>
              <row>
                <entry>
                  'q'
                </entry>
                <entry>
                  Class Indication
                </entry>
                <entry>
                  Sent by the management broker, a class indication notifies
                  the peer of the existence of a schema class.
                </entry>
              </row>
              <row>
                <entry>
                  'S'
                </entry>
                <entry>
                  Schema Request
                </entry>
                <entry>
                  Schema request messages are used to request the full schema
                  details for a class.
                </entry>
              </row>
              <row>
                <entry>
                  's'
                </entry>
                <entry>
                  Schema Response
                </entry>
                <entry>
                  Schema response message contain a full description of the
                  schema for a class.
                </entry>
              </row>
              <row>
                <entry>
                  'h'
                </entry>
                <entry>
                  Heartbeat Indication
                </entry>
                <entry>
                  This message is published once per publish-interval. It can
                  be used by a client to positively determine which objects
                  did not change during the interval (since updates are not
                  published for objects with no changes).
                </entry>
              </row>
              <row>
                <entry>
                  'c', 'i', 'g'
                </entry>
                <entry>
                  Content Indication
                </entry>
                <entry>
                  This message contains a content record. Content records
                  contain the values of all properties or statistics in an
                  object. Such records are broadcast on a periodic interval
                  if 1) a change has been made in the value of one of the
                  elements, or 2) if a new management client has bound a
                  queue to the management exchange.
                </entry>
              </row>
              <row>
                <entry>
                  'G'
                </entry>
                <entry>
                  Get Query
                </entry>
                <entry>
                  Sent by a management console, a get query requests that the
                  management broker provide content indications for all
                  objects that match the query criteria.
                </entry>
              </row>
              <row>
                <entry>
                  'M'
                </entry>
                <entry>
                  Method Request
                </entry>
                <entry>
                  This message contains a method request.
                </entry>
              </row>
              <row>
                <entry>
                  'm'
                </entry>
                <entry>
                  Method Response
                </entry>
                <entry>
                  This message contains a method result.
                </entry>
              </row>
            </tbody>
          </tgroup></table>
<!--h4--></section>

	  <section role="h4" id="ManagementDesignnotes-BrokerRequestMessage"><title>
            Broker
            Request Message
          </title>

	 <para>
            When a management client first establishes contact with the
            broker, it sends a Hello message to initiate the exchange.
          </para>
            <programlisting>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '1' | 'B' |           0           |
        +-----+-----+-----+-----+-----------------------+
</programlisting>
          <para>
            The Broker Request message has no payload.
          </para>
<!--h4--></section>

	  <section role="h4" id="ManagementDesignnotes-BrokerResponseMessage"><title>
            Broker
            Response Message
          </title>

	 <para>
            When the broker receives a Broker Request message, it responds
            with a Broker Response message. This message contains an
            identifier unique to the broker.
          </para>
            <programlisting>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '1' | 'b' |           0           |
        +-----+-----+-----+-----+-----------------------+----------------------------+
        | brokerId (uuid)                                                            |
        +----------------------------------------------------------------------------+
</programlisting>
<!--h4--></section>

          <section role="h4" id="ManagementDesignnotes-CommandCompletionMessage"><title>
            Command
            Completion Message
          </title>

	 
            <programlisting>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '1' | 'z' |          seq          |
        +-----+-----+-----+-----+-----------------------+
        |  Completion Code      |
        +-----------------------+-----------------------------------------+
        |  Completion Text                                                |
        +-----------------------------------------------------------------+
</programlisting>
<!--h4--></section>


          <section role="h4" id="ManagementDesignnotes-ClassQuery"><title>
            Class Query
          </title>
	 
            <programlisting>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '1' | 'Q' |          seq          |
        +-----+-----+-----+-----+-----------------------+----------+
        |  package name (str8)                                     |
        +----------------------------------------------------------+
</programlisting>
<!--h4--></section>


          <section role="h4" id="ManagementDesignnotes-ClassIndication"><title>
            Class
            Indication
          </title>

	 
            <programlisting>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '1' | 'q' |          seq          |
        +-----+-----+-----+-----+-----------------------+----------+
        |  package name (str8)                                     |
        +----------------------------------------------------------+
        |  class name (str8)                                       |
        +----------------------------------------------------------+
        |  schema hash (bin128)                                    |
        +----------------------------------------------------------+
</programlisting>
<!--h4--></section>


          <section role="h4" id="ManagementDesignnotes-SchemaRequest"><title>
            Schema Request
          </title>

	 
            <programlisting>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '1' | 'S' |          seq          |
        +-----+-----+-----+-----+-----------------------+----------+
        |                packageName (str8)                        |
        +----------------------------------------------------------+
        |                className (str8)                          |
        +----------------------------------------------------------+
        |                schema-hash (bin128)                      |
        +----------------------------------------------------------+
</programlisting>
<!--h4--></section>

          <section role="h4" id="ManagementDesignnotes-SchemaResponse"><title>
            Schema
            Response
          </title>
	 
            <programlisting>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '1' | 's' |          seq          |
        +-----+-----+-----+-----+-----------------------+----------+
        |                packageName (str8)                        |
        +----------------------------------------------------------+
        |                className (str8)                          |
        +----------------------------------------------------------+
        |                schema-hash (bin128)                      |
        +-----------+-----------+-----------+-----------+----------+
        | propCnt   | statCnt   | methodCnt | eventCnt  |
        +-----------+-----------+-----------+-----------+----------------------------+
        | propCnt property records                                                   |
        +----------------------------------------------------------------------------+
        | statCnt statistic records                                                  |
        +----------------------------------------------------------------------------+
        | methodCnt method records                                                   |
        +----------------------------------------------------------------------------+
        | eventCnt event records                                                     |
        +----------------------------------------------------------------------------+
</programlisting>
          <para>
            Each <emphasis>property</emphasis> record is an AMQP map with the following
            fields. Optional fields may optionally be omitted from the map.
          </para><table><title/><tgroup cols="3">
            <tbody>
              <row>
                <entry>
                  <emphasis>field name</emphasis>
                </entry>
                <entry>
                  <emphasis>optional</emphasis>
                </entry>
                <entry>
                  <emphasis>description</emphasis>
                </entry>
              </row>
              <row>
                <entry>
                  name
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  Name of the property
                </entry>
              </row>
              <row>
                <entry>
                  type
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  Type code for the property
                </entry>
              </row>
              <row>
                <entry>
                  access
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  Access code for the property
                </entry>
              </row>
              <row>
                <entry>
                  index
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  1 = index element, 0 = not an index element
                </entry>
              </row>
              <row>
                <entry>
                  optional
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  1 = optional element (may be not present), 0 = mandatory
                  (always present)
                </entry>
              </row>
              <row>
                <entry>
                  unit
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  Units for numeric values (i.e. seconds, bytes, etc.)
                </entry>
              </row>
              <row>
                <entry>
                  min
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  Minimum value for numerics
                </entry>
              </row>
              <row>
                <entry>
                  max
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  Maximum value for numerics
                </entry>
              </row>
              <row>
                <entry>
                  maxlen
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  Maximum length for strings
                </entry>
              </row>
              <row>
                <entry>
                  desc
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  Description of the property
                </entry>
              </row>
            </tbody>
          </tgroup></table><para>
            Each <emphasis>statistic</emphasis> record is an AMQP map with the following
            fields:
          </para><table><title/><tgroup cols="3">
            <tbody>
              <row>
                <entry>
                  <emphasis>field name</emphasis>
                </entry>
                <entry>
                  <emphasis>optional</emphasis>
                </entry>
                <entry>
                  <emphasis>description</emphasis>
                </entry>
              </row>
              <row>
                <entry>
                  name
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  Name of the statistic
                </entry>
              </row>
              <row>
                <entry>
                  type
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  Type code for the statistic
                </entry>
              </row>
              <row>
                <entry>
                  unit
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  Units for numeric values (i.e. seconds, bytes, etc.)
                </entry>
              </row>
              <row>
                <entry>
                  desc
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  Description of the statistic
                </entry>
              </row>
            </tbody>
          </tgroup></table><para>
            <emphasis>method</emphasis> and <emphasis>event</emphasis> records contain a main map that
            describes the method or header followed by zero or more maps
            describing arguments. The main map contains the following fields:
          </para><table><title/><tgroup cols="3">
            <tbody>
              <row>
                <entry>
                  <emphasis>field name</emphasis>
                </entry>
                <entry>
                  <emphasis>optional</emphasis>
                </entry>
                <entry>
                  <emphasis>description</emphasis>
                </entry>
              </row>
              <row>
                <entry>
                  name
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  Name of the method or event
                </entry>
              </row>
              <row>
                <entry>
                  argCount
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  Number of argument records to follow
                </entry>
              </row>
              <row>
                <entry>
                  desc
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  Description of the method or event
                </entry>
              </row>
            </tbody>
          </tgroup></table><para>
            Argument maps contain the following fields:
          </para><table><title/><tgroup cols="5">
            <tbody>
              <row>
                <entry>
                  <emphasis>field name</emphasis>
                </entry>
                <entry>
                  <emphasis>method</emphasis>
                </entry>
                <entry>
                  <emphasis>event</emphasis>
                </entry>
                <entry>
                  <emphasis>optional</emphasis>
                </entry>
                <entry>
                  <emphasis>description</emphasis>
                </entry>
              </row>
              <row>
                <entry>
                  name
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  Argument name
                </entry>
              </row>
              <row>
                <entry>
                  type
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  Type code for the argument
                </entry>
              </row>
              <row>
                <entry>
                  dir
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  Direction code for method arguments
                </entry>
              </row>
              <row>
                <entry>
                  unit
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  Units for numeric values (i.e. seconds, bytes, etc.)
                </entry>
              </row>
              <row>
                <entry>
                  min
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  Minimum value for numerics
                </entry>
              </row>
              <row>
                <entry>
                  max
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  Maximum value for numerics
                </entry>
              </row>
              <row>
                <entry>
                  maxlen
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  Maximum length for strings
                </entry>
              </row>
              <row>
                <entry>
                  desc
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  Description of the argument
                </entry>
              </row>
              <row>
                <entry>
                  default
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  Default value for the argument
                </entry>
              </row>
            </tbody>
          </tgroup></table><para>
            <emphasis>type codes</emphasis> are numerics with the following values:
          </para><table><title/><tgroup cols="2">
            <tbody>
              <row>
                <entry>
                  <emphasis>value</emphasis>
                </entry>
                <entry>
                  <emphasis>type</emphasis>
                </entry>
              </row>
              <row>
                <entry>
                  1
                </entry>
                <entry>
                  uint8
                </entry>
              </row>
              <row>
                <entry>
                  2
                </entry>
                <entry>
                  uint16
                </entry>
              </row>
              <row>
                <entry>
                  3
                </entry>
                <entry>
                  uint32
                </entry>
              </row>
              <row>
                <entry>
                  4
                </entry>
                <entry>
                  uint64
                </entry>
              </row>
              <row>
                <entry>
                  6
                </entry>
                <entry>
                  str8
                </entry>
              </row>
              <row>
                <entry>
                  7
                </entry>
                <entry>
                  str16
                </entry>
              </row>
              <row>
                <entry>
                  8
                </entry>
                <entry>
                  absTime(uint64)
                </entry>
              </row>
              <row>
                <entry>
                  9
                </entry>
                <entry>
                  deltaTime(uint64)
                </entry>
              </row>
              <row>
                <entry>
                  10
                </entry>
                <entry>
                  objectReference(uint64)
                </entry>
              </row>
              <row>
                <entry>
                  11
                </entry>
                <entry>
                  boolean(uint8)
                </entry>
              </row>
              <row>
                <entry>
                  12
                </entry>
                <entry>
                  float
                </entry>
              </row>
              <row>
                <entry>
                  13
                </entry>
                <entry>
                  double
                </entry>
              </row>
              <row>
                <entry>
                  14
                </entry>
                <entry>
                  uuid
                </entry>
              </row>
              <row>
                <entry>
                  15
                </entry>
                <entry>
                  map
                </entry>
              </row>
              <row>
                <entry>
                  16
                </entry>
                <entry>
                  int8
                </entry>
              </row>
              <row>
                <entry>
                  17
                </entry>
                <entry>
                  int16
                </entry>
              </row>
              <row>
                <entry>
                  18
                </entry>
                <entry>
                  int32
                </entry>
              </row>
              <row>
                <entry>
                  19
                </entry>
                <entry>
                  int64
                </entry>
              </row>
            </tbody>
          </tgroup></table><para>
            <emphasis>access codes</emphasis> are numerics with the following values:
          </para><table><title/><tgroup cols="2">
            <tbody>
              <row>
                <entry>
                  <emphasis>value</emphasis>
                </entry>
                <entry>
                  <emphasis>access</emphasis>
                </entry>
              </row>
              <row>
                <entry>
                  1
                </entry>
                <entry>
                  Read-Create access
                </entry>
              </row>
              <row>
                <entry>
                  2
                </entry>
                <entry>
                  Read-Write access
                </entry>
              </row>
              <row>
                <entry>
                  3
                </entry>
                <entry>
                  Read-Only access
                </entry>
              </row>
            </tbody>
          </tgroup></table><para>
            <emphasis>direction codes</emphasis> are numerics with the following values:
          </para><table><title/><tgroup cols="2">
            <tbody>
              <row>
                <entry>
                  <emphasis>value</emphasis>
                </entry>
                <entry>
                  <emphasis>direction</emphasis>
                </entry>
              </row>
              <row>
                <entry>
                  1
                </entry>
                <entry>
                  Input (from client to broker)
                </entry>
              </row>
              <row>
                <entry>
                  2
                </entry>
                <entry>
                  Output (from broker to client)
                </entry>
              </row>
              <row>
                <entry>
                  3
                </entry>
                <entry>
                  IO (bidirectional)
                </entry>
              </row>
            </tbody>
          </tgroup></table>
<!--h4--></section>


	  <section role="h4" id="ManagementDesignnotes-HeartbeatIndication"><title>
            Heartbeat
            Indication
          </title>

	 
            <programlisting>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '1' | 'h' |           0           |
        +-----+-----+-----+-----+-----------------------+
        | timestamp of current interval (datetime)      |
        +-----------------------------------------------+
</programlisting>
<!--h4--></section>

          <section role="h4" id="ManagementDesignnotes-ConfigurationandInstrumentationContentMessages"><title>
            Configuration and Instrumentation Content Messages
          </title>

	 <para>
            Content messages are published when changes are made to the
            values of properties or statistics or when new management clients
            bind a queue to the management exchange.
          </para>
            <programlisting>
        +-----+-----+-----+-------+-----------------------+
        | 'A' | 'M' | '1' |'g/c/i'|          seq          |
        +-----+-----+-----+-------+-----------------------+--------+
        |                packageName (str8)                        |
        +----------------------------------------------------------+
        |                className (str8)                          |
        +----------------------------------------------------------+
        |                class hash (bin128)                       |
        +-----+-----+-----+-----+-----+-----+-----+-----+----------+
        | timestamp of current sample (datetime)        |
        +-----+-----+-----+-----+-----+-----+-----+-----+
        | time object was created (datetime)            |
        +-----+-----+-----+-----+-----+-----+-----+-----+
        | time object was deleted (datetime)            |
        +-----+-----+-----+-----+-----+-----+-----+-----+
        | objectId (uint64)                             |
        +-----+-----+-----+-----+-----+-----+-----+-----+
        | presence bitmasks (0 or more uint8 fields)    |
        +-----+-----+-----+-----+-----+-----+-----+-----+------------------------+
        | config/inst values (in schema order)                                   |
        +------------------------------------------------------------------------+
</programlisting>
          <para>
            All timestamps are uint64 values representing nanoseconds since
            the epoch (January 1, 1970). The objectId is a uint64 value that
            uniquely identifies this object instance.
          </para><para>
            If any of the properties in the object are defined as optional,
            there will be 1 or more "presence bitmask" octets. There are as
            many octets as are needed to provide one bit per optional
            property. The bits are assigned to the optional properties in
            schema order (first octet first, lowest order bit first).
          </para><para>
            For example: If there are two optional properties in the schema
            called "option1" and "option2" (defined in that order), there
            will be one presence bitmask octet and the bits will be assigned
            as bit 0 controls option1 and bit 1 controls option2.
          </para><para>
            If the bit for a particular optional property is set (1), the
            property will be encoded normally in the "values" portion of the
            message. If the bit is clear (0), the property will be omitted
            from the list of encoded values and will be considered "NULL" or
            "not present".
          </para><para>
            The element values are encoded by their type into the message in
            the order in which they appeared in the schema message.
          </para>
<!--h4--></section>

	  <section role="h4" id="ManagementDesignnotes-GetQueryMessage"><title>
            Get Query
            Message
          </title>

	 <para>
            A Get Request may be sent by the management console to cause a
            management agent to immediately send content information for
            objects of a class.
          </para>
            <programlisting>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '1' | 'G' |          seq          |
        +-----+-----+-----+-----+-----------------------+----------+
        | Get request field table                                  |
        +----------------------------------------------------------+
</programlisting>
          <para>
            The content of a get request is a field table that specifies what
            objects are being requested. Most of the fields are optional and
            are available for use in more extensive deployments.
          </para><table><title/><tgroup cols="4">
            <tbody>
              <row>
                <entry>
                  <emphasis>Field Key</emphasis>
                </entry>
                <entry>
                  <emphasis>Mandatory</emphasis>
                </entry>
                <entry>
                  <emphasis>Type</emphasis>
                </entry>
                <entry>
                  <emphasis>Description</emphasis>
                </entry>
              </row>
              <row>
                <entry>
                  "_class"
                </entry>
                <entry>
                  yes
                </entry>
                <entry>
                  short-string
                </entry>
                <entry>
                  The name of the class of objects being requested.
                </entry>
              </row>
              <row>
                <entry>
                  "_package"
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  short-string
                </entry>
                <entry>
                  The name of the extension package the class belongs to. If
                  omitted, the package defaults to "qpid" for access to
                  objects in the connected broker.
                </entry>
              </row>
              <row>
                <entry>
                  "_agent"
                </entry>
                <entry>
                  no
                </entry>
                <entry>
                  uuid
                </entry>
                <entry>
                  The management agent that is the target of the request. If
                  omitted, agent defaults to the connected broker.
                </entry>
              </row>
            </tbody>
          </tgroup></table><para>
            When the management agent receives a get request, it sends
            content messages describing the requested objects. Once the last
            content message is sent, it then sends a Command Completion
            message with the same sequence number supplied in the request to
            indicate to the requestor that there are no more messages coming.
          </para>
<!--h4--></section>


	  <section role="h4" id="ManagementDesignnotes-MethodRequest"><title>
            Method Request
          </title>

	 <para>
            Method request messages have the following structure. The
            sequence number is opaque to the management agent. It is returned
            unchanged in the method reply so the calling client can correctly
            associate the reply to the request. The objectId is the unique ID
            of the object on which the method is to be executed.
          </para>
            <programlisting>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '1' | 'M' |          seq          |
        +-----+-----+-----+-----+-----------------------+
        |  objectId (uint64)                            |
        +-----------------------------------------------+
        |  methodName (str8)                            |
        +-----------------------------------------------+------------------------+
        |  input and bidirectional argument values (in schema order)             |
        +------------------------------------------------------------------------+
</programlisting>
<!--h4--></section>

          <section role="h4" id="ManagementDesignnotes-MethodResponse"><title>
            Method
            Response
          </title>

	 <para>
            Method reply messages have the following structure. The sequence
            number is identical to that supplied in the method request. The
            status code (and text) indicate whether or not the method was
            successful and if not, what the error was. Output and
            bidirectional arguments are only included if the status code was
            0 (STATUS_OK).
          </para>
            <programlisting>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '1' | 'm' |          seq          |
        +-----+-----+-----+-----+-----------------------+
        |  status code          |
        +-----------------------+----------------------------------+
        |  status text (str8)                                      |
        +-----------------------+----------------------------------+-------------+
        |  output and bidirectional argument values (in schema order)            |
        +------------------------------------------------------------------------+
</programlisting>
          <para>
            <emphasis>status code</emphasis> values are:
          </para><table><title/><tgroup cols="2">
            <tbody>
              <row>
                <entry>
                  <emphasis>value</emphasis>
                </entry>
                <entry>
                  <emphasis>description</emphasis>
                </entry>
              </row>
              <row>
                <entry>
                  0
                </entry>
                <entry>
                  STATUS_OK - successful completion
                </entry>
              </row>
              <row>
                <entry>
                  1
                </entry>
                <entry>
                  STATUS_UNKNOWN_OBJECT - objectId not found in the agent
                </entry>
              </row>
              <row>
                <entry>
                  2
                </entry>
                <entry>
                  STATUS_UNKNOWN_METHOD - method is not known by the object
                  type
                </entry>
              </row>
              <row>
                <entry>
                  3
                </entry>
                <entry>
                  STATUS_NOT_IMPLEMENTED - method is not currently
                  implemented
                </entry>
              </row>
            </tbody>
          </tgroup></table>
<!--h4--></section>
<!--h3--></section>

	  <section role="h3" id="ManagementDesignnotes-MessagesforExtendedScenario"><title>
            Messages
            for Extended Scenario
          </title>

	 <section role="h4" id="ManagementDesignnotes-ExtendedManagementProtocol"><title>
            Extended
            Management Protocol
          </title>

	 <para>
            Qpid supports management extensions that allow the management
            broker to be a central point for the management of multiple
            external entities with their own management schemas.
          </para>
            <programlisting>
      Broker                                                       Remote Agent
        |                                                               |
        | &lt;----------------------------------------- Attach Request --- |
        | --- Attach Response ----------------------------------------&gt; |
        |                                                               |
        | &lt;------------------------------------- Package Indication --- |
        | &lt;------------------------------------- Package Indication --- |
        |                                                               |
        | &lt;--------------------------------------- Class Indication --- |
        | &lt;--------------------------------------- Class Indication --- |
        | &lt;--------------------------------------- Class Indication --- |
        | &lt;--------------------------------------- Class Indication --- |
        | &lt;--------------------------------------- Class Indication --- |
        |                                                               |
        | --- Schema Request (class key) -----------------------------&gt; |
        | &lt;---------------------------------------- Schema Response --- |
        |                                                               |
        | --- Schema Request (class key) -----------------------------&gt; |
        | &lt;---------------------------------------- Schema Response --- |
        |                                                               |
        |                                                               |
</programlisting>
<!--h4--></section>

          <section role="h4" id="ManagementDesignnotes-ExtendedOpcodes"><title>
            Extended
            Opcodes
          </title>

	 <table><title/><tgroup cols="3">
            <tbody>
              <row>
                <entry>
                  <emphasis>opcode</emphasis>
                </entry>
                <entry>
                  <emphasis>message</emphasis>
                </entry>
                <entry>
                  <emphasis>description</emphasis>
                </entry>
              </row>
              <row>
                <entry>
                  'P'
                </entry>
                <entry>
                  Package Query
                </entry>
                <entry>
                  This message contains a schema package query request,
                  requesting that the broker dump the list of known packages
                </entry>
              </row>
              <row>
                <entry>
                  'p'
                </entry>
                <entry>
                  Package Indication
                </entry>
                <entry>
                  This message contains a schema package indication,
                  identifying a package known by the broker
                </entry>
              </row>
              <row>
                <entry>
                  'A'
                </entry>
                <entry>
                  Agent Attach Request
                </entry>
                <entry>
                  This message is sent by a remote agent when it wishes to
                  attach to a management broker
                </entry>
              </row>
              <row>
                <entry>
                  'a'
                </entry>
                <entry>
                  Agent Attach Response
                </entry>
                <entry>
                  The management broker sends this response if an attaching
                  remote agent is permitted to join
                </entry>
              </row>
              <row>
                <entry>
                  'x'
                </entry>
                <entry>
                  Console Added Indication
                </entry>
                <entry>
                  This message is sent to all remote agents by the management
                  broker when a new console binds to the management exchange
                </entry>
              </row>
            </tbody>
          </tgroup></table>
<!--h4--></section>


	  <section role="h4" id="ManagementDesignnotes-PackageQuery"><title>
            Package Query
          </title>

	 
            <programlisting>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '1' | 'P' |          seq          |
        +-----+-----+-----+-----+-----------------------+
</programlisting>
<!--h4--></section>

          <section role="h4" id="ManagementDesignnotes-PackageIndication"><title>
            Package
            Indication
          </title>

	 
            <programlisting>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '1' | 'p' |          seq          |
        +-----+-----+-----+-----+-----------------------+----------+
        |  package name (str8)                                     |
        +----------------------------------------------------------+
</programlisting>
<!--h4--></section>

          <section role="h4" id="ManagementDesignnotes-AttachRequest"><title>
            Attach Request
          </title>
	 
            <programlisting>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '1' | 'A' |          seq          |
        +-----+-----+-----+-----+-----------------------+----------+
        |  label (str8)                                            |
        +-----------------------+----------------------------------+
        |  system-id (uuid)                                        |
        +-----------------------+----------------------------------+
        |  requested objId bank |
        +-----------------------+
</programlisting>
<!--h4--></section>

          <section role="h4" id="ManagementDesignnotes-AttachResponse-28success-29"><title>
            Attach
            Response (success)
          </title>

	 
            <programlisting>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '1' | 'a' |          seq          |
        +-----+-----+-----+-----+-----------------------+
        |  assigned broker bank |
        +-----------------------+
        |  assigned objId bank  |
        +-----------------------+
</programlisting>
<!--h4--></section>

          <section role="h4" id="ManagementDesignnotes-ConsoleAddedIndication"><title>
            Console Added
            Indication
          </title>

	 
            <programlisting>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '1' | 'x' |          seq          |
        +-----+-----+-----+-----+-----------------------+
</programlisting>
          
            

	  <!--h4--></section>
	   <!--h3--></section>
	   <!--h2--></section>

	 
</section>