Did you mean to say you're using apache-activemq-5.11.1/bin/activemq stop
to stop the broker?  I'm not sure what executing the command you gave
earlier would do (and I don't have a broker I can try it against right
now), but I wouldn't expect it to stop the broker.

You can add a shutdown hook to any Java program via
Runtime.addShutdownHook().  See
https://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html#addShutdownHook(java.lang.Thread)

Tim
My requirement :

I need to execute some code when I stop the broker. What is the best way to
do this ?

Thanks,
Anuj



--
View this message in context:
http://activemq.2283324.n4.nabble.com/Proper-way-to-stop-ActiveMQ-tp4704801p4704802.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to