-
1. Re: ScheduledEventMessageComposer to pickup more than one me
tfennelly Mar 20, 2008 7:50 AM (in response to mathieu)Have you considered using the FileGatewayListener?
If you can't use the FileGatewayListener, I'd look at implementing this slightly differently. This is a throttling issue and there's no "first class" constructs in the ESB for doing this (yet).
What you could look at is a SchecduledEventListener impl (Vs ScheduledEventMessageComposer - see the docs) as a means of "working out" how much work needs to be done at the current time, queuing this work up in another co-located "worker" style event driven service - e.g. one that listens on a JMS queue.
Your ScheduledEventListener could read the input dir every X minutes and for every file that needs to be processed, invoke the Worker Service (using the ServiceInvoker) with the name of the file to be processed (or a batch of them). So if there's a backlog of files, you process them all on this iteration of the schedule. You'll obviously need to mange the lifecycle of the input files in some way so as to avoid reprocessing of the same files. -
2. Re: ScheduledEventMessageComposer to pickup more than one me
mathieu Mar 20, 2008 8:38 AM (in response to mathieu)Thanks for your quick answer!
I will follow your advice and implement the SchecduledEventListener strategy.
Mathieu