Red Hat DocumentationFuse Message BrokerToggle 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 19.

Example 19. 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.

Tip

If you have a broker running as a Windows service and have JMX turned on, you can use activemq-admin stop to shut it down. However, the recommended way to shut down a broker running as a Windows service is documented in ????.

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 ????.

Examples

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

Example 20. Shutting Down a Broker on Windows

c:\activemq-admin stop gatewayEast

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

Example 21. Shutting Down All Broker on Windows

c:\activemq-admin stop --all

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

Example 22. 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