Hello, currently I have an actor which gets a Publisher,
this publisher has either one or multiple elements.
Based on that I want to run through this data and send the values to
multiple Subscribers (fan-out)
One should process it and get additional data from a database (which
returns a future)
Another should do the same but without the additional data
both will index the data to elasticsearch Currently I tried to have a
Sink.fanoutPublisher, however it will still only run once either with
getting data from the database or without demo code:
val pub = Source(a.data).runWith(Sink.fanoutPublisher(4, 4))
Source(pub).runForeach{ _ => log.debug("1")}
Source(pub).runForeach{ _ => log.debug("2")}
Currently a.data is a publisher which holds a case class, however my output
will always be:
[debug] w.IndexWorker - 1
Is there a way to attach multiple sources? or better just splitting the first
source and send it to multiple?
--
>>>>>>>>>> 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.