summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorKen Giusti <kgiusti@apache.org>2011-11-02 16:44:02 +0000
committerKen Giusti <kgiusti@apache.org>2011-11-02 16:44:02 +0000
commitd88674e33088b42451dd5bb4a45dc3ecbf90c742 (patch)
treef3757c766fe53309999df3d2ddf3619472c2ff8f /cpp/src
parent4eb6daac4a5e76dceabd57727bac5993326d6d14 (diff)
downloadqpid-python-d88674e33088b42451dd5bb4a45dc3ecbf90c742.tar.gz
QPID-3577: assign null group identifiers to the default group
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1196682 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/broker/MessageGroupManager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/MessageGroupManager.cpp b/cpp/src/qpid/broker/MessageGroupManager.cpp
index 77108c10d5..00d1a58bef 100644
--- a/cpp/src/qpid/broker/MessageGroupManager.cpp
+++ b/cpp/src/qpid/broker/MessageGroupManager.cpp
@@ -77,12 +77,15 @@ MessageGroupManager::GroupState& MessageGroupManager::findGroup( const QueuedMes
if (headers) {
qpid::framing::FieldTable::ValuePtr id = headers->get( groupIdHeader );
if (id && id->convertsTo<std::string>()) {
- group = id->get<std::string>();
+ std::string tmp = id->get<std::string>();
+ if (!tmp.empty()) // empty group is reserved
+ group = tmp;
}
}
if (cachedGroup && group == lastGroup) {
hits++;
+ lastMsg = thisMsg;
return *cachedGroup;
}