I have a following splitter & aggregator config:
The workflow is:HTML Code:<int:poller id="fixedThreadPoolPoller" default="true" fixed-rate="3000" task-executor="fixedThreadPoolTaskExecutor" max-messages-per-poll="-1" /> <int:channel id="tasksIncoming"><int:queue /></int:channel> <int:splitter id="taskToTaskAssetsSplitter" expression="payload.assets" input-channel="tasksIncoming" output-channel="tasksAssetsWaitingForContentFiles" /> <int:channel id="tasksAssetsWaitingForContentFiles"> <int:queue message-store="tasksWaitingForAssetsMessageStore" capacity="100" /> </int:channel> <int:chain id="moveContentFilesChain" input-channel="tasksAssetsWaitingForContentFiles"> <int:service-activator ref="ingestTaskHandler" method="moveContentFileIfExists" /> <int:router expression="payload.gathered" > <int:mapping value="false" channel="tasksAssetsWaitingForContentFiles" /> <int:mapping value="true" channel="tasksAssetsWithContentFilesFound" /> </int:router> </int:chain> <int:channel id="tasksAssetsWithContentFilesFound"> <int:queue message-store="tasksAssetsWithContentFilesFoundMessageStore" capacity="100" /> </int:channel> <int:aggregator id="taskAssetsToTaskAggregator" ref="ingestTaskHandler" method="aggregateTaskAssets" release-strategy="aggregateTaskAssetsReleaseStrategy" input-channel="tasksAssetsWithContentFilesFound" output-channel="tasksReadyToProcess" /> <int:channel id="tasksReadyToProcess"><int:queue /></int:channel>
1) task are incoming to the 'tasksIncoming'
2) tasks are split into task assets
3) the split assets are queued in 'tasksAssetsWaitingForContentFiles'
4) the service avtivator in 'moveContentFilesChain' checks if assets content file exists in some location, and if so than it copies it to some other location and sets the 'payload.gathered' to true; if content file doesn't exist the message is passed without change;
5) the router in 'moveContentFilesChain' chcaks of the file was dound and routes either back to 'tasksAssetsWaitingForContentFiles' or to 'tasksAssetsWithContentFilesFound'
6) if files fo all assets are found the task is aggregated by the 'taskAssetsToTaskAggregator' and passed to 'tasksReadyToProcess' for further processing
The problem is, that I want to poll 'moveContentFilesChain' in a fixed rate of 3000 ms, as set in default poller, but instead after first poll it falls into a continous loop and there is no delay betwen each nest 'moveContentFilesChain'.
Please help me correct my config to make the 'moveContentFilesChain' poll every 3000 ms and not continously.
Thanks in advance,
Darek


Reply With Quote
]

