- JDK-1.8
- zookeeper-3.4.14
- rocketmq-3.2.6
zookeeper
进入到zookeeper的conf目录
清空配置文件,只保留下面这一行。zookeeper关闭日志输出相对简单。
log4j.rootLogger=OFF
rocketmq
进入到rocketmq的conf目录
logback_broker.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<logger name="RocketmqClient" additivity="false">
<level value="OFF" />
</logger>
<logger name="RocketmqBroker" additivity="false">
<level value="OFF" />
</logger>
<logger name="RocketmqCommon" additivity="false">
<level value="OFF" />
</logger>
<logger name="RocketmqStore" additivity="false">
<level value="OFF" />
</logger>
<logger name="RocketmqStoreError" additivity="false">
<level value="OFF" />
</logger>
<logger name="RocketmqTransaction" additivity="false">
<level value="OFF" />
</logger>
<logger name="RocketmqRebalanceLock" additivity="false">
<level value="OFF" />
</logger>
<logger name="RocketmqRemoting" additivity="false">
<level value="OFF" />
</logger>
<logger name="RocketmqStats" additivity="false">
<level value="OFF" />
</logger>
<root>
<level value="OFF" />
</root>
</configuration>
logback_filtersrv.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<logger name="RocketmqFiltersrv" additivity="false">
<level value="OFF" />
</logger>
<logger name="RocketmqCommon" additivity="false">
<level value="OFF" />
</logger>
<logger name="RocketmqRemoting" additivity="false">
<level value="OFF" />
</logger>
<root>
<level value="OFF" />
</root>
</configuration>
logback_namesrv.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<logger name="RocketmqNamesrv" additivity="false">
<level value="OFF" />
</logger>
<logger name="RocketmqCommon" additivity="false">
<level value="OFF" />
</logger>
<logger name="RocketmqRemoting" additivity="false">
<level value="OFF" />
</logger>
<root>
<level value="OFF" />
</root>
</configuration>
logback_tools.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<logger name="RocketmqTools" additivity="false">
<level value="OFF" />
</logger>
<logger name="RocketmqCommon" additivity="false">
<level value="OFF" />
</logger>
<logger name="RocketmqStore" additivity="false">
<level value="OFF" />
</logger>
<logger name="RocketmqRemoting" additivity="false">
<level value="OFF" />
</logger>
<root>
<level value="OFF" />
</root>
</configuration>
修改rocketmq JVM 内存大小
进入到rocketmq的bin目录
mqadmin.xml、mqbroker.xml、mqfiltersrv.xml、mqnamesrv.xml
修改options为以下内容,注意Xmx的值一定要比MaxNewSize的值大
MaxNewSize is equal to or greater than the entire heap
<options>
<-Xms512m></-Xms512m>
<-Xmx512m></-Xmx512m>
<-XX:NewSize>256M</-XX:NewSize>
<-XX:MaxNewSize>256M</-XX:MaxNewSize>
</options>
rocketmq数据存储位置为用户目录下的store(如果报错了,开发或者测试环境可以随便删除)
rocketmq日志文件存储位置为用户目录下的logs