# EventMap interface · @imqueue/core

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

Typed event map for a queue's `EventEmitter` base, giving compile-time signatures for the only two events a queue emits.

**Signature:**

```typescript
export interface EventMap 
```

## Remarks

The map is closed, so `emit`/`on` with any other event name is a type error — there is no `connect`, `close`, `ready` or `drain` event on a queue.

## Properties


| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [error](https://imqueue.org/api/core/latest/core.eventmap.error/) |  | \[error: Error, eventName: string\] | Emitted for background failures, with the error and the name of the internal routine that caught it — a diagnostic label such as `OnMessage`, `OnReadSafe` or `OnWatch`, not an error code. |
| [message](https://imqueue.org/api/core/latest/core.eventmap.message/) |  | \[data: [JsonObject](https://imqueue.org/api/core/latest/core.jsonobject/), id: string, from: string\] | Emitted for every message consumed from the queue, with the payload, the message id, and the name of the queue that sent it. |

