IMQService.start() method
Initializes this instance of service and starts handling request messages.
Signature:
start(): Promise<IMessageQueue | undefined>;
Returns:
Promise<IMessageQueue | undefined>
the started message queue instance
Remarks
In single-process mode this starts the queue in the current process. With IMQServiceOptions.multiProcess the cluster primary forks cpus().length * childrenPerCore workers, each receiving its index in the workerId environment variable, and installs an exit watcher that terminates the process with code 1 as soon as one worker dies — workers are never respawned, so supervision is left to the process manager.
Note that the primary also starts its own queue consumer and metrics listener after forking, so a service configured for N workers runs N+1 consumers and N+1 processes attempt to bind the metrics port.
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.