From c8ef2488d04e7b1754c15db3d4319b5a53fbc98c Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 5 Feb 2009 15:06:09 +0000 Subject: QPID-1618 from Mick Goulish: brokers joining cluster store persistent messages that have been sent but not acknowledged. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@741123 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/Connection.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cpp/src') diff --git a/cpp/src/qpid/cluster/Connection.cpp b/cpp/src/qpid/cluster/Connection.cpp index 2a831ae435..9ea79fa2b6 100644 --- a/cpp/src/qpid/cluster/Connection.cpp +++ b/cpp/src/qpid/cluster/Connection.cpp @@ -319,6 +319,11 @@ void Connection::deliveryRecord(const string& qname, if (completed) dr.complete(); if (ended) dr.setEnded(); // Exsitance of message semanticState().record(dr); // Part of the session's unacked list. + + // If the message was unacked, the newbie broker must place + // it in its messageStore. + if ( m.payload && m.payload->isPersistent() && !completed && !ended && !accepted && !cancelled ) + queue->enqueue ( 0, m.payload ); } void Connection::queuePosition(const string& qname, const SequenceNumber& position) { -- cgit v1.2.1