Created
October 11, 2015 18:59
-
-
Save malalanayake/c9133b00eb770373f447 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package camel.routing.processor; | |
import org.apache.camel.Exchange; | |
import org.apache.camel.Processor; | |
import org.apache.log4j.Logger; | |
import org.springframework.stereotype.Component; | |
import com.codahale.metrics.Meter; | |
import camel.routing.monitor.Monitor; | |
/** | |
* Main entry point | |
* | |
* @author malalanayake | |
* | |
*/ | |
@Component | |
public class MessageProcessor implements Processor { | |
public static final String MESSAGE_PROCESSOR = "message-processor"; | |
private Logger log = Logger.getLogger(this.getClass()); | |
@Override | |
public void process(Exchange exchange) throws Exception { | |
Meter meter = Monitor.MATRICS.meter(MESSAGE_PROCESSOR); | |
meter.mark(); | |
String input = (String) exchange.getIn().getBody(String.class); | |
log.info("=====Need to process the data here====="); | |
log.info("Input message " + input); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment