Results 1 to 2 of 2

Thread: advice needed

  1. #1
    Join Date
    Dec 2008
    Location
    Dallas
    Posts
    13

    Default advice needed

    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,

    -LeoD

  2. #2
    Join Date
    Jan 2009
    Location
    Ukraine, Kharkov
    Posts
    637

    Default

    Hello

    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!

    Good luck,
    Artem Bilan

    P.S. I also remembered the PriorityChannel
    http://static.springsource.org/sprin...rioritychannel
    Last edited by Cleric; Jul 10th, 2012 at 02:31 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •