231.5. Samples
例如,您可以使用如下内容:
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("direct:in"). setHeader(MustacheConstants.MUSTACHE_RESOURCE_URI).constant("path/to/my/template.mustache"). to("mustache:dummy");