diff options
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/broker/Queue.cpp | 12 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/broker/Queue.h | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/broker/Queue.cpp b/qpid/cpp/src/qpid/broker/Queue.cpp index 4ac061ac25..dc8c53ccf9 100644 --- a/qpid/cpp/src/qpid/broker/Queue.cpp +++ b/qpid/cpp/src/qpid/broker/Queue.cpp @@ -61,7 +61,8 @@ Queue::Queue(const string& _name, bool _autodelete, consumerCount(0), exclusive(0), noLocal(false), - persistenceId(0) + persistenceId(0), + policyExceeded(false) { if (parent != 0) { @@ -420,6 +421,10 @@ void Queue::push(boost::intrusive_ptr<Message>& msg){ if (policy.get()) { policy->enqueued(msg->contentSize()); if (policy->limitExceeded()) { + if (!policyExceeded) { + policyExceeded = true; + QPID_LOG(info, "Queue size exceeded policy for " << name); + } if (store) { QPID_LOG(debug, "Message " << msg << " on " << name << " released from memory"); msg->releaseContent(store); @@ -427,6 +432,11 @@ void Queue::push(boost::intrusive_ptr<Message>& msg){ QPID_LOG(warning, "Message " << msg << " on " << name << " exceeds the policy for the queue but can't be released from memory as the queue is not durable"); } + } else { + if (policyExceeded) { + policyExceeded = false; + QPID_LOG(info, "Queue size within policy for " << name); + } } } notify(); diff --git a/qpid/cpp/src/qpid/broker/Queue.h b/qpid/cpp/src/qpid/broker/Queue.h index 724f5b049c..355b2a5e41 100644 --- a/qpid/cpp/src/qpid/broker/Queue.h +++ b/qpid/cpp/src/qpid/broker/Queue.h @@ -81,7 +81,8 @@ namespace qpid { mutable qpid::sys::Mutex ownershipLock; mutable uint64_t persistenceId; framing::FieldTable settings; - std::auto_ptr<QueuePolicy> policy; + std::auto_ptr<QueuePolicy> policy; + bool policyExceeded; QueueBindings bindings; boost::shared_ptr<Exchange> alternateExchange; framing::SequenceNumber sequence; |
