Ashwin,
Thanks, I agree this is a bad approach. I am a bit confused about how
often configure() method is invoked and when the message would be read from
the queue. For Example:
public class TestRouteBuilder extends RouteBuilder {
public String current_State = "process";
@Override
public void configure() throws Exception {
String selector = generateSelectorURI(current_state);
from("activemq:queue:test?selector="+selector)
.to("log:test")
.process(new Processor() {
@Override
public void process(Exchange exchange)
throws Exception {
current_State="waiting";
sendSoapRequest("test");
}
});
}
}
I only want to read and process messages if current_state is “process” ( so
in "waiting" state change selector value so none of the messages would be
read).
What type of endpoint would camel create based on
“from(“activemq:queue..”)” ? ex: polled or scheduled endpoint.
Would the selector uri get re-created on every read? does camel just change
endpoint configuration or re-create a new endpoint ?
If you have a good example on how to do dynamic selector with
camel/activemq, I would love to see it.
I really appreciate all your help.
Thanks
Kal
--
View this message in context:
http://camel.465427.n5.nabble.com/Activemq-dynamic-endpoint-configuration-tp4749853p4760387.html
Sent from the Camel - Users mailing list archive at Nabble.com.