=str deprecate ActorPublisher/Subscriber, use GraphStage (#21952)
* =str deprecate ActorPublisher/Subscriber, use GraphStage * =str deprecate Source.actorPublisher / Sink.actorSubscriber * =str added deprecation note of ActorPublisher,Subscriber
This commit is contained in:
parent
591eafe04c
commit
2ea8cd7410
9 changed files with 90 additions and 0 deletions
|
|
@ -373,7 +373,10 @@ object Source {
|
|||
* Creates a `Source` that is materialized to an [[akka.actor.ActorRef]] which points to an Actor
|
||||
* created according to the passed in [[akka.actor.Props]]. Actor created by the `props` must
|
||||
* be [[akka.stream.actor.ActorPublisher]].
|
||||
*
|
||||
* @deprecated Use `akka.stream.stage.GraphStage` and `fromGraph` instead, it allows for all operations an Actor would and is more type-safe as well as guaranteed to be ReactiveStreams compliant.
|
||||
*/
|
||||
@deprecated("Use `akka.stream.stage.GraphStage` and `fromGraph` instead, it allows for all operations an Actor would and is more type-safe as well as guaranteed to be ReactiveStreams compliant.", since = "2.5.0")
|
||||
def actorPublisher[T](props: Props): Source[T, ActorRef] = {
|
||||
require(classOf[ActorPublisher[_]].isAssignableFrom(props.actorClass()), "Actor must be ActorPublisher")
|
||||
new Source(new ActorPublisherSource(props, DefaultAttributes.actorPublisherSource, shape("ActorPublisherSource")))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue