log.info("Register broker for topic:" + topicBroker);
// Be compatible with the version before 1.4.3
ZkUtils.createEphemeralPath(this.zkClient, brokerTopicPath, String.valueOf(numParts));
// added by dennis,since 1.4.3
String topicBrokerJson = topicBroker.toJson();
if (topicConfig.isAcceptPublish()) {
ZkUtils.createEphemeralPath(this.zkClient, topicPubPath, topicBrokerJson);
}
else {
ZkUtils.deletePath(this.zkClient, topicPubPath);