From 652be6b00e5b02deca44e291de640762b26a66e3 Mon Sep 17 00:00:00 2001 From: Nuno Santos Date: Fri, 16 May 2008 01:33:21 +0000 Subject: QPID-1061: Management heartbeat message from broker -- applied patch supplied by Ted Ross git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@656918 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/management/ManagementBroker.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'cpp/src') diff --git a/cpp/src/qpid/management/ManagementBroker.cpp b/cpp/src/qpid/management/ManagementBroker.cpp index 6466028c00..da6a6fd742 100644 --- a/cpp/src/qpid/management/ManagementBroker.cpp +++ b/cpp/src/qpid/management/ManagementBroker.cpp @@ -25,6 +25,7 @@ #include #include #include "qpid/framing/MessageTransferBody.h" +#include "qpid/sys/Time.h" #include #include #include @@ -246,6 +247,17 @@ void ManagementBroker::PeriodicProcessing (void) string routingKey; std::list deleteList; + { + Buffer msgBuffer(msgChars, BUFSIZE); + EncodeHeader(msgBuffer, 'h'); + msgBuffer.putLongLong(uint64_t(Duration(now()))); + + contentSize = BUFSIZE - msgBuffer.available (); + msgBuffer.reset (); + routingKey = "mgmt." + uuid.str() + ".heartbeat"; + SendBuffer (msgBuffer, contentSize, mExchange, routingKey); + } + if (managementObjects.empty ()) return; -- cgit v1.2.1