Deprecate actor materializer (#27538)

This commit is contained in:
Johan Andrén 2019-09-05 16:08:37 +02:00 committed by GitHub
parent 8765a4fbe6
commit b68d67008a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
118 changed files with 1233 additions and 731 deletions

View file

@ -120,8 +120,7 @@ import scala.util.control.NonFatal
extends SinkModule[In, Publisher[In]](shape) {
override def create(context: MaterializationContext): (Subscriber[In], Publisher[In]) = {
val actorMaterializer = ActorMaterializerHelper.downcast(context.materializer)
val impl = actorMaterializer.actorOf(context, FanoutProcessorImpl.props(context.effectiveAttributes))
val impl = context.materializer.actorOf(context, FanoutProcessorImpl.props(context.effectiveAttributes))
val fanoutProcessor = new ActorProcessor[In, In](impl)
// Resolve cyclic dependency with actor. This MUST be the first message no matter what.
impl ! ExposedPublisher(fanoutProcessor.asInstanceOf[ActorPublisher[Any]])
@ -178,7 +177,7 @@ import scala.util.control.NonFatal
extends SinkModule[In, ActorRef](shape) {
override def create(context: MaterializationContext) = {
val subscriberRef = ActorMaterializerHelper.downcast(context.materializer).actorOf(context, props)
val subscriberRef = context.materializer.actorOf(context, props)
(akka.stream.actor.ActorSubscriber[In](subscriberRef), subscriberRef)
}