summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/Queue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/broker/Queue.cpp')
-rw-r--r--cpp/src/qpid/broker/Queue.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp
index d9d6781c9f..25b4e23968 100644
--- a/cpp/src/qpid/broker/Queue.cpp
+++ b/cpp/src/qpid/broker/Queue.cpp
@@ -131,7 +131,15 @@ inline void mgntDeqStats(const Message& msg,
QueueSettings merge(const QueueSettings& inputs, const Broker::Options& globalOptions)
{
QueueSettings settings(inputs);
- if (!settings.maxDepth.hasSize() && globalOptions.queueLimit) {
+ settings.maxDepth = QueueDepth();
+ if (inputs.maxDepth.hasCount() && inputs.maxDepth.getCount()) {
+ settings.maxDepth.setCount(inputs.maxDepth.getCount());
+ }
+ if (inputs.maxDepth.hasSize()) {
+ if (inputs.maxDepth.getSize()) {
+ settings.maxDepth.setSize(inputs.maxDepth.getSize());
+ }
+ } else if (globalOptions.queueLimit) {
settings.maxDepth.setSize(globalOptions.queueLimit);
}
return settings;