Examples of ZKConfig


Examples of com.taobao.metamorphosis.utils.ZkUtils.ZKConfig

import com.taobao.metamorphosis.utils.ZkUtils.ZKConfig;

public class MessageSenderTest {
  public static void main(String[] args) throws Exception {
    MetaClientConfig config = new MetaClientConfig();
    ZKConfig zkConfig = new ZKConfig("10.249.197.121", 30000, 30000, 5000);
    config.setZkConfig(zkConfig);
    MetaMessageSessionFactory factory = new MetaMessageSessionFactory(config);
    MessageProducer producer = factory.createProducer(false);
    String topic = "test";
    producer.publish(topic);
View Full Code Here

Examples of com.taobao.metamorphosis.utils.ZkUtils.ZKConfig

        if (!StringUtil.empty(zkConnect)) {
            final int zkSessionTimeoutMs = Integer.parseInt(serverProperties.getProperty("zk.zkSessionTimeoutMs"));
            final int zkConnectionTimeoutMs =
                    Integer.parseInt(serverProperties.getProperty("zk.zkConnectionTimeoutMs"));
            final int zkSyncTimeMs = Integer.parseInt(serverProperties.getProperty("zk.zkSyncTimeMs"));
            return this.setZkRoot(new ZKConfig(zkConnect, zkSessionTimeoutMs, zkConnectionTimeoutMs, zkSyncTimeMs),
                zkRoot);
        }
        else {
            return null;
        }
View Full Code Here

Examples of com.taobao.metamorphosis.utils.ZkUtils.ZKConfig

     */
    // ��Ԫ����Ҫ��ͨ����,���޸�resources/zk.properties���zk��ַ
    private ZKConfig loadZkConfigFromLocalFile() {
        try {
            final Properties properties = Utils.getResourceAsProperties("zk.properties", "GBK");
            final ZKConfig zkConfig = new ZKConfig();
            if (StringUtils.isNotBlank(properties.getProperty("zk.zkConnect"))) {
                zkConfig.zkConnect = properties.getProperty("zk.zkConnect");
            }

            if (StringUtils.isNotBlank(properties.getProperty("zk.zkSessionTimeoutMs"))) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.