Fuse Message Broker

Broker Administration Tutorials

Version 5.5

Febuary 2012
Trademark Disclaimer
Third Party Acknowledgements

Updated: 27 Mar 2014

Table of Contents

1. Creating a Broker Instance
2. Starting a Broker
3. Installing a Broker as a Windows Service
4. Shutting Down a Broker

List of Figures

2.1. Broker Output
4.1. Broker Shutdown

To start 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 Creating a Broker Instance, 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. Locate the configuration file for the broker instance.

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

  5. Start the broker instance by entering

    c:\ activemq xbean:conf/activemq.xml

    Note

    This assumes the default location of the configuration file.

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

Figure 2.1. Broker Output

Java Runtime: Sun Microsystems Inc. 1.6.0_16 C:\Program Files\Java\jdk1.6.0_16\jre
  Heap sizes: current=260160k  free=258524k  max=1040512k
    JVM args: -Dcom.sun.management.jmxremote -Xms256M -Xmx1G 
-Dorg.apache.activemq.UseDedicatedTaskRunner=true 
-Djava.util.logging.config.file=logging.properties 
-Dactivemq.classpath=c:\apache-activemq-5.5.0-fuse-00-27\bin\../conf;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\..
Loading message broker from: xbean:conf/activemq.xml
 INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@5a67c9: startup date 
[Mon Sep 12 17:07:04 EDT 2011]; root of context hierarchy
 INFO | PListStore:[c:\apache-activemq-5.5.0-fuse-00-27\bin\..\data\tutorial\tmp_storage ] started
 INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[c:\apache-activemq-5.5.0-fuse-00-27\bin\..\data\kahadb]
 INFO | ActiveMQ 5.5.0-fuse-00-27 JMS Message Broker (tutorial) is starting
 INFO | For help or more information please see: http://activemq.apache.org/
 INFO | Listening for connections at: tcp://nbbedemjohnso1:61616
 INFO | Connector openwire Started
 INFO | ActiveMQ JMS Message Broker (tutorial, ID:nbbedemjohnso1-3192-1315861625337-0:1) started
 INFO | jetty-7.1.6.v20100715
 INFO | ActiveMQ WebConsole initialized.
 INFO | Initializing Spring FrameworkServlet 'dispatcher'
 INFO | ActiveMQ Console at http://0.0.0.0:8161/admin
 INFO | Initializing Spring root WebApplicationContext
 INFO | OSGi environment not detected.
 INFO | Apache Camel 2.7.1-fuse-00-27 (CamelContext: camel) is starting
 INFO | JMX enabled. Using ManagedManagementStrategy.
 INFO | Found 5 packages with 16 @Converter classes to load
 INFO | Loaded 152 type converters in 0.563 seconds
 WARN | Broker localhost not started so using tutorial instead
 INFO | Connector vm://localhost Started
 INFO | Route: route1 started and consuming from: Endpoint[activemq://example.A]
 INFO | Total 1 routes, of which 1 is started.
 INFO | Apache Camel 2.7.1-fuse-00-27 (CamelContext: camel) started in 1.000 seconds
 INFO | Camel Console at http://0.0.0.0:8161/camel
 INFO | ActiveMQ Web Demos at http://0.0.0.0:8161/demo
 INFO | RESTful file access application at http://0.0.0.0:8161/fileserver
 INFO | FUSE Web Console at http://0.0.0.0:8161/console
 INFO | Started SelectChannelConnector@0.0.0.0:8161

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 Creating a Broker Instance, 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. Locate the configuration file for the broker instance.

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

  5. Start the broker instance by entering

    % activemq start xbean:conf/activemq.xml

    Note

    This assumes the default location of the configuration file.

The message Running ActiveMQ Broker... will appear and the command will return without error. The broker is now running as a daemon process.

Tip

To start the broker with a command console use activemq console in place of activemq start.

For details see:

Starting a Broker in Managing and Monitoring a Broker

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 Creating a Broker Instance, 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 Creating a Broker Instance is tutorial.

  7. Shutdown the broker instance by entering

    c:\ activemq-admin stop brokerName

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


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 Creating a Broker Instance, 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 Creating a Broker Instance is tutorial.

  7. Shutdown the broker by entering

    % activemq stop brokerName

For details see:

Shutting Down a Broker in Managing and Monitoring a Broker