That is not expected, and I have a hard time thinking that Akka streams
would create it twice accidentally. Sure you don't run it twice?
/Patrik

On Fri, Jan 29, 2016 at 1:26 AM, gavares <[email protected]> wrote:

> I'm attempting to create an actor that extends ActorPublisher and then
> create a Runnable graph from the following code:
>
> lazy val eventSource: Source[MyEvent, ActorRef] = {
>   logger.debug("Creating BasicSimulator.eventSource")
>   Source.actorPublisher[MyEvent](Props(classOf[BasicSimulatorActor], cfg))
> }
>
> lazy val sinkActor = 
> actorSystem.actorOf(MyActor.props(MyAggregate.createActor), MyActor.Path)
>
>
>
> lazy val runnableGraph: RunnableGraph[ActorRef] = {
>   logger.debug("Creating eventStream RunnableGraph")
>
>   val evtSrc = eventSource
>   val evtSink = Sink.actorRef[MyEvent](sinkActor, StreamClosed)
>   evtSrc.to(evtSink)
> }
>
> runnableGraph.run()
>
>
>
> The problem I'm having is that multiple instances of the source actor are
> being created. I can see that the logging lines in the code above are each
> only being printed a single time when the program starts and yet there are
> two instances of my actor that receive and handle Request messages for the
> stream and they are named flow-0-0-actorPublisherSource and
> flow-1-0-actorPublisherSource
>
> Is this expected or am I misunderstanding/misusing the library in some way?
>
>
> --
> >>>>>>>>>> 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.
>



-- 

Patrik Nordwall
Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
Twitter: @patriknw

-- 
>>>>>>>>>>      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.

Reply via email to