Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Please visit the QMFv2 Project Page for information about the future of QMF.

What Is QMF

QMF (Qpid Management Framework) is a general-purpose management bus built on Qpid Messaging. It takes advantage of the scalability, security, and rich capabilities of Qpid to provide flexible and easy-to-use manageability to a large set of applications.

Getting Started with QMF

QMF is used through two primary APIs. The console API is used for console applications that wish to access and manipulate manageable components through QMF. The agent API is used for application that wish to be managed through QMF.

The fastest way to get started with QMF is to work through the "How To" tutorials for consoles and agents. For a deeper understanding of what is happening in the tutorials, it is recommended that you look at the Qmf Concepts section.

QMF Concepts

This section introduces important concepts underlying QMF.

Console, Agent, and Broker

The major architectural components of QMF are the Console, the Agent, and the Broker. Console components are the "managing" components of QMF and agent components are the "managed" parts. The broker is a central (possibly distributed, clustered and fault-tolerant) component that manages name spaces and caches schema information.

...

In the above diagram, the Manageable apps are agents, the CLI utility, Web app, and Audit storage are consoles, and Event correlation is both a console and an agent because it can create events based on the aggregation of what it sees.

Schema

A schema describes the structure of management data. Each agent provides a schema that describes its management model including the object classes, methods, events, etc. that it provides. In the current QMF distribution, the agent's schema is codified in an XML document. In the near future, there will also be ways to programatically create QMF schemata.

Package

Each agent that exports a schema identifies itself using a package name. The package provides a unique namespace for the classes in the agent's schema that prevent collisions with identically named classes in other agents' schemata.

...

Code Block
xml
xml
<schema package="org.apache.qpid.broker">

</schema>

Object Classes

Object classes define types for manageable objects. The agent may create and destroy objects which are instances of object classes in the schema. An object class is defined in the XML document using the <class> tag. An object class is composed of properties, statistics, and methods.

Code Block
xml
xml
  <class name="Exchange">
    <property name="vhostRef"   type="objId" references="Vhost" access="RC" index="y" parentRef="y"/>
    <property name="name"       type="sstr"  access="RC" index="y"/>
    <property name="type"       type="sstr"  access="RO"/>
    <property name="durable"    type="bool"  access="RC"/>
    <property name="arguments"  type="map"   access="RO" desc="Arguments supplied in exchange.declare"/>

    <statistic name="producerCount" type="hilo32"  desc="Current producers on exchange"/>
    <statistic name="bindingCount"  type="hilo32"  desc="Current bindings"/>
    <statistic name="msgReceives"   type="count64" desc="Total messages received"/>
    <statistic name="msgDrops"      type="count64" desc="Total messages dropped (no matching key)"/>
    <statistic name="msgRoutes"     type="count64" desc="Total routed messages"/>
    <statistic name="byteReceives"  type="count64" desc="Total bytes received"/>
    <statistic name="byteDrops"     type="count64" desc="Total bytes dropped (no matching key)"/>
    <statistic name="byteRoutes"    type="count64" desc="Total routed bytes"/>
  </class>

Properties and Statistics

<property> and <statistic> tags must be placed within <schema> and </schema> tags.

...

Attribute

<property>

<statistic>

Meaning

name

Y

Y

The name of the attribute

type

Y

Y

The data type of the attribute

unit

Y

Y

Optional unit name - use the singular (i.e. MByte)

desc

Y

Y

Description to annotate the attribute

references

Y

 

If the type is "objId", names the referenced class

access

Y

 

Access rights (RC, RW, RO)

index

Y

 

"y" if this property is used to uniquely identify the object. There may be more than one index property in a class

parentRef

Y

 

"y" if this property references an object in which this object is in a child-parent relationship.

optional

Y

 

"y" if this property is optional (i.e. may be NULL/not-present)

min

Y

 

Minimum value of a numeric attribute

max

Y

 

Maximum value of a numeric attribute

maxLen

Y

 

Maximum length of a string attribute

Methods

<method> tags must be placed within <schema> and </schema> tags.

...

Code Block
xml
xml
   <method name="echo" desc="Request a response to test the path to the management broker">
     <arg name="sequence" dir="IO" type="uint32"/>
     <arg name="body"     dir="IO" type="lstr"/>
   </method>

Event Classes

Data Types

Object attributes, method arguments, and event arguments have data types. The data types are based on the rich data typing system provided by the AMQP messaging protocol. The following table describes the data types available for QMF:

...

Note
titleImportant

When writing a schema using the XML format, types used in <property> or <arg> must be types that have Direct accessor style. Any type may be used in <statistic> tags.

Class Keys and Class Versioning

The QMF Protocol

The QMF protocol defines the message formats and communication patterns used by the different QMF components to communicate with one another.

...

A proposal for an updated protocol based on map-messages is in progress and can be found at QMF Map Message Protocol.

How to Write a QMF Console

Please see the QMF Python Console Tutorial for information about using the console API with Python.

How to Write a QMF Agent