Hi Guys,
This thread has intrigued me a bit.
I must admit that I had thought the qmf.console.Console,
qmf.console.Session stuff was QMF1 only so I was intrigued by the
comments about QMF2. I dug out an old python program.
It starts like:
class AuditConsole(Console):
# AuditConsole Constructor
def __init__(self, whitelistFile):
self.whitelistFile = whitelistFile
self.whitelistLastModified = None
# Declare dictionary to map queue name to queue objects
self.queueNameMap = {}
# Declare dictionary to map queue name to subscription objects
......
so it's subclassing Console and using the asynchronous approach. I
initialise it with:
console = AuditConsole(options.whitelist)
session = Session(console, rcvObjects=True, rcvEvents=True,
userBindings=True, manageConnections=True)
session.bindClass("org.apache.qpid.broker", "queue")
session.bindClass("org.apache.qpid.broker", "exchange")
session.bindClass("org.apache.qpid.broker", "binding")
session.bindClass("org.apache.qpid.broker", "connection")
session.bindClass("org.apache.qpid.broker", "session")
session.bindClass("org.apache.qpid.broker", "subscription")
brokers = []
try:
try:
for host in arguments:
brokers.append(session.addBroker(host, None,
options.sasl_mechanism))
I've got code
def objectStats(self, broker, record):
classKey = record.getClassKey()
oid = record.getObjectId()
# Note that queue objects are keyed by both queue name and
Object ID
if classKey.getClassName() == "queue":
print "queue: %s" % (oid.asMap())
def objectProps(self, broker, record):
classKey = record.getClassKey()
oid = record.getObjectId()
# Note that queue objects are keyed by both queue name and
Object ID
if classKey.getClassName() == "queue":
print "queue: %s %s" % (record.name, oid.asMap())
but I only seem to be getting QMF1 push updates given the ObjectId
queue: qmfc-v2-hb-zappa.4505.1 {'_object_name': '25', '_agent_name':
'0', '_agent_epoch': 1662}
queue: {'_object_name': '25', '_agent_name': '0', '_agent_epoch': 1662}
queue: qmfc-v2-ui-zappa.4505.1 {'_object_name': '23', '_agent_name':
'0', '_agent_epoch': 1662}
queue: {'_object_name': '23', '_agent_name': '0', '_agent_epoch': 1662}
queue: qmfc-v2-zappa.4505.1 {'_object_name': '21', '_agent_name': '0',
'_agent_epoch': 1662}
queue: {'_object_name': '21', '_agent_name': '0', '_agent_epoch': 1662}
queue: reply-zappa.4505.1 {'_object_name': '14', '_agent_name': '0',
'_agent_epoch': 1662}
queue: {'_object_name': '14', '_agent_name': '0', '_agent_epoch': 1662}
queue: topic-zappa.4505.1 {'_object_name': '18', '_agent_name': '0',
'_agent_epoch': 1662}
queue: {'_object_name': '18', '_agent_name': '0', '_agent_epoch': 1662}
queue: {'_object_name': '23', '_agent_name': '0', '_agent_epoch': 1662}
queue: {'_object_name': '18', '_agent_name': '0', '_agent_epoch': 1662}
queue: {'_object_name': '23', '_agent_name': '0', '_agent_epoch': 1662}
queue: {'_object_name': '18', '_agent_name': '0', '_agent_epoch': 1662}
I'm running qpidd 0.23 with no options so both QMF1 and QMF2 data push
should be available.
What's even odder is that clearly object name 23 relates to
qmfc-v2-ui-zappa.4505.1 which is, given the name, one of the QMF2 queues.
I'm not at all sure why I should be seeing V1 ObjectIds
I'm not particularly familiar with this API (nor really with python).
The impression I've got from Bill's last post is that he's seeing both
the QMF1 and QMF2 updates (that seems wrong anyway, I don't think being
notified for each QMF version is what anyone would expect) but I only
seem to be seeing QMF1 ObjectIds albeit relating to what appears to be
QMF2 queues??????
Any thoughts??
Frase
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org