diff options
| author | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-05-18 20:34:34 +0000 |
|---|---|---|
| committer | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-05-18 20:34:34 +0000 |
| commit | 3fa873f317549648aa62d225cb24ef6cdd23533b (patch) | |
| tree | ededd0b4b3edf71bda6aa702bf86cc82d93eb4b4 /cpp/src/qpid/management | |
| parent | 0b7a80ae60839ed3f907369dd75d099a3fb7a33d (diff) | |
| download | qpid-python-3fa873f317549648aa62d225cb24ef6cdd23533b.tar.gz | |
QMF: allow consoles to filter agent heartbeats based on agent identification.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@945871 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/management')
| -rw-r--r-- | cpp/src/qpid/management/ManagementAgent.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/cpp/src/qpid/management/ManagementAgent.cpp b/cpp/src/qpid/management/ManagementAgent.cpp index 919fcc22f7..92f9d799f9 100644 --- a/cpp/src/qpid/management/ManagementAgent.cpp +++ b/cpp/src/qpid/management/ManagementAgent.cpp @@ -801,7 +801,18 @@ void ManagementAgent::periodicProcessing (void) } if (qmf2Support) { - static const string addr_key("agent.ind.heartbeat"); + std::stringstream addr_key; + + addr_key << "agent.ind.heartbeat"; + + // append .<vendor>.<product> to address key if present. + Variant::Map::const_iterator v; + if ((v = attrMap.find("_vendor")) != attrMap.end()){ + addr_key << "." << v->second.getString(); + if ((v = attrMap.find("_product")) != attrMap.end()) { + addr_key << "." << v->second.getString(); + } + } Variant::Map map; Variant::Map headers; @@ -817,7 +828,7 @@ void ManagementAgent::periodicProcessing (void) string content; MapCodec::encode(map, content); - sendBufferLH(content, "", headers, "amqp/map", v2Topic, addr_key); + sendBufferLH(content, "", headers, "amqp/map", v2Topic, addr_key.str()); QPID_LOG(trace, "SENT AgentHeartbeat name=" << name_address); } |
