-
Nov 26th, 2010, 08:43 PM
#1
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
-
Nov 27th, 2010, 06:12 AM
#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.
-
Nov 27th, 2010, 08:13 AM
#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]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules