int-file : int-ftp : int-ftp : 원격 디렉터리 및 int-ftp로 파일을 이동시키는 outbound-channel-adapter : outbound-gateway는 원격 디렉토리의 파일을 삭제합니다.Int : 스플리터가 채널을 호출하기 위해 메시지를 보내지 않습니다.
int-file : 인바운드 - 채널 어댑터는 폴링하여 int-ftp : outbound-channel-adapter에 메시지를 보내고 두 번째 폴링하면 int-ftp : outbound-gateway로 메시지를 보냅니다.
int : splitter를 사용하면 하나의 파일에 대해 하나의 메시지 만 수신 할 수 있으며 하나의 채널 만 호출됩니다. 두 채널 모두에 모든 폴링 메시지를 보내려고합니다.
예는 다음과 같습니다
이제는 작업 :
- 처음 조사 값 int - FTP를 위해 메시지를 전송 : 아웃 바운드 채널 어댑터를
- 두 번째 조사를 int로 메시지를 전송 -ftp : outbound-gateway
- 세 번째 시간 폴링은 int-ftp로 메시지를 보냅니다. outbound-channel-adapter 아웃 바운드 채널 어댑터 :
1.First 시간 조사는 int로 - FTP를 위해 메시지를 전송 :로
이 달성하고자하는 아웃 바운드 게이트웨이 :
사전에 감사
<int-file:inbound-channel-adapter id="inErrorINPRm"
channel="errorRm"
directory="in/error"
>
<int:poller fixed-rate="5000" />
</int-file:inbound-channel-adapter>
<int:channel id="errorRm"></int:channel>
<int:channel id="ErrorRmMv"></int:channel>
<int:channel id="ftpINPfromError"></int:channel>
<int:splitter id="splitter" input-channel="errorRm" output-channel="ErrorRmMv"/>
<int-ftp:outbound-channel-adapter id="ftpError"
channel="ErrorRmMv"
session-factory="ClientFactory"
auto-create-directory="true"
remote-directory="in/error"
>
</int-ftp:outbound-channel-adapter>
<int:header-enricher id="header-enricher-error" input-channel="ErrorRmMv" output-channel="ftpINPfromError">
<int:header name="file_remoteDirectory" value="in/working"/>
</int:header-enricher>
<int-ftp:outbound-gateway id="gatewayRmfromError"
session-factory="ClientFactory"
expression="file_remoteDirectory"
request-channel="ftpINPfromError"
command="rm"
>
</int-ftp:outbound-gateway>
@Gary Russell – ram