receive

abstract suspend fun <P : Any> receive(fromComponent: ComponentRef, serializer: KSerializer<out P>): Either<ComponentError, Flow<P>>

Receives a message of type P by deserializing it with the given serializer. If the message pushed in the flow cannot be serialized with the given serializer the flow will fail with an exception. This method can fail with a ComponentNotRegistered if the fromComponent is not registered as link of this component.