2012-11-20 2 views
1

FreeMarker가 제공하는 두 가지 다른 XML을 두 개의 서로 다른 끝점으로 보내야합니다. 즉Apache camel multicast FreeMarker

.to("freemarker:templates/xml1.ftl").to("file://C:\\testXmls1") 

.to("freemarker:templates/xml2.ftl").to("file://C:\\testXmls2") 

은 내가 multicast() 기능을 살펴했지만, 나는 이

사람이 좀 도와 주 시겠어요 두

.TO이있는 경우에 적용하는 방법을 모른다 ?

답변

2

예. 동일한 .to (uri1, uri2, ...)에 여러 개의 끝점을 지정할 수 있습니다. 그러면 단일 "eip"가됩니다.

multicast() 
    .to(uri1a, uri1b) 
    .to(uri2a, uri2b) 
.end() // to end multicast 

그렇지 않으면 파이프 라인 eip를 사용하여 동봉해야합니다.

multicast() 
    .pipeline().to(uri1a).to(uri1b).end() // to end this pipeline 
    .pipeline().to(uri2a).to(uri2b).end() // to end this pipeline 
.end() // to end multicast 
+0

대단히 감사합니다. Claus – user1838538