import org.apache.camel.Processor;
import org.apache.camel.impl.ScheduledPollConsumer;
import org.onap.aai.logging.RouterCoreMsgs;
-import org.openecomp.cl.api.Logger;
-import org.openecomp.cl.eelf.LoggerFactory;
-import org.openecomp.cl.mdc.MdcContext;
+import org.onap.aai.cl.api.Logger;
+import org.onap.aai.cl.eelf.LoggerFactory;
+import org.onap.aai.cl.mdc.MdcContext;
import java.net.MalformedURLException;
import java.security.GeneralSecurityException;
consumer = consumerBuilder.build();
} catch (MalformedURLException | GeneralSecurityException e) {
- logger.error(RouterCoreMsgs.EVENT_CONSUMER_CREATION_EXCEPTION, e.getLocalizedMessage());
+ logger.error(RouterCoreMsgs.EVENT_CONSUMER_CREATION_EXCEPTION, e, e.getLocalizedMessage());
}
}
int processCount = 0;
- Iterable<String> messages = null;
-
- messages = consumer.fetch();
+ Iterable<String> messages = consumer.fetch();
String topic = endpoint.getEventTopic();
}
return processCount;
}
-
+ @Override
protected void doStop() throws Exception {
super.doStop();
if (consumer != null) {
consumer.close();
}
}
-
+ @Override
protected void doShutdown() throws Exception {
super.doShutdown();
if (consumer != null) {
this.message = message;
this.topic = topic;
}
-
+ @Override
public void run() {
try {
}
} catch (Exception e) {
- logger.error(RouterCoreMsgs.EVENT_PROCESSING_EXCEPTION, e.getLocalizedMessage());
+ logger.error(RouterCoreMsgs.EVENT_PROCESSING_EXCEPTION,e,e.getLocalizedMessage());
} finally {
// log exception if an exception occurred and was not handled
if (message.getException() != null) {