Announcement Announcement Module
No announcement yet.
File adapter & message creation suggestion Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • File adapter & message creation suggestion


    May I suggest that for one of the next release of Spring Integration it should be possible to parameterize the file adapter in order to generate several messages or a message containing a part of the file parsed ?

    Description of the functionality required:
    An ASCII file like an order or instruction file contains CSV records. Each CSV represents an order or an instruction and can be translated into a message. So, during the parsing process, instead of providing a String representation of the file content, it should be interesting using a parameter defining at the level of the file adapter to declare that the parser for each CSV record must create a message. In this case, the result of the parsing will be a list of messages. So, when we will call our process method in the endpoint class, we will be able to receive a list of Messages (e.g. public void processCSV (Message<List> message) ).
    An another complementary alternative is to inform the parser that we want to receive the CSV records under the form of a block of 100 records in a message. This strategy avoids that we push on the BUS hundred or thousand messages reducing significantly the performance but a message containing a block of 100 records.

    Such strategy can be extended for another type of file (XML) using parameter indicating the tag element of the record, ...