231.5. 샘플
예를 들어 다음과 같은 것을 사용할 수 있습니다.
from("activemq:My.Queue"). to("mustache:com/acme/MyResponse.mustache");
from("activemq:My.Queue").
to("mustache:com/acme/MyResponse.mustache");
Mustache 템플릿을 사용하여 InOut 메시지 교환( JMSReplyTo
헤더가 있는 경우) 메시지에 대한 응답을 공식화합니다.
InOnly를 사용하고 메시지를 사용하고 다른 목적지로 보내려면 다음을 사용할 수 있습니다.
from("activemq:My.Queue"). to("mustache:com/acme/MyResponse.mustache"). to("activemq:Another.Queue");
from("activemq:My.Queue").
to("mustache:com/acme/MyResponse.mustache").
to("activemq:Another.Queue");
예를 들어 구성 요소에서 헤더를 통해 동적으로 사용해야 하는 템플릿을 지정할 수 있습니다.
from("direct:in"). setHeader(MustacheConstants.MUSTACHE_RESOURCE_URI).constant("path/to/my/template.mustache"). to("mustache:dummy");
from("direct:in").
setHeader(MustacheConstants.MUSTACHE_RESOURCE_URI).constant("path/to/my/template.mustache").
to("mustache:dummy");