Red Hat AMQ 6
As of February 2025, Red Hat is no longer supporting Red Hat AMQ 6. If you are using AMQ 6, please upgrade: Migrating to AMQ 7.Broker Administration Tutorials
Red Hat JBoss A-MQ
Simple recipes for managing a message broker
Version 6.0
Copyright © 2013 Red Hat, Inc. and/or its affiliates.
13 Oct 2017
Abstract
This set of tutorials walks you through some basic management tasks.
Chapter 1. Starting a Broker Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Abstract
In this tutorial you will launch a Red Hat JBoss A-MQ instance from the command line.
Goals Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
In this tutorial you will:
- add the Red Hat JBoss A-MQ command line tools to your system path
- start a JBoss A-MQ instance
Prerequisites Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
This tutorial requires that you have JBoss A-MQ installed.
Procedure for Windows Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
To start a broker on Windows:
- Open a command prompt at the instance's root folder.
- Add the JBoss A-MQ command line tools your path by entering
c:\ set PATH=%PATH%;InstallDir\bin
c:\ set PATH=%PATH%;InstallDir\binCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Start the broker instance by entering
c:\ start
c:\ startCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure for Unix/Linux/OSX Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
To start a broker:
- Open a command prompt at the instance's root folder.
- Add the JBoss A-MQ command line tools your path by entering
% set PATH=$PATH;InstallDir/bin
% set PATH=$PATH;InstallDir/binCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Start the broker instance by entering
start
startCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 2. Installing a Broker as a Windows Service Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Abstract
In this tutorial you will install a Red Hat JBoss A-MQ instance as a Windows service.
Goals Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
In this tutorial you will:
- generate the service wrapper
- configure the Java Wrapper Service for your system
- install a broker instance as a Windows service
- configure the broker's service to start up automatically
Prerequisites Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
This tutorial requires that you have Red Hat JBoss A-MQ installed on a Windows computer to which you have administrative privileges.
Procedure Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
To install JBoss A-MQ as a Windows service:
- Start JBoss A-MQ in console mode using the amq command.
- Once the console is started and the command prompt appears, enter
features:install wrapper.The features:install command will locate the required libraries to provision the wrapper feature and deploy it into the run time. - Generate the wrapper by entering
wrapper:install -n JBossMQ -d JBossMQ -D "JBossMQ Broker".You should see the output shown in Example 2.1, “Wrapper Install Output”.Example 2.1. Wrapper Install Output
Creating file: InstallDir\bin\FuseMQ-wrapper.exe Creating file: InstallDir\bin\JBossMQ-service.bat Creating file: InstallDir\etc\JBossMQ-wrapper.conf Creating file: InstallDir\lib\libwrapper.so Creating file: InstallDir\lib\karaf-wrapper.jar Creating file: InstallDir\lib\karaf-wrapper-main.jar Setup complete. You may wish to tweak the JVM properties in the wrapper config ration file: InstallDir\etc\JBossMQ-wrapper.conf before installing and starting the service. To install the service, run: C:> InstallDir\bin\JBossMQ-service.bat install Once installed, to start the service run: C:> net start "JBossMQ" Once running, to stop the service run: C:> net stop "JBossMQ" Once stopped, to remove the installed the service run: C:> InstallDir\bin\karaf-service.bat remove
Creating file: InstallDir\bin\FuseMQ-wrapper.exe Creating file: InstallDir\bin\JBossMQ-service.bat Creating file: InstallDir\etc\JBossMQ-wrapper.conf Creating file: InstallDir\lib\libwrapper.so Creating file: InstallDir\lib\karaf-wrapper.jar Creating file: InstallDir\lib\karaf-wrapper-main.jar Setup complete. You may wish to tweak the JVM properties in the wrapper config ration file: InstallDir\etc\JBossMQ-wrapper.conf before installing and starting the service. To install the service, run: C:> InstallDir\bin\JBossMQ-service.bat install Once installed, to start the service run: C:> net start "JBossMQ" Once running, to stop the service run: C:> net stop "JBossMQ" Once stopped, to remove the installed the service run: C:> InstallDir\bin\karaf-service.bat removeCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Open
InstallDir\etc\JBossMQ-wrapper.confin a text editor.TheServiceName-wrapper.conffile configures the Java Wrapper Service that JBoss A-MQ uses to create a Windows service. - Change the line containing
set.default.KARAF_HOME=toset.default.KARAF_HOME=InstallDir
set.default.KARAF_HOME=InstallDirCopy to Clipboard Copied! Toggle word wrap Toggle overflow This tells the wrapper where the JBoss A-MQ installation is located so it can find the required libraries. - Change the line containing
set.default.KARAF_BASEtoset.default.KARAF_BASE=InstallDir
set.default.KARAF_BASE=InstallDirCopy to Clipboard Copied! Toggle word wrap Toggle overflow This tells the wrapper where to find the configuration and data files for the broker instance being used for the service. - Change the line containing
set.default.KARAF_DATAtoset.default.KARAF_BASE=InstallDir\data
set.default.KARAF_BASE=InstallDir\dataCopy to Clipboard Copied! Toggle word wrap Toggle overflow This tells the wrapper where to find the configuration and data files for the broker instance being used for the service. - Save the file.
- Open a command prompt.
- Change to the
InstallDirdirectory. - Install the broker as a Windows service by running
bin\JBossMQ-service.bat install. - From the Windows menu select → → → .The Services window opens.
- Double click JBossMQ from the list of services.The JBossMQ Properties window opens.
- Specify that the service will start up when you login by selecting Automatic from the Startup Type drop-down list.
- Click .
- Open the context menu for the entry in the service list.
- Select to start the broker.
Further steps Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
You can stop the broker service by selecting in the Service window's context menu.
To uninstall the broker as a Windows service use
InstallDir\bin\JBossMQ-service.bat removes.
Chapter 3. Shutting Down a Broker Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Abstract
This tutorial demonstrates how to shutdown a locally running message broker.
Goals Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
In this tutorial you will:
- add the Red Hat JBoss A-MQ command line tools to your system path
- stop a locally running JBoss A-MQ instance
Prerequisites Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
To complete this tutorial you will need to have a broker instance running locally.
Procedure for Windows Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
To shutdown a broker on Windows:
- Add the JBoss A-MQ command line tools your path by entering
c:\ set PATH=%PATH%;InstallDir\bin
c:\ set PATH=%PATH%;InstallDir\binCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Shutdown the broker instance by entering
c:\ stop
c:\ stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure for Unix/Linux/OSX Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
To start a broker:
- Add the JBoss A-MQ command line tools your path by entering
% set PATH=$PATH;InstallDir/bin
% set PATH=$PATH;InstallDir/binCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Shutdown the broker by entering
% stop
% stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Legal Notice Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Trademark Disclaimer
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Apache, ServiceMix, Camel, CXF, and ActiveMQ are trademarks of Apache Software Foundation. Any other names contained herein may be trademarks of their respective owners.
Legal Notice Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Third Party Acknowledgements
One or more products in the Red Hat JBoss A-MQ release includes third party components covered by licenses that require that the following documentation notices be provided:
- JLine (http://jline.sourceforge.net) jline:jline:jar:1.0License: BSD (LICENSE.txt) - Copyright (c) 2002-2006, Marc Prud'hommeaux
mwp1@cornell.eduAll rights reserved.Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of JLine nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - Stax2 API (http://woodstox.codehaus.org/StAX2) org.codehaus.woodstox:stax2-api:jar:3.1.1License: The BSD License (http://www.opensource.org/licenses/bsd-license.php)Copyright (c) <YEAR>, <OWNER> All rights reserved.Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - jibx-run - JiBX runtime (http://www.jibx.org/main-reactor/jibx-run) org.jibx:jibx-run:bundle:1.2.3License: BSD (http://jibx.sourceforge.net/jibx-license.html) Copyright (c) 2003-2010, Dennis M. Sosnoski.All rights reserved.Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of JiBX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - JavaAssist (http://www.jboss.org/javassist) org.jboss.javassist:com.springsource.javassist:jar:3.9.0.GA:compileLicense: MPL (http://www.mozilla.org/MPL/MPL-1.1.html)
- HAPI-OSGI-Base Module (http://hl7api.sourceforge.net/hapi-osgi-base/) ca.uhn.hapi:hapi-osgi-base:bundle:1.2License: Mozilla Public License 1.1 (http://www.mozilla.org/MPL/MPL-1.1.txt)