From bda33c5b69189bf645ff818d8315bb8fc3288b7a Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Thu, 6 Jan 2011 23:04:34 +0000 Subject: Changes to QMFv2 formats to make the agents and consoles consistent: 1) Events in _data_indication messages are carried as lists of events (consistent with object data) 2) Built-in attributes for agents (in _heartbeaet_indication) all start with '_' to differentiate them from user-defined attributes. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1056112 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/agent/ManagementAgentImpl.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'cpp/src/qpid/agent') diff --git a/cpp/src/qpid/agent/ManagementAgentImpl.cpp b/cpp/src/qpid/agent/ManagementAgentImpl.cpp index 0a1c07a232..35011db38e 100644 --- a/cpp/src/qpid/agent/ManagementAgentImpl.cpp +++ b/cpp/src/qpid/agent/ManagementAgentImpl.cpp @@ -339,8 +339,10 @@ void ManagementAgentImpl::raiseEvent(const ManagementEvent& event, severity_t se headers["qmf.content"] = "_event"; headers["qmf.agent"] = name_address; - MapCodec::encode(map_, content); - connThreadBody.sendBuffer(content, "", headers, topicExchange, key.str()); + Variant::List list; + list.push_back(map_); + ListCodec::encode(list, content); + connThreadBody.sendBuffer(content, "", headers, topicExchange, key.str(), "amqp/list"); } uint32_t ManagementAgentImpl::pollCallbacks(uint32_t callLimit) @@ -1165,10 +1167,10 @@ void ManagementAgentImpl::periodicProcessing() void ManagementAgentImpl::getHeartbeatContent(qpid::types::Variant::Map& map) { map["_values"] = attrMap; - map["_values"].asMap()["timestamp"] = uint64_t(Duration(EPOCH, now())); - map["_values"].asMap()["heartbeat_interval"] = interval; - map["_values"].asMap()["epoch"] = bootSequence; - map["_values"].asMap()["schema_timestamp"] = uint64_t(schemaTimestamp); + map["_values"].asMap()["_timestamp"] = uint64_t(Duration(EPOCH, now())); + map["_values"].asMap()["_heartbeat_interval"] = interval; + map["_values"].asMap()["_epoch"] = bootSequence; + map["_values"].asMap()["_schema_updated"] = uint64_t(schemaTimestamp); } void ManagementAgentImpl::ConnectionThread::run() -- cgit v1.2.1