Repository navigation
INT-651: Add Iterator support for Splitter - #1202
artembilan wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Something went wrong here - it can still be a collection; perhaps change to something like...
A collection or an array of Messages, or an Iteratable (or Iterator) that iterates over Messages.
We also should indicate the sequence size is 0 when using iterators, so the default aggregator won't work.
We should also explain why you might choose to use an iterator - it avoids building an entire collection in memory before splitting.
It's quite a specialized use case, we're not really "splitting" the inbound message itself, just that the inbound message contains metadata to build an iterator of some kind.
|
Pushed new |
|
Gary, having this how about to add |
|
Yes; I have often thought about a (remote) file splitter (file/ftp/sftp) where we fetch a large file and emit, say, lines from the file (or fixed-length chunks). We have that capability (since 3.0) with the remote file template for (s)ftp. e.g. Although, you are right it is a bit of an overload of "splitter". |
There was a problem hiding this comment.
I am not so keen on this class name.
SplitterIterator, SplitterSourceIterator...
?
There was a problem hiding this comment.
FunctionIterator ?
As you see it isn't an internal class and is located in the util package. It can be used from any place.
There was a problem hiding this comment.
FunctionIterator is good.
|
Pushed |
|
BTW this can be backported painlessly. |
There was a problem hiding this comment.
I was about to merge this, but I wonder if we really want to create a dependency on Reactor for such a trivial interface; especially because we added FunctionIterator.
I am thinking we should just port Function to util.
WDYT?
There was a problem hiding this comment.
I don't think so. We already have a transitive dependency for Reactor with Spring Messaging.
And I hope we'll produce soon some Reactor support: for example Promise Gateway: artembilan@6b503e9
There was a problem hiding this comment.
ok; let's go ahead and create a JIRA for the Promise gateway return type (I thought we already had one, but don't see it).
There was a problem hiding this comment.
Done: https://jira.spring.io/browse/INT-3477.
No, we haven't had it before, since there was no agreement that we should utilize Reactor.
|
Merged and cherry-picked |
JIRA: https://jira.spring.io/browse/INT-651