Compare commits

..

No commits in common. "edc2e7cd87ea8d800ef2c3a67ed588e15d8f5215" and "81e540dda8fe3c554007c5a29cf46104b2ec32b3" have entirely different histories.

5 changed files with 29 additions and 143 deletions

View File

@ -1,28 +0,0 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
brokerClusterName = DefaultCluster
brokerName = broker-a
brokerId = 0
deleteWhen = 04
fileReservedTime = 48
brokerRole = ASYNC_MASTER
flushDiskType = ASYNC_FLUSH
autoCreateTopicEnable=true
autoCreateSubscriptionGroup=true
listenPort=10911
namesrvAddr=localhost:9876
storePathRootDir=./store
storePathCommitLog=./store/commitlog

View File

@ -1 +0,0 @@
store/

View File

@ -1,36 +0,0 @@
@echo off
setlocal enabledelayedexpansion
chcp 65001 >nul
title RocketMQ Consumer Group Initialization
:: BROKER_NAME
set "BROKER_NAME=broker-a"
:: 集群名称
set "CLUSTER_NAME=DefaultCluster"
echo.
echo [INFO] 正在创建消费者组
for %%g in (
"SIMULATION_FIFO_001"
"CID_standard_topic_sample"
"CID_ONSAPI_OWNER"
"SELF_TEST_C_GROUP"
"SIMULATION_FIFO_002"
"TOOLS_CONSUMER"
"CID_ONSAPI_PULL"
"CID_ONSAPI_PERMISSION"
"CID_RMQ_SYS_TRANS"
"FILTERSRV_CONSUMER"
"CID_ONS-HTTP-PROXY"
) do (
echo [INFO] 创建消费者组: %%~g
curl -X POST ^
http://localhost:8088/consumer/createOrUpdate.do ^
-H "Content-Type: application/json" ^
-d "{\"brokerNameList\":[\"%BROKER_NAME%\"],\"subscriptionGroupConfig\":{\"groupName\":\"%%~g\",\"consumeEnable\":true,\"consumeMessageOrderly\":false,\"consumeFromMinEnable\":true,\"consumeBroadcastEnable\":true,\"retryQueueNums\":1,\"retryMaxTimes\":16,\"brokerId\":0,\"whichBrokerWhenConsumeSlowly\":1},\"clusterNameList\":[\"%CLUSTER_NAME%\"]}"
echo.
)
echo 所有消费者组创建完成!
pause
exit /b 0

View File

@ -1,37 +0,0 @@
@echo off
setlocal enabledelayedexpansion
chcp 65001 >nul
title RocketMQ Topic Initialization
:: BROKER_NAME
set "BROKER_NAME=broker-a"
:: 集群名称
set "CLUSTER_NAME=DefaultCluster"
echo.
echo [INFO] 正在创建普通主题
for %%t in (
"rt-efficiency-index"
"scenario-content-publish"
"scenario-content-subscribe"
"scenario-factor-publish"
"scenario-factor-subscribe"
"simulation-command"
"simulation-engine"
"simulation-running-control-percent"
"simulation-running-control-sse"
"simulation-task-feedback"
"simulation-task-publish"
"simulation-trainExRl"
) do (
echo [INFO] 创建普通主题: %%~t
curl -X POST ^
http://localhost:8088/topic/createOrUpdate.do ^
-H "Content-Type: application/json" ^
-d "{\"writeQueueNums\":8,\"readQueueNums\":8,\"perm\":6,\"order\":false,\"topicName\":\"%%~t\",\"brokerNameList\":[\"%BROKER_NAME%\"],\"messageType\":\"NORMAL\",\"clusterNameList\":[\"%CLUSTER_NAME%\"]}"
echo.
)
echo 所有主题创建完成!
pause
exit /b 0

View File

@ -22,6 +22,7 @@ if not exist "%ROCKETMQ_HOME%\bin\mqnamesrv.cmd" (
if "%JAVA_HOME%" == "" (
echo [WARN] JAVA_HOME is not set, trying to find Java automatically...
goto :FOUNING_JAVA
) else (
if not exist "%JAVA_HOME%\bin\java.exe" (
echo [WARN] %JAVA_HOME%\bin\java.exe is not exist, trying to find Java automatically...
@ -66,21 +67,14 @@ exit /b 1
:START_SERVER
echo [INFO] Using JAVA_HOME: %JAVA_HOME%
if exist "%ROCKETMQ_HOME%\sbin\store\" (
set "INITIAL=TRUE"
)
:: 4. 启动 NameServer
start "RocketMQ NameServer" cmd /k "%ROCKETMQ_HOME%\bin\mqnamesrv.cmd"
:: 等待 NameServer 启动
timeout /t 5 /nobreak >nul
timeout /t 10 /nobreak >nul
:: 5. 启动 Broker如果需要直接访问 Broker可单独启动
:: start "RocketMQ Broker" cmd /k "%ROCKETMQ_HOME%\bin\mqbroker.cmd" -n localhost:9876
:: start "RocketMQ Broker" cmd /k "%ROCKETMQ_HOME%\bin\mqbroker.cmd" -n localhost:9876 autoCreateTopicEnable=true
:: start "RocketMQ Broker" cmd /k "%ROCKETMQ_HOME%\bin\mqbroker.cmd" -n localhost:9876 -c ../conf/broker.conf
start "RocketMQ Broker" cmd /k "%ROCKETMQ_HOME%\bin\mqbroker.cmd" -c ../conf/broker-localhost.conf
start "RocketMQ Broker" cmd /k "%ROCKETMQ_HOME%\bin\mqbroker.cmd" -n localhost:9876 autoCreateTopicEnable=true
:: 等待 Broker 启动
timeout /t 10 /nobreak >nul
@ -102,11 +96,5 @@ echo - Broker (端口: 10911)
echo - Proxy (端口: 8081)
echo - Dashboard (端口: 8080)
:: if "%INITIAL%"="" (
:: timeout /t 2 /nobreak >nul
:: echo RocketMQ 数据初始化...
:: start "Rocket Create Topic" "initial-topic.bat"
:: start "Rocket Create Consumer" "initial-consumer.bat"
:: )
pause
endlocal