Announcement Announcement Module
Collapse
No announcement yet.
writing multiple messages to a file file:outbound-channel-adapter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • writing multiple messages to a file file:outbound-channel-adapter

    I am planning to write failed messages to a file.
    However, the file:outbound-channel-adapter implementation saves each messages to a new file. Instead, i would like to have multiple messages per file.
    I would also like to read a file with several messages and then process it as it is my next logical step.

    I see that Spring integration doesn't provide a hook for a custom implementation here for end user.
    Today, i am able to use file name generator and apply a simple logic to create new files for every 'xxx' messages, but i couldn't find a way to append new messages to the same file.
    I looked at the code in FileWritingMessageHandler.handleStringMessage
    and thought its a simple fix to add this feature.

    I would appreciate your thoughts on this.

    --sri

  • #2
    Have you looked at Spring Batch? It has a lot of features with regard to complex file processing and is very often used and demonstrated with Spring Integration.
    Remember, Spring Integration is a light-weight messaging framework which provides adapters to transport a single message to a remote system and back (in your case message = file). It itself does not provide an API hooks to address more complex scenarios such as the one you describe, however Spring Batch does and in fact was designed around such requirements.

    Comment


    • #3
      Thanks for the pointer. I have never looked at Spring batch before, but always wanted to at some point. Now is the time, i guess.
      --sri
      [
      QUOTE=oleg.zhurakousky;331695]Have you looked at Spring Batch? It has a lot of features with regard to complex file processing and is very often used and demonstrated with Spring Integration.
      Remember, Spring Integration is a light-weight messaging framework which provides adapters to transport a single message to a remote system and back (in your case message = file). It itself does not provide an API hooks to address more complex scenarios such as the one you describe, however Spring Batch does and in fact was designed around such requirements.[/QUOTE]

      Comment

      Working...
      X