이 아이디어는 디렉토리마다 3 초 폴링 및 비동기 실행을 허용하는 채널에 따라 디스패처에 여론 조사 당 3 메시지를 방출하는 것입니다 인바운드 어댑터 건너 뛰는 메시지
<int-file:inbound-channel-adapter id="files" directory="${lz.dir.${ft}}">
<int:poller fixed-delay="3000" max-messages-per-poll="3" />
</int-file:inbound-channel-adapter>
<int:bridge input-channel="files" output-channel="sourceFiles" />
<int:channel id="sourceFiles">
<int:dispatcher task-executor="executor" />
</int:channel>
<int:service-activator input-channel="sourceFiles"
ref="moveToSource"
method="move" />
<int:aggregator id="filesBuffered"
input-channel="sourceFiles"
output-channel="stagedFiles"
release-strategy-expression="size() == 10"
correlation-strategy-expression="'mes-group'"
expire-groups-upon-completion="true"
/>
<int:channel id="stagedFiles" />
<int:service-activator input-channel="stagedFiles"
ref="moveToStage"
method="move" />
<task:executor id="executor" pool-size="5" queue-capacity="0" rejection-policy="CALLER_RUNS" />
처럼 내 구성 보이는 방법이다. 그런 다음 메시지 수를 기준으로 메시지를 집계 한 후 다음 서비스 활성화 자에게 보냅니다. 첫 번째 서비스 활성화자는 소스 디렉토리에 파일을 저장하고 두 번째 서비스 활성기는 집계 된 목록을 가져 와서 해당 파일을 준비 디렉토리로 이동합니다.
원본 폴더에서 일부 파일을 건너 뛰고 준비 폴더에서 모든 파일을 가져 오는 것 같습니다. 내 생각 엔 폴러가 발송자 채널에 메시지를 보냈지 만 스레드 풀이 가득 차면 파일을 무시하지만 어쨌든 애그리 게이터는 여전히 모든 파일을 가져옵니다. 디스패처 채널과 거의 비슷하게 스레드 풀 한도에 도달 한 후에받은 파일에 대한 첫 번째 서비스 활성화 단계를 건너 뛰지 만 이러한 파일은 여전히 다음 채널로 전달되고 두 번째 서비스 활성기에 의해 처리되는 방식을 유지합니다.
폴러가 디스패처에서 거부 된 파일을 다시 보내도록하고 싶습니다. 어떤 아이디어라도 감사 할 것입니다.
잘못된 구성이었습니다. – adeelmahmood