61.5. 샘플
예를 들어 다음과 같은 것을 사용할 수 있습니다.
from("activemq:My.Queue"). to("chunk:template");
from("activemq:My.Queue").
to("chunk:template");
Chunk 템플릿을 사용하여 InOut 메시지 교환( JMSReplyTo
헤더가 있는 경우) 메시지에 대한 응답을 공식화합니다.
InOnly를 사용하고 메시지를 사용하고 다른 목적지로 보내려면 다음을 사용할 수 있습니다.
from("activemq:My.Queue"). to("chunk:template"). to("activemq:Another.Queue");
from("activemq:My.Queue").
to("chunk:template").
to("activemq:Another.Queue");
예를 들어 구성 요소에서 헤더를 통해 동적으로 사용해야 하는 템플릿을 지정할 수 있습니다.
from("direct:in"). setHeader(ChunkConstants.CHUNK_RESOURCE_URI).constant("template"). to("chunk:dummy");
from("direct:in").
setHeader(ChunkConstants.CHUNK_RESOURCE_URI).constant("template").
to("chunk:dummy");
Chunk 구성 요소 옵션의 예는 다음과 같습니다.
from("direct:in"). to("chunk:file_example?themeFolder=template&themeSubfolder=subfolder&extension=chunk");
from("direct:in").
to("chunk:file_example?themeFolder=template&themeSubfolder=subfolder&extension=chunk");
이 예에서 Chunk 구성 요소는 template/subfolder 폴더에 있는 file_example.chunk 파일을 찾습니다.