summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2008-11-04 23:01:57 +0000
committerTed Ross <tross@apache.org>2008-11-04 23:01:57 +0000
commit55f763b930b3a9743d355df95b7fbd126fc35566 (patch)
treed9888c6c70826bf2f2c44e052db34f1597a11ac6 /cpp
parent0775a64f49729537a207c540b8d8a2973c155d56 (diff)
downloadqpid-python-55f763b930b3a9743d355df95b7fbd126fc35566.tar.gz
Added bank numbers to the routing key of a QMF heartbeat message.
This is used by the console to identify which agent sent the indication. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@711458 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/qpid/agent/ManagementAgentImpl.cpp6
-rw-r--r--cpp/src/qpid/management/ManagementBroker.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/qpid/agent/ManagementAgentImpl.cpp b/cpp/src/qpid/agent/ManagementAgentImpl.cpp
index d752312843..1c737155a7 100644
--- a/cpp/src/qpid/agent/ManagementAgentImpl.cpp
+++ b/cpp/src/qpid/agent/ManagementAgentImpl.cpp
@@ -22,7 +22,6 @@
#include "qpid/management/ManagementObject.h"
#include "ManagementAgentImpl.h"
#include <list>
-#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
@@ -597,11 +596,12 @@ void ManagementAgentImpl::periodicProcessing()
Buffer msgBuffer(msgChars, BUFSIZE);
encodeHeader(msgBuffer, 'h');
msgBuffer.putLongLong(uint64_t(Duration(now())));
+ stringstream key;
+ key << "console.heartbeat." << assignedBrokerBank << "." << assignedAgentBank;
contentSize = BUFSIZE - msgBuffer.available();
msgBuffer.reset();
- routingKey = "console.heartbeat";
- connThreadBody.sendBuffer(msgBuffer, contentSize, "qpid.management", routingKey);
+ connThreadBody.sendBuffer(msgBuffer, contentSize, "qpid.management", key.str());
}
moveNewObjectsLH();
diff --git a/cpp/src/qpid/management/ManagementBroker.cpp b/cpp/src/qpid/management/ManagementBroker.cpp
index 596b587401..1b89be18d9 100644
--- a/cpp/src/qpid/management/ManagementBroker.cpp
+++ b/cpp/src/qpid/management/ManagementBroker.cpp
@@ -351,7 +351,7 @@ void ManagementBroker::periodicProcessing (void)
contentSize = BUFSIZE - msgBuffer.available ();
msgBuffer.reset ();
- routingKey = "console.heartbeat";
+ routingKey = "console.heartbeat.1.0";
sendBuffer (msgBuffer, contentSize, mExchange, routingKey);
}