[ 
https://issues.apache.org/jira/browse/QPID-6118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14149166#comment-14149166
 ] 

Pavel Moravec commented on QPID-6118:
-------------------------------------

Good point, Chuck.

So then this patch is sufficient (apart of missing QMF response):

Index: src/qpid/broker/management-schema.xml
===================================================================
--- src/qpid/broker/management-schema.xml       (revision 1627786)
+++ src/qpid/broker/management-schema.xml       (working copy)
@@ -194,6 +194,9 @@
         <arg name="targetQueue" dir="I" type="sstr"   desc="Redirect target 
queue. Blank disables redirect."/>
     </method>
 
+    <method name="shutdown" desc="Shutdown the broker">
+    </method>
+
   </class>
 
   <!--
Index: src/qpid/broker/Broker.cpp
===================================================================
--- src/qpid/broker/Broker.cpp  (revision 1627786)
+++ src/qpid/broker/Broker.cpp  (working copy)
@@ -689,6 +689,13 @@
         status =  queueRedirect(srcQueue, tgtQueue, getCurrentPublisher());
         break;
     }
+    case _qmf::Broker::METHOD_SHUTDOWN :
+    {
+        QPID_LOG (debug, "Broker::shutdown()");
+        status = Manageable::STATUS_OK;
+        shutdown();
+        break;
+    }
     default:
         QPID_LOG (debug, "Broker ManagementMethod not implemented: id=" << 
methodId << "]");
         status = Manageable::STATUS_NOT_IMPLEMENTED;


ACL preventing the shutdown is:
acl deny all access method name=shutdown


FYI to apply change in management-schema.xml, "make clean; make" did not help 
me. I had to completely remove the building directory and run cmake to 
re-create qmf/org/apache/qpid/broker/Broker.h from the xml file

> Add qmf shutdown command to the broker 
> ---------------------------------------
>
>                 Key: QPID-6118
>                 URL: https://issues.apache.org/jira/browse/QPID-6118
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Broker
>    Affects Versions: 0.28
>            Reporter: Alan Conway
>            Assignee: Alan Conway
>         Attachments: QPID-6118-inspiration.patch
>
>
> Add a QMF shutdown command to the broker. On receiving this command the 
> broker would shut down in the same way as if it received a kill -TERM.
> The shutdown command must be restriced by a new ACL rule for security 
> purposes.
> Discussed on the qpid user list, all responses to the idea were positive:
> http://qpid.2158936.n2.nabble.com/QPID-C-Dynamically-Managing-Broker-td7613792.html#a7614175



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to