The more I think about it the more I realize that while this seems like an
easy problem it may be difficult to solve with akka-streams. There does not
seem to be a way to signal that last element has been received in order to
create last chunk of elements with the same property. For example,
Do you mind clarifying what you meant when you mentioned that signature for
Source has been changed to take function that creates Iterator in order to
share Source between various parts of code?
Can this create iterator function be invoked more than once in the same
runnable flow execution? If
Given a stream of elements E ordered by some property, how can I group
these elements into List[E] as soon as all all elements with the same
property are emitted. I want to continue processing each stream element,
which now becomes List[E], as soon as possible. groupBy does not work in
this
Martynas,
I have an existing function that creates Iterator that wraps ResultSet and
I can pass this function to Source(f: () = Iterator) which would allow
re-materialization. It makes sense though to execute query in hasNext as an
optimization in case Iterator is never consumed. Given that I
I have been looking at akka-streams 0.7 and there used to be IteratorSource
which could be used by passing Iterator. akka-streams 1.0-M4 no longer has
IteratorSource but it has a Source object that takes function which
produces an Iterator.
Is main reason reason for this so that Iterator could
The issue of testing business functionality that may be implemented in the
class extending Actor has been raised quite a few times and I haven't found
any good suggestions yet. Most Actor testing examples are focused around
message receipt, type, timing etc. Akka team's response to this
post