Chapter 11. Shutting Down a Broker
Abstract
Brokers can be shutdown from either the machine on which they are running or remotely from a different machine. If the broker is running in console mode it can only be shutdown locally.
11.1. Shutting Down a Local Broker
Abstract
Depending on how you started the local broker, you stop it using either a console command or command line tool.
Overview
The method used to stop a broker running on the machine you logged into depends on the mode in which the broker is running. If it is running in console mode, you use one of the console commands to shut down the broker. If it is running in daemon mode, the broker doesn't have a command console. So, you need to use one of the utility commands supplied with Red Hat JBoss A-MQ.
Stopping the broker from console mode
If you launched the broker by running amq, you shut it down using the shutdown -f command as shown in Example 11.1, “Using the Console's Shutdown Command”.
Example 11.1. Using the Console's Shutdown Command
JBossA-MQ:karaf@root>
shutdown -f
JBossA-MQ:karaf@root>
logout [Process completed]
Note
CTRL+D will also shutdown the broker.
Stopping a broker running in daemon mode
If you launched the broker by running the start command, log in to the machine where the broker is running and run the stop command in the broker installation's
bin
folder.
Note
You can stop a broker running in daemon mode remotely. See Section 11.2, “Shutting Down a Broker Remotely”.