WorkerService

WorkerService

WorkerService

This service is responsible for sending messages to the Worker process. See the WorkerMessage docs for an example of usage.

Signature

class WorkerService implements OnModuleDestroy {
  constructor(client: ClientProxy)
  send(message: WorkerMessage<T, R>) => Observable<R>;
}

Members

constructor

method
type:
(client: ClientProxy) => WorkerService

send

method
type:
(message: WorkerMessage<T, R>) => Observable<R>
Sends a WorkerMessage to the worker process, where there should be a Controller with a method listening out for the message’s pattern.