Hi everybody
object Main2 extends App{
> implicit val system = ActorSystem("streamakka")
> implicit val materializer = ActorMaterializer()
> val sub1=Source.subscriber[String].to(Sink.foreach(println)).run()
>
> val pub1=Source.repeat("p1").runWith(Sink.publisher)
> val pub2=Source.repeat("p2").runWith(Sink.publisher)
>
> pub1.subscribe(sub1)
> pub2.subscribe(sub1)
> }
>
>
I just wrote simple code. There are two publishers and one subscriber. I am
using reactive stream api because in my app i want to dynamically
subscriber client connections(Publishers) to a single subscriber(actually a
flow implemented with akka stream again). In my machine sometimes it just
write
p1
p1
p1
p1
or
p2
p2
p2
p2
sometimes it just writes lots of p1 or p2 values. Am i missing something?
--
>>>>>>>>>> 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.