Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added up-to-date information about routing keys

...

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.

Two A private queues are then declared (only one if method invocation is not needed). A management queue is (exclusive/auto-delete) queue is then declared and bound to the qpid.management exchange. If the A binding with key is "mgmtschema.#" , will subscribe to 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).schema-related information and a second binding with key "console.#" will subscribe to all management data.

A binding must also be established to the "amq.direct" exchange using the queue's name as the binding key. This will be used as a reply-to address for requests sent to the broker and to agentsIf 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.

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.

No Format
      Client                                                             Broker
        |                                                                  |
        | --- AMQP Connection and Session Setup -------------------------> |
        |                                                                  |
        | --- Queue.declare (private data queue) ---------------------> |
        | --- Bind queue to exchange 'qpid.management' key 'mgmt.#' --> |
        |                                             ------------------------> |
        | --- Bind queue to exchange 'qpid.management' key   'schema.#' ---> |
        | --- Queue.declare (private method-reply queue) ------------- Bind queue to exchange 'qpid.management' key 'console.#' --> |
        | --- Bind queue to exchange 'amq.direct' -----------------------> |
        |                                                                  |
        | --- Broker Request --------------------------------------------> |
        | <------------------------------------------- Broker Response --- |
        |                                                                  |
        |                                                                  |
        |                                                                  |
        | <---------- Management schema via exchange 'qpid.management' --- |
        |                                                                  |

Broadcast of Configuration and Instrumentation Updates

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.

No Format
  Client         Client                                                                 Broker
    |    Broker
        |                                                               |
    |
    | <------------------ Object properties via 'mgmt.*.prop.#console.obj.1.<agent-bank>.<package>.<class>' --- | |
        | <------------------ Object statistics via 'mgmt.*.stat.#console.obj.1.<agent-bank>.<package>.<class>' --- | |
    |           |                                                                    | |
    |     |                                                                          | | Publish Interval
 Publish
    |                                         |                                      | | Interval
    |                   | |
        |                                                   | |
    |       | |
        |                                                               | V
        | <------------------ Object properties via 'mgmt.*.prop.#console.obj.1.<agent-bank>.<package>.<class>' --- |
        | <------------------ Object statistics via 'mgmt.*.stat.#console.obj.1.<agent-bank>.<package>.<class>' --- |
    |    |                                                                           |

Invoking a Method on a Managed Object

...

When a management console first establishes contact with the broker, it sends a Broker Request message to initiate the exchange.

No Format
        routing_key: broker
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '2' | 'B' |           0           |
        +-----+-----+-----+-----+-----------------------+

...

When the broker receives a Broker Request message, it responds with a Broker Response message. This message contains an identifier unique to the broker.unique to the broker.

No Format

        routing_key: <reply_to from request>
No Format
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '2' | 'b' |           0           |
        +-----+-----+-----+-----+-----------------------+----------------------------+
        | brokerId (uuid)                                                            |
        +----------------------------------------------------------------------------+

Command Completion Message

No Format
        routing_key: <reply_to from request>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '2' | 'z' |          seq          |
        +-----+-----+-----+-----+----+------------------+
        |  Completion Code (uint32)  |
        +----------------------------+------------------------------------+
        |  Completion Text (str8)                                         |
        +-----------------------------------------------------------------+

Class Query

No Format

        routing_key: broker
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '2' | 'Q' |          seq          |
        +-----+-----+-----+-----+-----------------------+----------+
        |  package name (str8)                                     |
        +----------------------------------------------------------+

Class Indication

No Format
        routing_key: <reply_to from request> (if in reply to a request)
                     schema.package          (if unsolicited)
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '2' | 'q' |          seq          |
        +-----+-----+-----+-----+---------------+-------+
        | class kind (uint8) 1=Object, 2=Event  |
        +---------------------------------------+------------------+
        | package name (str8)                                      |
        +----------------------------------------------------------+
        | class name (str8)                                        |
        +----------------------------------------------------------+
        | schema hash (bin128)                                     |
        +----------------------------------------------------------+

Schema Request

No Format

        routing_key: broker
No Format
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '2' | 'S' |          seq          |
        +-----+-----+-----+-----+-----------------------+----------+
        | packageName (str8)                                       |
        +----------------------------------------------------------+
        | className (str8)                                         |
        +----------------------------------------------------------+
        | schema-hash (bin128)                                     |
        +----------------------------------------------------------+

Schema Response

No Format

        routing_key: <reply_to from request> (if in reply to a request)
                     schema.package          (if unsolicited)
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '2' | 's' |          seq          |
        +-----+-----+-----+-----+------------+----------+
        | kind (uint8) 1=Object, 2=Event     |
        +------------------------------------+---------------------+
        | packageName (str8)                                       |
        +----------------------------------------------------------+
        | className (str8)                                         |
        +----------------------------------------------------------+
        | schema-hash (bin128)                                     |
        +-----------------------------------------------+----------+
        | propCount (uint16)                            |
        +-----------------------------------------------+
        | statCount (uint16)                            |
        +-----------------------------------------------+
        | methodCount (uint16)                          |
        +-----------------------------------------------+----------------------------+
        | propCount property records                                                 |
        +----------------------------------------------------------------------------+
        | statCount statistic records                                                |
        +----------------------------------------------------------------------------+
        | methodCount method records                                                 |
        +----------------------------------------------------------------------------+

