未验证 提交 8afd3bf9 编写于 作者: H Heng Du 提交者: GitHub

Merge pull request #649 from zongtanghu/msg_track

[ISSUE#525]Add a switch variable(traceTopicEnable) for making msg trace worked which is decided by users and rename enableAcl flag variable.
...@@ -119,7 +119,6 @@ public class PlainPermissionLoader { ...@@ -119,7 +119,6 @@ public class PlainPermissionLoader {
&& (StandardWatchEventKinds.ENTRY_MODIFY.equals(event.kind()) && (StandardWatchEventKinds.ENTRY_MODIFY.equals(event.kind())
|| StandardWatchEventKinds.ENTRY_CREATE.equals(event.kind()))) { || StandardWatchEventKinds.ENTRY_CREATE.equals(event.kind()))) {
log.info("{} make a difference change is : {}", watchFileName, event.toString()); log.info("{} make a difference change is : {}", watchFileName, event.toString());
//TODO do a retain
//Clearing the info, may result in a non-available time //Clearing the info, may result in a non-available time
PlainPermissionLoader.this.clearPermissionInfo(); PlainPermissionLoader.this.clearPermissionInfo();
initialize(); initialize();
......
...@@ -492,7 +492,7 @@ public class BrokerController { ...@@ -492,7 +492,7 @@ public class BrokerController {
} }
private void initialAcl() { private void initialAcl() {
if (!this.brokerConfig.isEnableAcl()) { if (!this.brokerConfig.isAclEnable()) {
log.info("The broker dose not enable acl"); log.info("The broker dose not enable acl");
return; return;
} }
......
...@@ -125,12 +125,14 @@ public class TopicConfigManager extends ConfigManager { ...@@ -125,12 +125,14 @@ public class TopicConfigManager extends ConfigManager {
this.topicConfigTable.put(topicConfig.getTopicName(), topicConfig); this.topicConfigTable.put(topicConfig.getTopicName(), topicConfig);
} }
{ {
String topic = this.brokerController.getBrokerConfig().getMsgTraceTopicName(); if (this.brokerController.getBrokerConfig().isTraceTopicEnable()) {
TopicConfig topicConfig = new TopicConfig(topic); String topic = this.brokerController.getBrokerConfig().getMsgTraceTopicName();
this.systemTopicList.add(topic); TopicConfig topicConfig = new TopicConfig(topic);
topicConfig.setReadQueueNums(1); this.systemTopicList.add(topic);
topicConfig.setWriteQueueNums(1); topicConfig.setReadQueueNums(1);
this.topicConfigTable.put(topicConfig.getTopicName(), topicConfig); topicConfig.setWriteQueueNums(1);
this.topicConfigTable.put(topicConfig.getTopicName(), topicConfig);
}
} }
} }
......
...@@ -53,6 +53,8 @@ public class BrokerConfig { ...@@ -53,6 +53,8 @@ public class BrokerConfig {
private String messageStorePlugIn = ""; private String messageStorePlugIn = "";
@ImportantField @ImportantField
private String msgTraceTopicName = MixAll.RMQ_SYS_TRACE_TOPIC; private String msgTraceTopicName = MixAll.RMQ_SYS_TRACE_TOPIC;
@ImportantField
private boolean traceTopicEnable = false;
/** /**
* thread numbers for send message thread pool, since spin lock will be used by default since 4.0.x, the default * thread numbers for send message thread pool, since spin lock will be used by default since 4.0.x, the default
* value is 1. * value is 1.
...@@ -176,8 +178,7 @@ public class BrokerConfig { ...@@ -176,8 +178,7 @@ public class BrokerConfig {
* Acl feature switch * Acl feature switch
*/ */
@ImportantField @ImportantField
private boolean enableAcl = false; private boolean aclEnable = false;
public static String localHostName() { public static String localHostName() {
try { try {
...@@ -717,14 +718,6 @@ public class BrokerConfig { ...@@ -717,14 +718,6 @@ public class BrokerConfig {
this.transactionCheckInterval = transactionCheckInterval; this.transactionCheckInterval = transactionCheckInterval;
} }
public boolean isEnableAcl() {
return enableAcl;
}
public void setEnableAcl(boolean isAclPlug) {
this.enableAcl = isAclPlug;
}
public int getEndTransactionThreadPoolNums() { public int getEndTransactionThreadPoolNums() {
return endTransactionThreadPoolNums; return endTransactionThreadPoolNums;
} }
...@@ -756,5 +749,20 @@ public class BrokerConfig { ...@@ -756,5 +749,20 @@ public class BrokerConfig {
public void setMsgTraceTopicName(String msgTraceTopicName) { public void setMsgTraceTopicName(String msgTraceTopicName) {
this.msgTraceTopicName = msgTraceTopicName; this.msgTraceTopicName = msgTraceTopicName;
} }
public boolean isTraceTopicEnable() {
return traceTopicEnable;
}
public void setTraceTopicEnable(boolean traceTopicEnable) {
this.traceTopicEnable = traceTopicEnable;
}
public boolean isAclEnable() {
return aclEnable;
}
public void setAclEnable(boolean aclEnable) {
this.aclEnable = aclEnable;
}
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册