How are you sending your message? Can we see that code?
On Tue, Jun 29, 2010 at 11:46 AM, Mark <[email protected]> wrote: > I tried putting in a Thread.sleep(60*1000), but the messages still do > not show up in the listener. > > > > On Mon, Jun 28, 2010 at 7:16 PM, Willem Jiang <[email protected]> wrote: >> After you started the camel context, you need to use some sleep to avoid the >> main thread exits otherwise camel route will stop work, >> >> Willem >> ---------------------------------- >> Apache Camel, Apache CXF committer >> Open SOA http://www.fusesource.com >> Blog http://willemjiang.blogspot.com >> Tiwtter http://twitter.com/willemjiang >> >> Mark wrote: >>> >>> Hello, >>> >>> I am working on creating a simple route using camel and java. I have >>> the following code: >>> >>> public class CamelMain { >>> public static void main(String[] args) throws Exception { >>> CamelContext context = new DefaultCamelContext(); >>> ConnectionFactory connectionFactory = new >>> ActiveMQConnectionFactory("tcp://127.0.0.1:61616"); >>> context.addComponent("test-jms", >>> JmsComponent.jmsComponent(connectionFactory)); >>> >>> context.addRoutes(new RouteBuilder() { >>> public void configure() { >>> >>> from("test-jms:queue:example.A").to("test-jms:queue:example.B"); >>> } >>> }); >>> >>> context.start(); >>> } >>> } >>> >>> When I go to the camel admin page (http://127.0.0.1:8161/camel), it >>> shows that the route has been created. The problem is that when I try >>> and send a message to the "example.A" queue, it never seems to get >>> picked up by the MessageListener that is listening to the "example.B" >>> queue. The sender and listener are running in separate JVM's if that >>> makes a difference. >>> >>> Where am I going wrong? >>> >> >> >