...

Heartbeat Indication

No Format
        routing_key: console.heartbeat.1.<agent_bank>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '2' | 'h' |           0           |
        +-----+-----+-----+-----+-----------------------+
        | timestamp of current interval (datetime)      |
        +-----------------------------------------------+

...

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.a queue to the management exchange.

No Format

        for 'g':     routing_key: <reply_to from request>
        for 'c','i': routing_key: console.obj.1.<agent_bank>.<package_name>.<class_name>
No Format
        +-----+-----+-----+-------+-----------------------+
        | 'A' | 'M' | '2' |'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 (bin128)                             |
        +-----+-----+-----+-----+-----+-----+-----+-----+
        | presence bitmasks (0 or more uint8 fields)    |
        +-----+-----+-----+-----+-----+-----+-----+-----+------------------------+
        | config/inst values (in schema order)                                   |
        +------------------------------------------------------------------------+

...

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.

No Format
        routing_key: agent.1.<agent_bank>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '2' | 'G' |          seq          |
        +-----+-----+-----+-----+-----------------------+----------+
        | Get request field table (map)                            |
        +----------------------------------------------------------+

...

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.

No Format
        routing_key: agent.1.<agent_bank>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '2' | 'M' |          seq          |
        +-----+-----+-----+-----+-----------------------+
        |  objectId (bin128)                            |
        +-----------------------------------------------+
        |  package name (str8)                          |
        +-----------------------------------------------+
        |  class name (str8)                            |
        +-----------------------------------------------+
        |  class hash (bin128)                          |
        +-----------------------------------------------+
        |  methodName (str8)                            |
        +-----------------------------------------------+------------------------+
        |  input and bidirectional argument values (in schema order)             |
        +------------------------------------------------------------------------+

...

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).

No Format
        routing_key: <reply_to from request>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '2' | 'm' |          seq          |
        +-----+-----+-----+-----+-----------------------+
        |  status code (uint32) |
        +-----------------------+----------------------------------+
        |  status text (str16)                                     |
        +-----------------------+----------------------------------+-------------+
        |  output and bidirectional argument values (in schema order)            |
        +------------------------------------------------------------------------+

...

No Format
      Broker                                                       Remote Agent
        |                                                               |
        | <----------------------------------------- Attach Request --- |
        | --- Attach Response ----------------------------------------> |
        |                                                               |
        | <------------------------------------- Package Indication --- |
        | <------------------------------------- Package Indication --- |
        |                                                               |
        | <--------------------------------------- Class Indication --- |
        | <--------------------------------------- Class Indication --- |
        | <--------------------------------------- Class Indication --- |
        | <--------------------------------------- Class Indication --- |
        | <--------------------------------------- Class Indication --- |
        |                                                               |
        | --- Schema Request (class key) -----------------------------> |
        | <---------------------------------------- Schema Response --- |
        |                                                               |
        | --- Schema Request (class key) -----------------------------> |
        | <---------------------------------------- Schema Response --- |
        |                                                               |
        |                                                               |

Package QueryQuery

No Format

        routing_key: agent.1.<agent_bank>
No Format
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '2' | 'P' |          seq          |
        +-----+-----+-----+-----+-----------------------+

Package Indication

No Format

        routing_key: <reply_to from request> (if in reply to a request)
                     schema.package          (if unsolicited)
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '2' | 'p' |          seq          |
        +-----+-----+-----+-----+-----------------------+----------+
        |  package name (str8)                                     |
        +----------------------------------------------------------+

Agent Attach Request

No Format
        routing_key: broker
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '2' | 'A' |          seq          |
        +-----+-----+-----+-----+-----------------------+----------+
        |  label (str8)                                            |
        +----------------------------------------------------------+
        |  system-id (uuid)                                        |
        +---------------------------------+------------------------+
        |  requested broker bank (uint32) |
        +---------------------------------+
        |  requested agent bank (uint32)  |
        +---------------------------------+

Agent Attach Response (success)

No Format
        routing_key: <reply_to from request>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '2' | 'a' |          seq          |
        +-----+-----+-----+-----+--------+--------------+
        |  assigned broker bank (uint32) |
        +--------------------------------+
        |  assigned agent bank (uint32)  |
        +--------------------------------+

Console Added Indication

No Format

        routing_key: agent.1.<agent_bank>
        +-----+-----+-----+-----+-----------------------+
        | 'A' | 'M' | '2' | 'x' |          seq          |
        +-----+-----+-----+-----+-----------------------+