검색

4장. 독립 실행형 브로커 생성

download PDF

AMQ Broker를 사용하여 로컬 시스템에 독립 실행형 브로커 인스턴스를 생성하고 시작하며 일부 테스트 메시지를 생성 및 사용할 수 있습니다.

사전 요구 사항

  • AMQ Broker가 설치되어 있어야 합니다.

    자세한 내용은 3장. AMQ Broker 설치의 내용을 참조하십시오.

4.1. 브로커 인스턴스 생성

브로커 인스턴스는 브로커의 구성 및 런타임 데이터가 포함된 디렉터리입니다. 새 브로커 인스턴스를 생성하려면 먼저 broker 인스턴스의 디렉터리를 생성한 다음 artemis create 명령을 사용하여 브로커 인스턴스를 생성합니다.

다음 절차에서는 로컬 머신에 간단한 독립 실행형 브로커를 생성하는 방법을 설명합니다. 브로커는 기본 기본 기본 구성을 사용하고 지원되는 메시징 프로토콜을 사용하여 클라이언트의 연결을 허용합니다.

절차

  1. broker 인스턴스에 사용할 디렉터리를 생성합니다.

    If you are using…​이 작업을 수행합니다.

    Red Hat Enterprise Linux

    1. broker 인스턴스의 위치로 사용할 새 디렉터리를 생성합니다.

      $ sudo mkdir /var/opt/amq-broker
    2. 설치 중에 생성한 사용자를 할당합니다.

      $ sudo chown -R amq-broker:amq-broker /var/opt/amq-broker

    Windows

    Windows Explorer를 사용하여 브로커 인스턴스의 위치로 사용할 새 폴더를 만듭니다.

  2. artemis create 명령을 사용하여 브로커를 생성합니다.

    If you are using…​이 작업을 수행합니다.

    Red Hat Enterprise Linux

    1. 설치 중에 생성한 사용자 계정으로 전환합니다.

      $ su - amq-broker
    2. 브로커 인스턴스에 대해 방금 생성한 디렉터리로 변경합니다.

      $ cd /var/opt/amq-broker
    3. broker 인스턴스의 디렉터리에서 broker 인스턴스를 생성합니다.

      $ <install_dir>/bin/artemis create mybroker

    Windows

    1. broker 인스턴스에 대해 방금 생성한 디렉터리에서 명령 프롬프트를 엽니다.
    2. broker 인스턴스의 디렉터리에서 broker 인스턴스를 생성합니다.

      > <install_dir>\bin\artemis.cmd create mybroker
  3. artemis create 프롬프트에 따라 브로커 인스턴스를 구성합니다.

    예 4.1. artemis create를 사용하여 브로커 인스턴스 구성

    $ /opt/redhat/amq-broker/bin/artemis create mybroker
    
    Creating ActiveMQ Artemis instance at: /var/opt/amq-broker/mybroker
    
    --user: is mandatory with this configuration:
    Please provide the default username:
    admin
    
    --password: is mandatory with this configuration:
    Please provide the default password:
    
    --role: is mandatory with this configuration:
    Please provide the default role:
    amq
    
    --allow-anonymous | --require-login: is mandatory with this configuration:
    Allow anonymous access? (Y/N):
    Y
    
    Auto tuning journal ...
    done! Your system can make 19.23 writes per millisecond, your journal-buffer-timeout will be 52000
    
    You can now start the broker by executing:
    
    "/var/opt/amq-broker/mybroker/bin/artemis" run
    
    Or you can run the broker in the background using:
    
    "/var/opt/amq-broker/mybroker/bin/artemis-service" start
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

© 2024 Red Hat, Inc.