Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
raphaelmichael
Rocketmq
提交
9d11b56c
R
Rocketmq
项目概览
raphaelmichael
/
Rocketmq
与 Fork 源项目一致
Fork自
Apache RocketMQ / Rocketmq
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rocketmq
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9d11b56c
编写于
5月 22, 2018
作者:
傅
傅冲
提交者:
Li Zhanhui
5月 31, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Issue #311 improve broker register topicrouter info performance
上级
6eccf758
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
2 deletion
+23
-2
broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java
...ain/java/org/apache/rocketmq/broker/BrokerController.java
+1
-1
broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java
...pache/rocketmq/broker/processor/AdminBrokerProcessor.java
+4
-1
common/src/main/java/org/apache/rocketmq/common/BrokerConfig.java
...rc/main/java/org/apache/rocketmq/common/BrokerConfig.java
+18
-0
未找到文件。
broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java
浏览文件 @
9d11b56c
...
...
@@ -741,7 +741,7 @@ public class BrokerController {
log
.
error
(
"registerBrokerAll Exception"
,
e
);
}
}
},
1000
*
10
,
1000
*
30
,
TimeUnit
.
MILLISECONDS
);
},
1000
*
10
,
Math
.
max
(
10000
,
Math
.
min
(
brokerConfig
.
getRegisterNameServerPeriod
(),
60000
))
,
TimeUnit
.
MILLISECONDS
);
if
(
this
.
brokerStatsManager
!=
null
)
{
this
.
brokerStatsManager
.
start
();
...
...
broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java
浏览文件 @
9d11b56c
...
...
@@ -245,7 +245,10 @@ public class AdminBrokerProcessor implements NettyRequestProcessor {
topicConfig
.
setTopicSysFlag
(
requestHeader
.
getTopicSysFlag
()
==
null
?
0
:
requestHeader
.
getTopicSysFlag
());
this
.
brokerController
.
getTopicConfigManager
().
updateTopicConfig
(
topicConfig
);
this
.
brokerController
.
registerBrokerAll
(
false
,
true
,
true
);
if
(
brokerController
.
getBrokerConfig
().
getRegisterNameServerPeriod
()
==
0
)
{
this
.
brokerController
.
registerBrokerAll
(
false
,
true
,
true
);
}
return
null
;
}
...
...
common/src/main/java/org/apache/rocketmq/common/BrokerConfig.java
浏览文件 @
9d11b56c
...
...
@@ -136,6 +136,16 @@ public class BrokerConfig {
private
boolean
forceRegister
=
true
;
/**
*
* This configurable item defines interval of topics registration of broker to name server. Allowing values are
* between 10, 000 and 60, 000 milliseconds.
*
* If set to 0, newly created topics will be immediately reported to name servers and interval of periodical
* registration defaults to 10, 000 in milliseconds.
*/
private
int
registerNameServerPeriod
=
1000
*
30
;
public
boolean
isTraceOn
()
{
return
traceOn
;
}
...
...
@@ -617,4 +627,12 @@ public class BrokerConfig {
public
void
setForceRegister
(
boolean
forceRegister
)
{
this
.
forceRegister
=
forceRegister
;
}
public
int
getRegisterNameServerPeriod
()
{
return
registerNameServerPeriod
;
}
public
void
setRegisterNameServerPeriod
(
int
registerNameServerPeriod
)
{
this
.
registerNameServerPeriod
=
registerNameServerPeriod
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录