I want to define a route to poll from an amazon SQS queue.
val context = new DefaultCamelContext(reg)
context.setHandleFault(true)
context.addRoutes(new RouteBuilder{
override def configure(){
from("aws-sqs://test_development?amazonSQSClient=#test_sqs").to("log:b")
}}
)
context.start
where test_sqs is in the registry for an AmazonSQSClient(credentials) object

It seems to connect fine but when I run it(using mvn exec:java 
-Dexec.mainClass), but it shutsdown immediately after.

DefaultCamelContext Route: route1 started and consuming from: 
Endpoint[aws-sqs://test_development?amazonSQSClient=%23test_sqs]

How can I prevent the process from immediately shuting down? I want the process 
to run to continously poll the SQS queue.

If I replace the aws-sqs queue with a local activemq, the camel application 
runs successfully until issued a shutdown command.
context.addComponent("activemq", 
ActiveMQComponent.activeMQComponent(Config.activeMqConnection))
from("activemq:queue:a").to("log:b")


-- 
@tommychheng
http://tommy.chheng.com

Reply via email to