BullMQ / Redis
The queue-backed transport for cross-process and cross-language steps. Each step name gets its own tasks queue; results return on a shared results queue. Run one instance engine-side, one per worker.
@dudousxd/nestjs-durable-transport-bullmq carries steps over BullMQ/Redis — the path for steps
that run in another process or another language (e.g. a Python worker).
pnpm add @dudousxd/nestjs-durable-transport-bullmq bullmqHow it works
ctx.remotedispatches a task to a per-name queue:<prefix>-tasks-<name>[@<partition>].- A worker registered for that step name consumes it, runs the handler, and adds the result to the
shared
<prefix>-resultsqueue. - The engine-side instance consumes results and checkpoints them.
Run one instance engine-side (consumes results) and one per worker process (registers its handlers, and dispatches on the transport):
const transport = new BullMQTransport({ connection: { host: 'localhost', port: 6379 } });
DurableModule.forRoot({ store, transport });const transport = new BullMQTransport({
connection: { host: 'localhost', port: 6379 },
partition: 'payments', // optional isolation suffix — omit for a single-tenant deployment
});
transport.handle('payments.charge-card', async (input) => ({ chargeId: await charge(input) }));Options
| Option | Description |
|---|---|
connection | ioredis connection options (or an IORedis instance). |
partition | Optional isolation suffix appended to every one of this instance's per-name queues (<name>@<partition>). Omit for a single-tenant deployment. |
prefix | Namespaces the queues. Defaults to durable. |
The payload is the documented RemoteTask / StepResult JSON, so a non-Node worker on the same
queues interoperates — that's exactly how the Python worker plugs in.
Overview
How remote steps travel to workers. From an in-process event-emitter for zero-infra single-process handlers, to BullMQ/Redis, SQS, and a broker-less SQL transport for cross-process and cross-language steps.
AWS SQS
The queue-backed transport on AWS SQS. Same RemoteTask/StepResult contract as BullMQ — tasks go to a per-group queue, results return on a shared queue — so Node and Python workers interoperate.