Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CamelContext context = new DefaultCamelContext();
- ConnectionFactory connectionFactory = null;
- // connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:5445");
- // HornetQConnectionFactory c = new HornetQConnectionFactory();
- connectionFactory = HornetQJMSClient.createConnectionFactory("127.0.0.1", 5455);
- Thread.sleep(1000);
- context.addComponent("jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
- context.addRoutes(new RouteBuilder() {
- public void configure() {
- from("jms:queue:someQueue").to("file://test");
- }
- });
- ProducerTemplate template = context.createProducerTemplate();
- context.start();
- template.sendBody("jms:queue:someQueue", "Test MessageASD");
- Thread.sleep(10000);
- context.stop();
Advertisement
Add Comment
Please, Sign In to add comment