summaryrefslogtreecommitdiff
path: root/qpid/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
commitabf152ac74b5e1dfb8ac3876eb2a74650191be35 (patch)
treec0b0249c5b2fda9a6b2135fe9f7532d8d38cdbeb /qpid/cpp
parent4c2cbcd6394d39f9f90d29d10c2c8126e2f6b773 (diff)
downloadqpid-python-abf152ac74b5e1dfb8ac3876eb2a74650191be35.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@711458 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp6
-rw-r--r--qpid/cpp/src/qpid/management/ManagementBroker.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp b/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp
index d752312843..1c737155a7 100644
--- a/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp
+++ b/qpid/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/qpid/cpp/src/qpid/management/ManagementBroker.cpp b/qpid/cpp/src/qpid/management/ManagementBroker.cpp
index 596b587401..1b89be18d9 100644
--- a/qpid/cpp/src/qpid/management/ManagementBroker.cpp
+++ b/qpid/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);
}