The command to start a broker on Unix and Unix-like platforms provides more flexibility than the Windows start-up command. On Unix, you can start a broker in either the foreground or in the background as a daemon process. In addition, the Unix start-up command can run pre-start scripts and associate an effective user to the broker process.
On Unix, the activemq start command to starts an instance of Fuse Message Broker in the background. The syntax for the command is shown in Example 3.5.
Example 3.5. Syntax for Starting a Daemon Broker on Unix
activemq start
{[xbean:file:confURI
[?validate=
{[true] | [false]}
]
] | [broker:brokerURI
] | [properties:propURI
]}
![]() | Tip |
---|---|
For a full description of the parameters see activemq start. |
For example, to start a daemon broker using the default broker configuration, enter:
%
activemq start xbean:file:conf/activemq.xml
You can optionally disable schema validation of the configuration file using the
validate
flag, as follows:
%
activemq start xbean:file:conf/activemq.xml?validate=false
By default, the daemon broker runs as the current user. It is good practice to specify a special effective user for the broker. This special effective user should be given just enough privileges to run the broker. This provides added security by ensuring that the broker process has limited ability to corrupt sensitive part of your system.
The ACTIVEMQ_USER
environment variable specifies the effective user for
the broker instances. By default, the broker will run as the currently logged in user. See
Setting up the Unix/Linux/OS X Environment.
On Unix, the activemq console command starts an instance of Fuse Message Broker as a foreground process. The syntax for the command is shown in Example 3.6.
Example 3.6. Syntax for Starting a Foreground Broker on Unix
activemq console
{[xbean:file:confURI
[?validate=
{[true] | [false]}
]
] | [broker:brokerURI
] | [properties:propURI
]}
![]() | Tip |
---|---|
For a full description of the parameters see activemq console. |
For example, you can start a broker in the foreground using the
default broker configuration, conf/activemq.xml
, as follows:
%
activemq console xbean:conf/activemq.xml