use of io.fabric8.mq.ConsumerThread in project fabric8 by jboss-fuse.
the class ActiveMQConsumerFactory method updateInternal.
private void updateInternal(Map<String, ?> configuration) throws Exception {
try {
LOG.info("Starting consumer");
consumerService = new ActiveMQService(connectionFactory);
consumerService.setMaxAttempts(10);
consumerService.start();
String destination = (String) configuration.get("destination");
if (destination == null) {
destination = DEFAULT_DESTINATION;
}
consumer = new ConsumerThread(consumerService, destination);
consumer.start();
LOG.info("Consumer started");
} catch (JMSException e) {
throw new Exception("Cannot start consumer", e);
}
}
Aggregations