ConsumingTask.java 文件源码

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

项目:ingestion-ws-kafka-hdfs 作者:
private void loopProcessing(Iterator<MessageAndMetadata<byte[], byte[]>> it) throws Exception {
    LOGGER.info("Starting processing {}", this);
    while (canRun) {
        try {
            while (canRun && it.hasNext() && canRun) {
                // ^^^ I know that it looks stupid but I think it makes sense :)
                processMessage(it.next());
            }
        } catch (ConsumerTimeoutException ex) {
            // We don't do anything here on purpose
        }
    }
    LOGGER.info("Done processing {}", this);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号