MQ middle ware test/rocketmq-all-4.7.0-bin-release

1. set JAVA_HOME/ROCKETMQ_HOME

D:\git-yl\rocketmq-all-4.7.0-bin-release>set JAVA_HOME=D:\git-yl\jdk-8u171-windows-x64


D:\git-yl\rocketmq-all-4.7.0-bin-release>
D:\git-yl\rocketmq-all-4.7.0-bin-release>set  ROCKETMQ_HOME=D:\git-yl\rocketmq-all-4.7.0-bin-release

D:\git-yl\rocketmq-all-4.7.0-bin-release>cd bin

D:\git-yl\rocketmq-all-4.7.0-bin-release\bin>dir mq*.cmd
 驱动器 D 中的卷是 hushui
 卷的序列号是 6E02-8673

 D:\git-yl\rocketmq-all-4.7.0-bin-release\bin 的目录

2020/03/04  09:59             1,029 mqadmin.cmd
2020/03/04  09:59             1,084 mqbroker.cmd
2020/03/04  09:59             1,088 mqnamesrv.cmd ====>  runserver.cmd
2020/03/04  09:59             1,398 mqshutdown.cmd
               4 个文件          4,599 字节
               0 个目录 362,597,347,328 可用字节

2.  start  mqnamesrv  & mqbroker

D:\git-yl\rocketmq-all-4.7.0-bin-release\bin>start  mqnamesrv.cmd
 
Java HotSpot(TM) 64-Bit Server VM warning: Using the DefNew young collector with the CMS collector is deprecated and will likely be removed in a future release
Java HotSpot(TM) 64-Bit Server VM warning: UseCMSCompactAtFullCollection is deprecated and will likely be removed in a future release.
The Name Server boot success. serializeType=JSON
#################################################
#######   C:\Users\%USERPROFILE%\logs\rocketmqlogs\namesrv.log
2020-06-22 11:16:07 INFO main - rocketmqHome=D:\git-yl\rocketmq-all-4.7.0-bin-release
2020-06-22 11:16:07 INFO main - kvConfigPath=C:\Users\hushui\namesrv\kvConfig.json
2020-06-22 11:16:07 INFO main - configStorePath=C:\Users\hushui\namesrv\namesrv.properties
2020-06-22 11:16:07 INFO main - productEnvName=center
2020-06-22 11:16:07 INFO main - clusterTest=false
2020-06-22 11:16:07 INFO main - orderMessageEnable=false
2020-06-22 11:16:07 INFO main - listenPort=9876
#######   C:\Users\%USERPROFILE%\logs\rocketmqlogs\namesrv.log
#################################################


D:\git-yl\rocketmq-all-4.7.0-bin-release\bin>start mqbroker.cmd -n 127.0.0.1:9876 autoCreateTopicEnable=true
The broker[Hushui, 192.168.56.1:10911] boot success. serializeType=JSON and name server is 127.0.0.1:9876

 

3. ######### Test Consumer/Producer   


D:\git-yl\rocketmq-all-4.7.0-bin-release\bin>start mqbroker.cmd -n 127.0.0.1:9876 autoCreateTopicEnable=true

D:\git-yl\rocketmq-all-4.7.0-bin-release\bin>set NAMESRV_ADDR=127.0.0.1:9876

D:\git-yl\rocketmq-all-4.7.0-bin-release\bin>
D:\git-yl\rocketmq-all-4.7.0-bin-release\bin>
D:\git-yl\rocketmq-all-4.7.0-bin-release\bin>start  tools.cmd org.apache.rocketmq.example.quickstart.Consumer


D:\git-yl\rocketmq-all-4.7.0-bin-release\bin>set NAMESRV_ADDR=127.0.0.1:9876
12:18:32.938 [main] DEBUG i.n.u.i.l.InternalLoggerFactory - Using SLF4J as the default logging framework
Consumer Started.

D:\git-yl\rocketmq-all-4.7.0-bin-release\bin>start  tools.cmd org.apache.rocketmq.example.quickstart.Producer
12:20:16.658 [main] DEBUG i.n.u.i.l.InternalLoggerFactory - Using SLF4J as the default logging framework
RocketMQLog:WARN No appenders could be found for logger (io.netty.util.internal.PlatformDependent0).
RocketMQLog:WARN Please initialize the logger system properly.
SendResult [sendStatus=SEND_OK, msgId=C0A81F8A4B903764951D6ECB4F810000, offsetMsgId=C0A8380100002A9F000000000002BEB2, messageQueue=MessageQueue [topic=TopicTest, brokerName=Hushui, queueId=1], queueOffset=250]
SendResult [sendStatus=SEND_OK, msgId=C0A81F8A4B903764951D6ECB4F910001, offsetMsgId=C0A8380100002A9F000000000002BF64, messageQueue=MessageQueue [topic=TopicTest, brokerName=Hushui, queueId=2], queueOffset=250]
........................
....................
############### Generate 1000  messages from Producer side
................
SendResult [sendStatus=SEND_OK, msgId=C0A81F8A4B903764951D6ECB55D203E7, offsetMsgId=C0A8380100002A9F0000000000057CB0, messageQueue=MessageQueue [topic=TopicTest, brokerName=Hushui, queueId=0], queueOffset=499]
12:20:19.544 [NettyClientSelector_1] INFO  RocketmqRemoting - closeChannel: close the connection to remote address[192.168.56.1:10911] result: true
12:20:19.545 [NettyClientSelector_1] INFO  RocketmqRemoting - closeChannel: close the connection to remote address[127.0.0.1:9876] result: true

