Red Hat DocumentationToggle FramesPrintFeedback

Shutting Down a Broker on Windows

Overview

On Windows platforms brokers are run as either foreground processes or as system services. You can shutdown running brokers using operating system actions. For example, typing CTRL+C in a window in which a foreground broker is running will shutdown the broker. Closing the window will also shutdown a foreground broker.

However, if you want to properly shutdown a broker use the administration tool's stop task. It ensures that the broker is gracefully shutdown. It also allows you to shutdown brokers remotely.

The stop task

On Windows, the command to shutdown a broker is activemq-admin stop. The syntax for the command is shown in Example 14.

Example 14. Syntax for Stopping a Broker on Windows

activemq-admin stop {[brokerName] | [--all]} [--jmxurl JMXUrl] [-jmxuser userName] [-jmxpassword password]


Tip

For a full description of the parameters see ????.

If you do not use the --jmxurl parameter, the default JMX url, service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi, is used. This is the JMX url specified in the default Fuse Message Broker configuration.

If you configured a broker to use a different JMX url, you must use the --jmxurl parameter and provide the JMX url for connecting to the broker.

If you have secured JMX access to the broker, you will need to use the -jmxuser and -jmxpassword parameters. They specify the user name and password required to access the broker's JMX context. For information about using security with JMX see JMX Security in ActiveMQ Security Guide.

Examples

The command shown in Example 15 shuts down a broker named gatewayEast that is running in the default JMX context.

Example 15. Shutting Down a Broker on Windows

c:\activemq-admin stop gatewayEast

The command shown in Example 16 shuts down all of the brokers running in the default JMX context.

Example 16. Shutting Down All Broker on Windows

c:\activemq-admin stop --all

The command shown in Example 17 shuts down a broker named gatewayEast that is running in the JMX context service:jmx:rmi:///jndi/rmi://localhost:8050/jmxrmi.

Example 17. Shutting Down a Broker on Windows in a Non-default JMX Context

c:\activemq-admin stop gatewayEast --jmxurl service:jmx:rmi:///jndi/rmi://localhost:8050/jmxrmi

Comments powered by Disqus