Package com.taobao.metamorphosis.client.consumer

Examples of com.taobao.metamorphosis.client.consumer.DefaultLoadBalanceStrategy


        this.zkConfig.zkConnect = "localhost:2181";
        this.client =
                new ZkClient(this.zkConfig.zkConnect, this.zkConfig.zkSessionTimeoutMs,
                    this.zkConfig.zkConnectionTimeoutMs, new ZkUtils.StringSerializer());
        this.metaZookeeper = new MetaZookeeper(this.client, this.zkConfig.zkRoot);
        this.loadBalanceStrategy = new DefaultLoadBalanceStrategy();
        this.slaveConsumerZooKeeper =
                new SlaveConsumerZooKeeper(this.metaZookeeper, this.remotingClient, this.client, this.zkConfig,
                    this.brokerId);
    }
View Full Code Here



    protected LoadBalanceStrategy createLoadBalanceStrategy(final ConsumerConfig consumerConfig) {
        switch (consumerConfig.getLoadBalanceStrategyType()) {
        case DEFAULT:
            return new DefaultLoadBalanceStrategy();
        case CONSIST:
            return new ConsisHashStrategy();
        default:
            throw new IllegalArgumentException("Unknow load balance strategy type:"
                    + consumerConfig.getLoadBalanceStrategyType());
View Full Code Here

TOP

Related Classes of com.taobao.metamorphosis.client.consumer.DefaultLoadBalanceStrategy

Copyright © 2018 www.massapicom. 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.