4.2. 启动代理实例

创建代理实例后,您将使用 artemis run 命令启动它。

流程

  1. 切换到安装期间创建的用户帐户。

    $ su - amq-broker
  2. 使用 artemis run 命令启动代理实例。

    $ /var/opt/amq-broker/mybroker/bin/artemis run
    
              __  __  ____    ____            _
        /\   |  \/  |/ __ \  |  _ \          | |
       /  \  | \  / | |  | | | |_) |_ __ ___ | | _____ _ __
      / /\ \ | |\/| | |  | | |  _ <| '__/ _ \| |/ / _ \ '__|
     / ____ \| |  | | |__| | | |_) | | | (_) |   <  __/ |
    /_/    \_\_|  |_|\___\_\ |____/|_|  \___/|_|\_\___|_|
    
    Red Hat JBoss AMQ 7.2.1.GA
    
    10:53:43,959 INFO  [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server
    10:53:44,076 INFO  [org.apache.activemq.artemis.core.server] AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=false,journalDirectory=./data/journal,bindingsDirectory=./data/bindings,largeMessagesDirectory=./data/large-messages,pagingDirectory=./data/paging)
    10:53:44,099 INFO  [org.apache.activemq.artemis.core.server] AMQ221012: Using AIO Journal
    ...

    代理使用以下信息启动并显示日志输出:

    • 事务日志和集群配置的位置。
    • 用于消息持久性的日志类型(本例中为 AIO)。
    • 可接受客户端连接的 URI。

      默认情况下,端口 61616 可以接受来自任何支持的协议(CORE、MQTT、AMQP、STOMP、HORNETQ 和 OPENWIRE)的连接。每个协议也都有单独的端口。

    • Web 控制台位于 http://localhost:8161
    • Jolokia 服务(JMX over REST)位于 http://localhost:8161/jolokia