# BaseJobQueue.handleMessage() method · @imqueue/job

Source: https://imqueue.org/api/job/latest/job.basejobqueue.handlemessage/
Published: 2026-08-31
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/job 3.3.0 — generated reference, not hand-written

Handles one popped message: runs the handler, then acts on what it asked for.

**Signature:**

```typescript
protected handleMessage(message: any, id?: string): Promise<void>;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| message | any | the popped message envelope |
| id | string | _(Optional)_ broker message id, for log lines |


**Returns:**

Promise<void>

## Remarks

Lives here rather than on [JobQueueWorker](https://imqueue.org/api/job/latest/job.jobqueueworker/) because [JobQueue](https://imqueue.org/api/job/latest/job.jobqueue/) consumes as well, and reaches the worker's `onPop` through `Function.call` — so the listener it installs has to find this on the instance it was called with, whichever of the two that is.

