- @Override
- public void init() {
- Properties dmaapConsumerProperties = applicationConfig.getDmaapConsumerConfig();
- Properties dmaapPublisherProperties = applicationConfig.getDmaapPublisherConfig();
- // No need to start if there is no configuration.
- if (dmaapConsumerProperties == null || dmaapPublisherProperties == null || dmaapConsumerProperties.size() == 0
- || dmaapPublisherProperties.size() == 0) {
- return;
- }
- // Do we need to do any validation of properties before calling the factory?
- try {
- consumer = MRClientFactory.createConsumer(dmaapConsumerProperties);
- this.alive = true;
- } catch (IOException e) {
- logger.error("Exception occurred while creating Dmaap Consumer", e);
- }
+ private void processMsg(String msg) throws Exception {
+ logger.debug("Message Reveived from DMAAP : {}", msg);
+ createDmaapMessageHandler().handleDmaapMsg(msg);