From 55f763b930b3a9743d355df95b7fbd126fc35566 Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Tue, 4 Nov 2008 23:01:57 +0000 Subject: 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 --- cpp/src/qpid/agent/ManagementAgentImpl.cpp | 6 +++--- cpp/src/qpid/management/ManagementBroker.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'cpp/src') 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 -#include #include #include #include @@ -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); } -- cgit v1.2.1