Skip to content

KindHandler

Defined in: packages/core/src/capture/consumer/types.ts:34

The code that runs jobs of one kind.

optional backoff?: object

Defined in: packages/core/src/capture/consumer/types.ts:40

Retry delay of this kind: baseMs * 2^n capped at maxMs; defaults to the consumer’s.

baseMs: number

maxMs: number

optional accepts(job): boolean

Defined in: packages/core/src/capture/consumer/types.ts:38

Whether the job is well-formed; a job that is not is failed without retries.

ConsumerJob

boolean


optional cancel(job): Promise<void>

Defined in: packages/core/src/capture/consumer/types.ts:42

Stop a running job (lease lost or cancelled); must tolerate a job that already ended.

ConsumerJob

Promise<void>


run(job, context): Promise<void>

Defined in: packages/core/src/capture/consumer/types.ts:36

Run the job; resolve to ack it, reject to retry (or fail it on its last attempt).

ConsumerJob

JobRunContext

Promise<void>