summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/Queue.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-05-04 16:39:52 +0000
committerGordon Sim <gsim@apache.org>2008-05-04 16:39:52 +0000
commit6070cf6c2bdc73bab9da048820c752cd204e0125 (patch)
tree081ed9a67de0142aab6fc4aaacf7010e8ed0a95c /cpp/src/qpid/broker/Queue.cpp
parent077992f5b43f5ba7f70dce22de05b56b36107073 (diff)
downloadqpid-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/qpid/broker/Queue.cpp')
-rw-r--r--cpp/src/qpid/broker/Queue.cpp12
1 files changed, 11 insertions, 1 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();