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);
}
ConsumingTask.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:ingestion-ws-kafka-hdfs
作者:
评论列表
文章目录