summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/SessionAdapter.cpp
diff options
context:
space:
mode:
authorMichael Goulish <mgoulish@apache.org>2012-09-10 17:23:34 +0000
committerMichael Goulish <mgoulish@apache.org>2012-09-10 17:23:34 +0000
commitcf56a7e2e358cab667426a1df5c2338a539ef048 (patch)
treee1d02be5f369fd53b352536e51fa21eaba447064 /cpp/src/qpid/broker/SessionAdapter.cpp
parent6ccfaa247db820a4f1fbf966852c00ca59d3ac7a (diff)
downloadqpid-python-cf56a7e2e358cab667426a1df5c2338a539ef048.tar.gz
Jira QPID-4142
browse-only queues git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1382991 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SessionAdapter.cpp')
-rw-r--r--cpp/src/qpid/broker/SessionAdapter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/cpp/src/qpid/broker/SessionAdapter.cpp b/cpp/src/qpid/broker/SessionAdapter.cpp
index c973098020..24c64bc521 100644
--- a/cpp/src/qpid/broker/SessionAdapter.cpp
+++ b/cpp/src/qpid/broker/SessionAdapter.cpp
@@ -422,6 +422,11 @@ SessionAdapter::MessageHandlerImpl::subscribe(const string& queueName,
if(!destination.empty() && state.exists(destination))
throw NotAllowedException(QPID_MSG("Consumer tags must be unique"));
+ if (queue->getSettings().isBrowseOnly && acquireMode == 0) {
+ QPID_LOG(info, "Overriding request to consume from browse-only queue " << queue->getName());
+ acquireMode = 1;
+ }
+
// We allow browsing (acquireMode == 1) of exclusive queues, this is required by HA.
if (queue->hasExclusiveOwner() && !queue->isExclusiveOwner(&session) && acquireMode == 0)
throw ResourceLockedException(QPID_MSG("Cannot subscribe to exclusive queue "