Skip to content

Latest commit

 

History

History

rocketmq-spring-boot-samples

rocketmq-spring-boot-samples

License

It's a demo project for how to use rocketmq-spring-boot

Run the test case locally

  1. build and install the rocketmq-spring-boot-starter

  2. startup rocketmq according to quick-start, verify the namesvr and broker startup correctly, Note: DON'T do "Shutdown Servers" step. http://rocketmq.apache.org/docs/quick-start/

  3. create topics for the demo test cases

bash bin/mqadmin updateTopic -c DefaultCluster -t string-topic
bash bin/mqadmin updateTopic -c DefaultCluster -t order-paid-topic
bash bin/mqadmin updateTopic -c DefaultCluster -t message-ext-topic
bash bin/mqadmin updateTopic -c DefaultCluster -t spring-transaction-topic
  1. run tests
# open a terminal, run produce
cd rocketmq-produce-demo
mvn clean package
java -jar target/rocketmq-produce-demo-0.0.1-SNAPSHOT.jar

# open another terminal, run consume
cd rocketmq-consume-demo
mvn clean package
java -jar target/rocketmq-consume-demo-0.0.1-SNAPSHOT.jar