try {
Holder<Object> key = new Holder<Object>();
Holder<Object> value = new Holder<Object>();
while (this.istream.next(key, value) != 0) {
Exchange exchange = this.getEndpoint().createExchange();
Message message = new DefaultMessage();
String fileName = StringUtils.substringAfterLast(status.getPath().toString(), "/");
message.setHeader(Exchange.FILE_NAME, fileName);
if (key.value != null) {
message.setHeader(HdfsHeader.KEY.name(), key.value);
}
message.setBody(value.value);
exchange.setIn(message);
log.debug("Processing file {}", fileName);
try {
processor.process(exchange);