Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.apache.activemq.camel.component.ActiveMQComponent;
- import org.apache.camel.CamelContext;
- import org.apache.camel.builder.RouteBuilder;
- import org.apache.camel.impl.DefaultCamelContext;
- import org.apache.log4j.Logger;
- public class CamelJmsMain {
- private static Logger log = Logger.getLogger(CamelMain.class);
- public static void main(String[] args) throws Exception {
- log.info("Starting application");
- CamelContext context = new DefaultCamelContext();
- context.addComponent("activemq", ActiveMQComponent.activeMQComponent("tcp://localhost:61616"));
- context.addRoutes(new RouteBuilder() {
- @Override
- public void configure() throws Exception {
- from("activemq:test").to("log:output");
- }
- });
- context.start();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment