KtGroup.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:kt 作者:
public KtGroup(Config config) {
    // Because we are not pushing names to zookeeper random names should be fine
    String groupId = config.getGroupId();
    if (groupId == null) {
        // default to a unique group id
        groupId = "Kt-" + UUID.randomUUID();
    }

    String offset = "largest";
    if (config.getLocation().equals("tail")) {
        offset = "smallest";
    }
    log.info("Starting consumer at '{}' offset", offset);
    consumer = Consumer.createJavaConsumerConnector(createConsumerConfig(config.getZookeeper(), groupId, offset));
    this.topic = config.getTopic();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号