Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-4749

Python QMF console: provide separate callback for QMFv2 asynchronous updates

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 0.22
    • 0.23
    • QMF
    • None

    Description

      The QMF python console module provides a Console interface class that provides callbacks for QMF-related asynchronous events. This class can be used to receive notifications when managed objects are updated. These notifications come when an object's Statistics or Properties change.

      The first version of QMF (QMFv1) provided separate notification messages for Statistics and Properties changes. Thus, the Console class provides two callback interfaces - one for Statistics updates (objectStats), and a separate one for Property changes (objectProps).

      The current version of QMF (QMFv2) was designed to consolidate the separate notification messages into a single message containing both properties and statistics.

      However, the dual callback interface has not changed to reflect the QMFv2 behavior.

      Currently, when a QMFv2 update notification arrives, the Console's objectProps method is invoked, passing the updated information. However, this information can contain both statistics and properties. This is awkward at best, because existing applications would have to distinguish between QMFv1 updates and QMFv2 updates, and handle them differently (eg. objectProps handler would have check for updated statistics in the case of QMFv2 objects, but not for QMFv1 objects).

      This patch introduces a new callback method to the Console object:

      objectUpdate( broker, object )

      this method is invoked only for QMFv2 object updates. The object passed may contain both statistics and property values.

      This patch changes the behavior of the existing callback code to only pass QMFv1 object updates to the old objectStats/objectProps interfaces. QMFv1 updates are not passed to objectUpdate(), only QMFv2 updates are.

      The intent is to deprecate the objectStats/objectProps interfaces when QMFv1 is deprecated, and support objectUpdate() going forward.

      Attachments

        Issue Links

          Activity

            People

              kgiusti Ken Giusti
              kgiusti Ken Giusti
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: