Original: http://blog.csdn.net/u014134180/article/details/51790988
Directory
- Directory
- A preparatory work
- 1 ROCKETMQ Deployment Architecture 1
- 2 Environment Configuration
- Two mounting ROCKETMQ
- 1 Download the compiled ROCKETMQ
- 2 Unzip and enter the bin directory
- 3 Start Name server
- 4 Start Broker
- 5 MQ Installation Complete
- Three verify that MQ is installed successfully
- 1 Download the test environment
- 2 method one at the cmd terminal using MVN for testing
- 21 Configuring the MVN environment
- 21 Go to Directory run mvn install compile demo
- 22 entering the generated target directory
- 23 Start producer Production data
- 24 Start consumer consumption data
- 3 Method Two in Ecplise import Mavan project into the test
- 31 Importing existing MAVEN projects
- 32 Change to UTF-8 encoding by Altenter
- 33 Uncomment the server IP and commodity codes
- 34 running producer and consumer code
- Four more information
A preparatory work 1.1 ROCKETMQ deployment Architecture 1
This article installs and tests all in the same computer, all IP is 127.0.0.1, nameserver one, broker one, producer one, consumer one.
1.2 Environment configuration
Operating system: Windows 7 64-bit flagship edition
jdk:1.7 or more
Two mounting ROCKETMQ
Note: Only 64-bit Windows is supported, please install 64-bit JDK, preferably with jdk7.
2.1 Download the compiled ROCKETMQ
Download the published version of the compiled ROCKETMQ, or you can compile it yourself: https://github.com/alibaba/RocketMQ/releases
2.2 Unzip and go to Bin directory
2.3 Start Name server
Hit Mqnamesrv.exe, start name server, keep Mqnamesrv.exe running, do not close this terminal.
2.4 Start Broker
Method One: Open another Windows terminal cmd, enter the extracted bin directory, enter the set NAMESRV_ADDR=127.0.0.1:9876
settings environment variable, enter the mqbroker.exe
start broker, keep Mqbroker.exe running, do not close this terminal.
Method Two: Open another Windows terminal cmd, enter the extracted bin directory, you can also enter the mqbroker -n 127.0.0.1:9876
start broker in one step, keep mqbroker.exe running, do not close this terminal.
2.5 MQ Installation Complete Three verify that MQ is installed successfully 3.1 download test environment
Demo of the preliminaries, and unzip
Git Clone Https://code.aliyun.com/MiddlewareRace/PreliminaryDemo.git
3.2 Method One: Test 3.2.1 configuration MVN environment using MVN at CMD terminal
Download MVN tool on your own to Apache, unzip and configure MVN as follows (Java JDK with configuration)
3.2.1 into the directory, run
mvn install
Compiling demo
3.2.2 into the generated target directory
3.2.3 Start producer production data
to keep Mqnamesrv.exe and Mqbroker.exe two servers running first.
In the target directory, enter:
Java -Drocketmq.namesrv.addr=127.0.0.1:9876 -cp preliminary.demo-1.0-SNAPSHOT.jar com.alibaba.middleware.race.rocketmq.Producer
3.2.4 Start consumer consumption data
In the target directory, enter:
java -Drocketmq.namesrv.addr=127.0.0.1:9876 -cp preliminary.demo-1.0-SNAPSHOT.jar com.alibaba.middleware.race.rocketmq.Consumer
3.3 Method Two: In Ecplise import Mavan project into Test 3.3.1 Import existing MAVEN project
3.3.2 Press Alt+enter to change to UTF-8 encoding
3.3.3 Uncomment the server IP and commodity codes
3.3.4 run producer and consumer code
To keep Mqnamesrv.exe and Mqbroker.exe two servers running first.
Four more information
- Ali Middleware Performance Challenge:
Https://tianchi.shuju.aliyun.com/promotion-programming
- Alibaba middleware Performance Challenge (cloud-based community) Knowledge Summary:
Https://yq.aliyun.com/topic/35
- [2016 Ali Middleware Performance Challenge] "6.27 Update" You can't miss: Ali Middleware performance Challenge important learning materials:
Https://bbs.aliyun.com/read/277544.html
- "Code Submission Considerations":
Https://bbs.aliyun.com/read/286553.html
Setting up ROCKETMQ under Windows