0
我需要能够轮询Rest WebService,并将其作为来自WebService的最后一个响应的ID中该呼叫的一部分。我知道要在Camel中使用动态端点,你需要使用一个Enrich处理器,但是我无法获得更新。Apache Camel动态Http调用
请考虑下面的简单情况:
public class MyRoute extends RouteBuilder {
long id;
@Override
public void configure() throws Exception {
from("timer://foo?fixedRate=true&period=3000")
.enrich().simple("http://localhost:8080/TestRestSource/test/result/" + id)
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
id++;
System.out.println("--- " + id);
}
})
.end();
}
}
我使用骆驼2.16。
任何帮助,将不胜感激。
由于提前,
克里斯
那么,你会得到什么错误? –