fromObservable
Callable
Type parameters
- TContext
- TInput: NonReducibleUnknown
Parameters
observableCreator: (__namedParameters: { input: TInput; self: ActorRef<ObservableSnapshot<TContext, any>, { type: string }>; system: AnyActorSystem }) => Subscribable<TContext>
A function that creates an observable. It receives one argument, an object with the following properties:
input
- Data that was provided to the observable actorself
- The parent actorsystem
- The actor system to which the observable actor belongs
It should return a Subscribable, which is compatible with an RxJS Observable, although RxJS is not required to create them.
Returns ObservableActorLogic<TContext, TInput>
Observable actor logic is described by an observable stream of values. Actors created from observable logic (“observable actors”) can:
The observable’s emitted value is used as its observable actor’s
context
.Sending events to observable actors will have no effect.