D:\git-yl\rocketmq-all-4.7.0-bin-release\bin>


########### Print received messages  on Consumer side 

12:18:32.938 [main] DEBUG i.n.u.i.l.InternalLoggerFactory - Using SLF4J as the default logging framework
Consumer Started.
ConsumeMessageThread_1 Receive New Messages: [MessageExt [brokerName=Hushui, queueId=1, storeSize=178, queueOffset=250, sysFlag=0, bornTimestamp=1592799617921, bornHost=/192.168.56.1:50389, storeTimestamp=1592799617926, storeHost=/192.168.56.1:10911, msgId=C0A8380100002A9F000000000002BEB2, commitLogOffset=179890, bodyCRC=613185359, reconsumeTimes=0, preparedTransactionOffset=0, toString()=Message{topic='TopicTest', flag=0, properties={MIN_OFFSET=0, MAX_OFFSET=251, CONSUME_START_TIME=1592799617934, UNIQ_KEY=C0A81F8A4B903764951D6ECB4F810000, WAIT=true, TAGS=TagA}, body=[72, 101, 108, 108, 111, 32, 82, 111, 99, 107, 101, 116, 77, 81, 32, 48], transactionId='null'}]]
ConsumeMessageThread_2 Receive New Messages: [MessageExt [brokerName=Hushui, queueId=2, storeSize=178, queueOffset=250, sysFlag=0, bornTimestamp=1592799617937, bornHost=/192.168.56.1:50389, storeTimestamp=1592799617938, storeHost=/192.168.56.1:10911, msgId=C0A8380100002A9F000000000002BF64, commitLogOffset=180068, bodyCRC=1401636825, reconsumeTimes=0, preparedTransactionOffset=0, toString()=Message{topic='TopicTest', flag=0, properties={MIN_OFFSET=0, MAX_OFFSET=251, CONSUME_START_TIME=1592799617940, UNIQ_KEY=C0A81F8A4B903764951D6ECB4F910001, WAIT=true, TAGS=TagA}, body=[72, 101, 108, 108, 111, 32, 82, 111, 99, 107, 101, 116, 77, 81, 32, 49], transactionId='null'}]]
................
...............
..............
............
ConsumeMessageThread_7 Receive New Messages: [MessageExt [brokerName=Hushui, queueId=3, storeSize=180, queueOffset=499, sysFlag=0, bornTimestamp=1592799619537, bornHost=/192.168.56.1:50389, storeTimestamp=1592799619537, storeHost=/192.168.56.1:10911, msgId=C0A8380100002A9F0000000000057BFC, commitLogOffset=359420, bodyCRC=1359908749, reconsumeTimes=0, preparedTransactionOffset=0, toString()=Message{topic='TopicTest', flag=0, properties={MIN_OFFSET=0, MAX_OFFSET=500, CONSUME_START_TIME=1592799619539, UNIQ_KEY=C0A81F8A4B903764951D6ECB55D103E6, WAIT=true, TAGS=TagA}, body=[72, 101, 108, 108, 111, 32, 82, 111, 99, 107, 101, 116, 77, 81, 32, 57, 57, 56], transactionId='null'}]]
 

 

 

4. rocketmq-console-ng-1.0.1.jar/Web 

 

D:\git-yl>

D:\git-yl>java -jar rocketmq-console-ng-1.0.1.jar  --server.port=18280  --rocketmq.config.namesrvAddr=127.0.0.1:9876
12:35:21,748 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
12:35:21,748 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
12:35:21,748 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/D:/git-yl/rocketmq-console-ng-1.0.1.jar!/BOOT-INF/classes!/logback.xml]
12:35:21,772 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@3d494fbf - URL [jar:file:/D:/git-yl/rocketmq-console-ng-1.0.1.jar!/BOOT-INF/classes!/logback.xml] is not of type file
12:35:21,816 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
12:35:21,827 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
12:35:21,836 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
12:35:21,842 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
12:35:21,887 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
12:35:21,891 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
12:35:21,907 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@500977346 - No compression will be used
12:35:21,908 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@500977346 - Will use the pattern C:/Users/hushui/logs/consolelogs/rocketmq-console-%d{yyyy-MM-dd}.%i.log for the active file
12:35:21,911 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@133314b - The date pattern is 'yyyy-MM-dd' from file name pattern 'C:/Users/hushui/logs/consolelogs/rocketmq-console-%d{yyyy-MM-dd}.%i.log'.
12:35:21,911 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@133314b - Roll-over at midnight.
12:35:21,914 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@133314b - Setting initial period to Mon Jun 22 12:34:53 CST 2020
12:35:21,914 |-WARN in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@133314b - SizeAndTimeBasedFNATP is deprecated. Use SizeAndTimeBasedRollingPolicy instead
12:35:21,917 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
12:35:21,919 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: C:\Users\hushui/logs/consolelogs/rocketmq-console.log
12:35:21,919 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [C:\Users\hushui/logs/consolelogs/rocketmq-console.log]
12:35:21,920 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
12:35:21,920 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
12:35:21,920 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT]
12:35:21,921 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
12:35:21,921 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@b1bc7ed - Registering current configuration as safe fallback point


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.4.3.RELEASE)

你可能感兴趣的:(HTTP,CrossPlatform)