Jul 9th, 2012, 06:26 PM
I am working on a spring integration problem. I have an interesting requirement. Basically I am monitoring three different sftp directories for files (with three different listeners) to be imported into a database. Call them DirA, DirB and DirC. Each directory reads the file line by line and creates a message type MessageA, MessageB, MessageC.
Now here comes my unique requirement. I need to ensure that all messages of type MessageC are processed before any messages of type MessageB or MessageA are processed. Additionally, there is no guarantee that each message type will be received each time. Does anyone have any ideas on how to achieve this? I really have no idea how to approach this problem.
Thanks in advance for any help provided,
Jul 10th, 2012, 02:27 AM
Try to investigate Resequencer
In your case you need to introduce some custom CorrelationStrategy for all types of messages. And also you should setmessages of type MessageC higher sequence-number than for other types.
However you need to think of sequence-size for your messages or of some custom ReleaseStrategy...
Any other questions - welcome!
P.S. I also remembered the PriorityChannel
Last edited by Cleric; Jul 10th, 2012 at 02:31 AM.