activeMq5.7入门指南翻译

Getting Started

Welcome to Apache ActiveMQ. This document gives you a quick overview of how to get started trying out Apache ActiveMQ.

Running the broker

From the binary distribution you can run the Apache ActiveMQ server via the bin/activemq command. If you're using Windows, just type

    cd bin
    activemq.bat

On Unix-like systems, type

    ./bin/activemq console

to start the broker in foreground.

The Apache ActiveMQ broker should now have started

Tip: If you run the bin/activemq command without any arguments it will output usage.

To stop the broker you can press ctrl + c to stop the process.

Running the broker in the background

The broker can be started as a background process via the bin/activemq command on Unix-like systems, type

    ./bin/activemq start

to start the broker in background. The broker will write to its log in the data/activemq.log file.

Stopping the broker

The broker can be stopped via the bin/activemq command If you're using Windows, just type

    cd bin
    activemq.bat stop

On Unix-like systems, type

    ./bin/activemq stop

to stop the broker.

Access the web console

In a web browser you can access the url http://0.0.0.0:8161/admin to access the ActiveMQ web console.

Access the web demos

In a web browser you can access the url http://0.0.0.0:8161/demo to access the ActiveMQ web demos.

Running the example programs

To run the demo producer/consumer tools, you need Java and Ant installed.

Installing Ant

The example programs depend on Ant being installed. There are more detailed instructions on the Ant website - but essentially you need to follow these steps.

  • JAVA_HOME must point to your JDK installation, such that $JAVA_HOME/bin contains the java executable and $JAVA_HOME/lib contains some jar files.
  • ANT_HOME must point to where you installed Apache Ant (http://ant.apache.org)
  • then you need to add $JAVA_HOME/bin and $ANT_HOME/bin to your PATH variable.

To test this is all working, try typing

    java -version
    cd example
    ant -version

Running the example producer and consumer

Once you've got Java and Ant installed correctly you should be able to run

    cd example
    ant consumer

and in another shell

    cd example
    ant producer

you can specify exact URLs to connect to via command like arguments. e.g.

    ant producer -Durl=tcp://somehost:port

Further Readings

You can find more details about Apache ActiveMQ at its website http://activemq.apache.org, as well the guide getting started guide.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值