diff options
| author | Gordon Sim <gsim@apache.org> | 2007-12-14 11:24:15 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2007-12-14 11:24:15 +0000 |
| commit | 7556017af46c7ddae2fcbdccbdee07b5fa7892bc (patch) | |
| tree | 6e8fa33cff2ff2a04ccf931138bb7d970fc8088c /cpp/src/qpid/broker/Queue.cpp | |
| parent | 777df5f4bcea34e918f4087ddc06f182bec5d5bc (diff) | |
| download | qpid-python-7556017af46c7ddae2fcbdccbdee07b5fa7892bc.tar.gz | |
Only release content for durable queues.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@604169 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/Queue.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/Queue.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp index a5384014d8..b68a7db8b0 100644 --- a/cpp/src/qpid/broker/Queue.cpp +++ b/cpp/src/qpid/broker/Queue.cpp @@ -388,7 +388,13 @@ void Queue::push(intrusive_ptr<Message>& msg){ if (policy.get()) { policy->enqueued(msg->contentSize()); if (policy->limitExceeded()) { - msg->releaseContent(store); + if (store) { + QPID_LOG(debug, "Message " << msg << " on " << name << " released from memory"); + msg->releaseContent(store); + } else { + 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"); + } } } notify(); |
