}
}
private void readFromQueue() throws Exception {
while (executor != null && !executor.isShutdown()) {
ReceivedMessage message = receiver.receive();
if(message != null) {
LOG.debug("Recieved message from queue {}", queueName);
Exchange exchange = getEndpoint().createExchange();
Message msg = new DefaultMessage();
msg.setBody(message.getBody());
exchange.setIn(msg);
getProcessor().process(exchange);
receiver.ack(message);
}
}