이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 9. Starting a Broker


Abstract

You start a broker using a simple command. The broker can either be started so that it launches a command console or so that it runs as a daemon process. When a broker is part of a fabric, you can remotely start the broker remotely.

Overview

A broker can be run in one of two modes:
  • console mode—the broker starts up as a foreground process and presents the user with a command shell
  • daemon mode—the broker starts up as a background process that can be manged using a remote console or the provided command line tools
The default location for the broker's configuration for the broker is the InstallDir/etc/activemq.xml configuration file. The configuration uses values loaded from the InstallDir/etc/system.properties file and the InstallDir/etc/org.fusesource.mq.fabric.server-default.cfg file.

Starting in console mode

When you start the broker in console mode you will be placed into a command shell that provides access to a number of commands for managing the broker and its OSGi runtime.
Important
When the broker is started in console mode, you cannot close the console without killing the broker.
To launch a broker in console mode, change to InstallDir and run one of the commands in Table 9.1, “Start up Commands for Console Mode”.
Table 9.1. Start up Commands for Console Mode
Windowsbin\amq.bat
Unixbin/amq
If the server starts up correctly you should see something similar to Example 9.1, “Broker Console” on the console.

Example 9.1. Broker Console

______ ___ ___ _____ | ___| | \/ || _ | | |_ _ _ ___ ___ | . . || | | | | _|| | | |/ __| / _ \ | |\/| || | | | | | | |_| |\__ \| __/ | | | |\ \/' / \_| \__,_||___/ \___| \_| |_/ \_/\_\ Fuse MQ (7.0.0.fuse-036) http://fusesource.org/mq/ Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown Fuse MQ. 
JBossA-MQ:karaf@root>

Starting in daemon mode

Launching a broker in daemon mode runs Red Hat JBoss A-MQ in the background without a console. To launch a broker in daemon mode, change to InstallDir and run one of the commands in Table 9.2, “Start up Commands for Daemon Mode”.
Table 9.2. Start up Commands for Daemon Mode
Windowsbin\start.bat
Unixbin/start

Starting a broker in a fabric

If a broker is deployed as part of a fabric you can start it remotely in one of three ways:
  • using the console of one of the other broker's in the fabric
    If one of the brokers in the fabric is running in console mode you an use the fabric:container-start command to start any of the other brokers in the fabric. The command requires that you supply the container name used when creating the broker in the fabric. For example to start a broker named fabric-broker3 you woul duse the command shown in Example 9.2, “Starting a Broker in a Fabric”.

    Example 9.2. Starting a Broker in a Fabric

    JBossA-MQ:karaf@root> fabric:container-start fabric-broker3
  • using the administration client of one of the broker's in the fabric
    If none of the brokers are running in console mode, you can use the administration client on one of the brokers to execute the fabric:container-start command. The administration client is run using the client command in Red Hat JBoss A-MQ's bin folder. Example 9.3, “Starting a Broker in a Fabric with the Administration Client” shows how to use the remote client to start remote broker in the fabric.

    Example 9.3. Starting a Broker in a Fabric with the Administration Client

    bin/client fabric:container-start fabric-broker3
  • using the management console
    The management console can start and stop any of the brokers in the fabric it manages from a Web based console.
    For more information see Using the Management Console.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.