2016-07-07 3 views
-1

apache camel에서 여러 부두 끝점을 사용하는 것이 좋습니다?여러 부두 끝점을 사용하는 방법은 무엇입니까?

아래 코드를 사용하고 있습니다. 그것이 올바른 방법인지 아닌지 나는 확신하지 못한다.

import org.apache.camel.builder.RouteBuilder; 

public class CamelPocRoute extends RouteBuilder { 

    public void configure() { 

     from("jetty:http://localhost:8111/nordic/Something1") 
     .to("file://{{Somepath}}/camelpoc/jetty/Something1"); 

     from("jetty:http://localhost:8111/nordic/Something2") 
     .to("file://{{Somepath}}/camelpoc/jetty/Something2"); 

     from("jetty:http://localhost:8111/nordic/Something3") 
     .to("file://{{Somepath}}/camelpoc/jetty/Something3"); 
    } 

} 

은 참조하십시오 : 우리는 여러 부두 엔드 포인트 같은 방법을 사용하는 http://camel.apache.org/jetty.html

답변

1

. 한가지는 속성 파일에 끝점 URI를 추가하는 것이 좋습니다.

from(endpoint("{{from.endpoint.url}}")) 

제 생각에는 여러 작업이있는 일반적인 웹 서비스와 같은 엔드 포인트에 대해 생각할 수 있습니다. 이러한 각 작업에는 다른 경로가 있습니다. 그래서 특별한 것은 없습니다.

관련 문제