# IMQClientOptions.handleSignals property · @imqueue/rpc

Source: https://imqueue.org/api/rpc/latest/rpc.imqclientoptions.handlesignals/
Published: 2026-12-04
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/rpc 3.14.1 — generated reference, not hand-written

Let this package handle `SIGTERM`, `SIGINT`, `SIGHUP` and `SIGQUIT` for the process. Set it to `false` when the host owns shutdown — an HTTP gateway holding clients, for one.

**Signature:**

```typescript
handleSignals?: boolean;
```

## Default Value

true

## Remarks

Left on, the client installs handlers that destroy it — abandoning the calls still waiting for an answer — and exit the process after `IMQ_SHUTDOWN_TIMEOUT`, and its queue installs its own (see the core `IMQOptions.handleSignals`). A host's own shutdown handler cannot finish its work before that exit.

`false` stops both, so the host decides: stop taking new work, let the calls already made settle, then call `destroy()`.

With draining enabled in the process (`IMQ_DRAIN_ENABLE=1`, or a service constructed with `drain`), the queue's handlers are suppressed anyway and the client's own are left for the drain to take over — unless this is `false`, in which case the client installs none.

Handlers are process-wide: any other client or service in the process that leaves this on still exits the process on a signal.

