خرید بک لینک

Vote count: 0

i have a stream code

   val source = Source.actorRef[Msg[T]](1000, OverflowStrategy.dropHead)
   val flow=source.map(println(_)).to(Sink.onComplete{case _=>println("complete")}).run()

after i run the code, i found from the logfile,the akka had create two actors:

 akka://xxxx/flow-0-0-unknown-operation#-969158424]
 akka://xxxx/flow-0-1-actorRefSource#-1265269541]

what is this "unknown-operation" actor?

can i rename it? i am a little confuse,becuase once i change the code as:

val flow=source.map(println(_)).to(Sink.onComplete{case _=>receiver.stop()})
         .named("iwantName").run()

and the log output as:

 akka://xxx/flow-0-0-unknown-operation#1904555295]   
 akka://xxx/flow-0-1-iwantName-actorRefSource#-1328507659]

i try to rename it to "iwantName" but it changed to another actor.

can someone explain to me pls, what is the exactly function of the 2 actor?

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 12 ارديبهشت 1395 ساعت: 17:50

صفحه بندی