=str 15707 Define default names for sources and sinks

* Not intended to close the ticket, but improve the situation somewhat
  by defining default names of all sources and sinks.
* The stage names (actor names) are still rather weird

For example the following

    Source.single(1).named("aa")
      .map(identity).named("bb")
      .map(identity).named("cc")
      .runWith(Sink.publisher)

is materilaized with names:
flow-1-0-cc-bb-aa-singleSource : akka.stream.impl.PublisherSource@1787f2a0
flow-1-1-cc-bb-map : Map(<function1>,OperationAttributes(List(Name(map))))
flow-1-2-cc-map : Map(<function1>,OperationAttributes(List(Name(map))))
flow-1-3-publisherSink : PublisherSink

but that is out of scope for this commit
This commit is contained in:
Patrik Nordwall 2015-04-20 21:04:03 +02:00
parent aad8704085
commit 373f1acf3a
5 changed files with 72 additions and 29 deletions

View file

@ -145,7 +145,7 @@ class SubstreamSubscriptionTimeoutSpec(conf: String) extends AkkaSpec(conf) {
private def watchGroupByActor(flowNr: Int): ActorRef = {
implicit val t = Timeout(300.millis)
import akka.pattern.ask
val path = s"/user/$$a/flow-${flowNr}-1-groupBy"
val path = s"/user/$$a/flow-${flowNr}-1-publisherSource-groupBy"
val gropByPath = system.actorSelection(path)
val groupByActor = try {
Await.result((gropByPath ? Identify("")).mapTo[ActorIdentity], 300.millis).ref.get