Red Hat DocumentationFuse Message BrokerToggle FramesPrintFeedback

Shutting Down a Broker on Unix/Linux/OS X

Overview

The administration tool's stop task uses JMX to locate and shutdown brokers on Unix and Unix-like platforms. This saves you from remembering a broker's PID each time it starts up.

The Unix stop task can also be configured to force a shutdown if an orderly shutdown hangs. It does this by waiting a predetermined amount of time and then killing the broker process.

The stop task

On Unix and Unix-like systems, the command to shutdown a broker is activemq stop. The syntax for the command is shown in Example 23.

Example 23. Syntax for Stopping a Broker on Unix/Linux/OS X

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

Shutdown timeout

When you execute the stop task, the administration tool initiates an orderly shutdown of the broker (or brokers) by sending a shutdown request to the JMX port. If the broker fails to shut down within a specified timeout, the administration tool sends a SIGKILL signal to the broker process.

The duration of the kill timeout is set by the ACTIVEMQ_KILL_MAXSECONDS environment variable. For more information about setting up your environment for the administration tool see ????.

Examples

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

Example 24. Shutting Down a Broker on Unix/Linux/OS X

>activemq stop gatewayEast

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

Example 25. Shutting Down All Broker on Unix/Linux/OS X

>activemq stop --all

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

Example 26. Shutting Down a Broker in a Non-default JMX Context on Unix/Linux/OS X

>activemq stop gatewayEast --jmxurl service:jmx:rmi:///jndi/rmi://localhost:8050/jmxrmi

Comments powered by Disqus