I've got an Akka Streams Flow pattern that I've wanted to implement a few
times in the past, but haven't been successful in finding a clean and
simple solution that works, usually resulting in some kind of refactoring
for a different approach. I'm now enhancing existing code and would like to
change it as little as possible, but am at a loss for how.
The interface I'd like to conform to is:
trait SparseIndexLoader[PATH] {
def insertTsQueryRecordsForPath: Flow[PATH, Int, NotUsed]
}
Currently, we have only one concrete implementation of SparseIndexLoader,
but I'd like to create a composite instance that
- accepts zero or more SparseIndexLoader instances to delegate to. Each
instance will contain different business logic.
- broadcasts each inbound PATH message to all delegate SparseIndexLoader
instances
- merges the delegate SparseIndexLoader flow outputs into one aggregated
output
Is there a way to do this with relative ease? I've looked at Source.combine
and Sink.combine with CoupledTerminationFlow.fromSinkAndSource, but I
struggle with figuring how to work around the need for Source and Sink only
within the composition. This feels like a general purpose pattern that
someone probably has already solved, but I'm failing to find it.
Thank you,
James
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.