# IMessageQueue.destroy() method · @imqueue/core

Source: https://imqueue.org/api/core/latest/core.imessagequeue.destroy/
Published: 2026-08-04
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/core 3.3.2 — generated reference, not hand-written

Releases this queue handle: removes all event listeners, stops the maintenance timers, releases the watcher lock if held, disconnects the reader, and drops this instance's reference to the shared writer.

**Signature:**

```typescript
destroy(): Promise<void>;
```
**Returns:**

Promise<void>

## Remarks

The writer connection is shared per `host:port` within the process and stays open while other started instances still reference it.

Queue data is deliberately left intact, so destroying one handle never discards messages still pending for other producers or consumers. Note that removing all listeners also discards the caller's `message` and `error` handlers, while [IMessageQueue.start()](https://imqueue.org/api/core/latest/core.imessagequeue.start/) can revive the instance — so re-register them if you restart it.

