summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/agent/ManagementAgentImpl.cpp14
-rw-r--r--cpp/src/qpid/management/ManagementAgent.cpp18
2 files changed, 18 insertions, 14 deletions
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()
diff --git a/cpp/src/qpid/management/ManagementAgent.cpp b/cpp/src/qpid/management/ManagementAgent.cpp
index 4bacb95c7b..07751f57ef 100644
--- a/cpp/src/qpid/management/ManagementAgent.cpp
+++ b/cpp/src/qpid/management/ManagementAgent.cpp
@@ -404,8 +404,10 @@ void ManagementAgent::raiseEvent(const ManagementEvent& event, severity_t severi
string content;
- MapCodec::encode(map_, content);
- sendBufferLH(content, "", headers, "amqp/map", v2Topic, key.str());
+ Variant::List list_;
+ list_.push_back(map_);
+ ListCodec::encode(list_, content);
+ sendBufferLH(content, "", headers, "amqp/list", v2Topic, key.str());
QPID_LOG(trace, "SEND raiseEvent (v2) class=" << event.getPackageName() << "." << event.getEventName());
}
@@ -1000,9 +1002,9 @@ void ManagementAgent::periodicProcessing (void)
headers["qmf.agent"] = name_address;
map["_values"] = attrMap;
- map["_values"].asMap()["timestamp"] = uint64_t(sys::Duration(sys::EPOCH, sys::now()));
- map["_values"].asMap()["heartbeat_interval"] = interval;
- map["_values"].asMap()["epoch"] = bootSequence;
+ map["_values"].asMap()["_timestamp"] = uint64_t(sys::Duration(sys::EPOCH, sys::now()));
+ map["_values"].asMap()["_heartbeat_interval"] = interval;
+ map["_values"].asMap()["_epoch"] = bootSequence;
string content;
MapCodec::encode(map, content);
@@ -2017,9 +2019,9 @@ void ManagementAgent::handleLocateRequestLH(const string&, const string& replyTo
headers["qmf.agent"] = name_address;
map["_values"] = attrMap;
- map["_values"].asMap()["timestamp"] = uint64_t(sys::Duration(sys::EPOCH, sys::now()));
- map["_values"].asMap()["heartbeat_interval"] = interval;
- map["_values"].asMap()["epoch"] = bootSequence;
+ map["_values"].asMap()["_timestamp"] = uint64_t(sys::Duration(sys::EPOCH, sys::now()));
+ map["_values"].asMap()["_heartbeat_interval"] = interval;
+ map["_values"].asMap()["_epoch"] = bootSequence;
string content;
MapCodec::encode(map, content);