summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@apache.org>2014-02-28 14:40:23 +0000
committerPavel Moravec <pmoravec@apache.org>2014-02-28 14:40:23 +0000
commit39ef3509e6cd2686a82e979f97af6b69f34c7119 (patch)
tree9c024d954d99a1a385bcf258ce09ddc6770b09d6 /qpid/cpp/src
parent1609463a312eb0e6287f7333c7cf4fb75d658e76 (diff)
downloadqpid-python-39ef3509e6cd2686a82e979f97af6b69f34c7119.tar.gz
QPID-5587: QMF to track queue owner (userId)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1572963 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/broker/Queue.cpp6
-rw-r--r--qpid/cpp/src/qpid/broker/Queue.h2
-rw-r--r--qpid/cpp/src/qpid/broker/management-schema.xml5
3 files changed, 10 insertions, 3 deletions
diff --git a/qpid/cpp/src/qpid/broker/Queue.cpp b/qpid/cpp/src/qpid/broker/Queue.cpp
index 2c8f8c2f0e..d8bc59eaf1 100644
--- a/qpid/cpp/src/qpid/broker/Queue.cpp
+++ b/qpid/cpp/src/qpid/broker/Queue.cpp
@@ -1660,6 +1660,12 @@ void Queue::setMgmtRedirectState( std::string peer, bool enabled, bool isSrc ) {
}
}
+void Queue::setOwningUser(std::string& _userId) {
+ userId = _userId;
+ if (mgmtObject != 0)
+ mgmtObject->set_creator(userId);
+}
+
bool Queue::reroute(boost::shared_ptr<Exchange> e, const Message& m)
{
if (e) {
diff --git a/qpid/cpp/src/qpid/broker/Queue.h b/qpid/cpp/src/qpid/broker/Queue.h
index 6e7b17e1c5..21a8b7ef99 100644
--- a/qpid/cpp/src/qpid/broker/Queue.h
+++ b/qpid/cpp/src/qpid/broker/Queue.h
@@ -400,7 +400,7 @@ class Queue : public boost::enable_shared_from_this<Queue>,
QPID_BROKER_EXTERN bool find(framing::SequenceNumber pos, Message& msg ) const;
// Remember the queue's owner so acl quotas can be restored after restart
- void setOwningUser(std::string& _userId) { userId = _userId; }
+ void setOwningUser(std::string& _userId);
void updateAclUserQueueCount();
QPID_BROKER_EXTERN void setAlternateExchange(boost::shared_ptr<Exchange> exchange);
diff --git a/qpid/cpp/src/qpid/broker/management-schema.xml b/qpid/cpp/src/qpid/broker/management-schema.xml
index bb15a244ba..2db8df4e85 100644
--- a/qpid/cpp/src/qpid/broker/management-schema.xml
+++ b/qpid/cpp/src/qpid/broker/management-schema.xml
@@ -282,8 +282,9 @@
<statistic name="flowStopped" type="bool" desc="Flow control active."/>
<statistic name="flowStoppedCount" type="count32" desc="Number of times flow control was activated for this queue"/>
- <statistic name="redirectPeer" type="sstr" desc="Partner queue for redirected pair"/>
- <statistic name="redirectSource" type="bool" desc="This queue is the redirect source"/>
+ <statistic name="redirectPeer" type="sstr" desc="Partner queue for redirected pair"/>
+ <statistic name="redirectSource" type="bool" desc="This queue is the redirect source"/>
+ <statistic name="creator" type="sstr" desc="userId of creator of the queue"/>
<method name="purge" desc="Discard all or some messages on a queue">
<arg name="request" dir="I" type="uint32" desc="0 for all messages or n>0 for n messages"/>