Hi,
I am using Akka Streams API for receiving and storing messages to DB. I
like flow control feature of Akka Streams and think it is perfectly fit my
requirements. 99% of objects in stream should be routed to persistence,
however 1% is requests, that has to be routed to processor.
I would like to keep indications of demand to source, so my system should
not has more objects in fly to don't overload memory.
I thinking about few options, how I could extract this request from stream.
1. Implement custom filter that would take out query request from stream
and route to processor. In this case stream configuration doesn't
explicitly has routing message mechanism.
Graph:
(source) -> (filter) -> (persister)
In this case my processor is out of stream demand control and could
(potentially) cause overload of the system.
2. Use broadcast in order to duplicate received messages to two filters
Graph:
(source) -> (broadcast) -> (filter requests) -> (processor)
-> (broadcast) -> (filter not requests) -> (persistence)
Is there any better solution to my problem ?
Thanks in advance.
--
>>>>>>>>>> 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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.