summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
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"/>