diff options
| author | Gordon Sim <gsim@apache.org> | 2008-05-04 16:39:52 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-05-04 16:39:52 +0000 |
| commit | 6070cf6c2bdc73bab9da048820c752cd204e0125 (patch) | |
| tree | 081ed9a67de0142aab6fc4aaacf7010e8ed0a95c /cpp/src | |
| parent | 077992f5b43f5ba7f70dce22de05b56b36107073 (diff) | |
| download | qpid-python-6070cf6c2bdc73bab9da048820c752cd204e0125.tar.gz | |
Extra log ouput for queue policy.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@653249 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
| -rw-r--r-- | cpp/src/qpid/broker/Queue.cpp | 12 | ||||
| -rw-r--r-- | cpp/src/qpid/broker/Queue.h | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp index 4ac061ac25..dc8c53ccf9 100644 --- a/cpp/src/qpid/broker/Queue.cpp +++ b/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/cpp/src/qpid/broker/Queue.h b/cpp/src/qpid/broker/Queue.h index 724f5b049c..355b2a5e41 100644 --- a/cpp/src/qpid/broker/Queue.h +++ b/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; |
