LibraryLink ToToggle FramesPrintFeedback

Starting a Broker

Use the activemq tool to start an instance of Fuse Message Broker in the foreground on Windows.

For example, to start a broker on Windows, using the default broker configuration, enter:

activemq xbean:conf/activemq.xml

Use the activemq start task to start a background instance (daemon process) of Fuse Message Broker on *NIX platforms.

For example, to start a broker in the background on a *NIX platform, using the default broker configuration, enter:

activemq start xbean:conf/activemq.xml

When you run activemq, there are two main ways of specifying a configuration for the broker:

By default, the broker running in the background sends logging messages to the ActiveMQHome/data/activemq.log file. You can configure the location of this log file by editing the conf/log4j.properties file or the conf/logging.properties file.

If you set the ACTIVEMQ_USER environment variable (see Setting up the Environment on *NIX), the broker will run as the specified user. You should select a user that has non-root privileges to run the broker daemon.

On *NIX platforms, you can start a broker in the foreground using the activemq console task. For example, you can start a broker in the foreground using the default broker configuration, conf/activemq.xml, as follows:

./bin/activemq console xbean:conf/activemq.xml

On *NIX platforms, you can check the status of a running broker using the activemq status task. For example, you can check the broker status as follows:

./bin/activemq status

If you execute this command in a shell script, it returns 0, if the service is working, and a non-zero value, if the service is not working.