# IMQMode enum · @imqueue/core

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

Operating mode of a queue instance, selecting which halves of the queue are active. Passed as the third constructor argument and defaults to [IMQMode.BOTH](https://imqueue.org/api/core/latest/core.imqmode/).

All modes still open a writer connection and take part in watcher election; the mode only controls whether a reader is created and whether sending is allowed.

**Signature:**

```typescript
export declare enum IMQMode 
```

## Enumeration Members


| Member | Value | Description |
| --- | --- | --- |
| BOTH | `0` | Consume and produce. This is the default. |
| PUBLISHER | `2` | Produce only. No reader connection is opened, so the queue never emits `message` events and never releases delayed messages. |
| WORKER | `1` | Consume only. No messages can be sent — `send()` throws a `TypeError`. |


## Remarks

The members carry implicit numeric values and `BOTH` is `0`, so a falsy check such as `mode || IMQMode.WORKER` silently resolves to `WORKER`. Do not persist these values either — they shift if the members are reordered.

