Red Hat DocumentationFuse Message BrokerToggle FramesPrintFeedback

Shutting Down a Broker

This tutorial demostrates how to shutdown a running message broker.

Goals

In this tutorial you will:

  • add the Fuse Message Broker command line tools to your system path

  • use a Fuse Message Broker configuration file to determine the broker's name

  • stop a Fuse Message Broker instance using it's name

Prerequisites

To complete this tutorial you will need to have a broker instance running in the default JMX context (service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi).

While you can use the default configuration for this tutorial it is recommended that you use an instance like the one created in ????.

Procedure for Windows

To shutdown a broker on Windows:

  1. Locate the root folder for the broker instance you wish to start.

    To use the default installation, the root folder is InstallDir.

    To use the instance created in ????, the root folder is c:\tutorial.

  2. Open a command prompt at the instance's root folder.

  3. Add the Fuse Message Broker command line tools your path by entering

    c:\ set PATH=%PATH%;InstallDir\bin
  4. Open the configuration file for the broker instance.

    The default location for the configuration file is conf\activemq.xml.

  5. Locate the broker element.

  6. Write down the value of the brokerName attribute.

    This is the name of the broker and is used to by the administration tool to determine which broker to shutdown.

    The value for the broker created in ???? is tutorial.

  7. Shutdown the broker instance by entering

    c:\ activemq-admin stop brokerName

A number of messages, similar to Figure 2, will appear on the console.

Figure 2. Broker Shutdown

Java Runtime: Sun Microsystems Inc. 1.6.0_16 
C:\Program Files\Java\jdk1.6.0_16\jre
  Heap sizes: current=5056k  free=4761k  max=65088k
    JVM args: -Dactivemq.classpath=C:\apache-activemq-5.5.0-fuse-00-27\bin\../conf; 
              -Dactivemq.home=C:\apache-activemq-5.5.0-fuse-00-27\bin\.. 
              -Dactivemq.base=C:\apache-activemq-5.5.0-fuse-00-27\bin\..
ACTIVEMQ_HOME: C:\apache-activemq-5.5.0-fuse-00-27\bin\..
ACTIVEMQ_BASE: C:\apache-activemq-5.5.0-fuse-00-27\bin\..
Connecting to pid: 4076
Stopping broker: tutorial

Procedure for Unix/Linux/OSX

To start a broker:

  1. Locate the root folder for the broker instance you wish to start.

    To use the default installation, the root folder is InstallDir.

    To use the instance created in ????, the root folder is ~/tutorial.

  2. Open a command prompt at the instance's root folder.

  3. Add the Fuse Message Broker command line tools your path by entering

    % set PATH=$PATH;InstallDir/bin
  4. Open the configuration file for the broker instance.

    The default location for the configuration file is conf/activemq.xml.

  5. Locate the broker element.

  6. Write down the value of the brokerName attribute.

    This is the name of the broker and is used to by the administration tool to determine which broker to shutdown.

    The value for the broker created in ???? is tutorial.

  7. Shutdown the broker by entering

    % activemq stop brokerName

More information

For details see:

????
Comments powered by Disqus