Function: createSpillingJobTransport()
createSpillingJobTransport(
transport,options):JobTransport
Defined in: packages/workflow-engine/src/kernel/spill.ts:426
Wraps a JobTransport so job payloads above the threshold live in the
blob store and the queue row (or message) carries only a claim check.
Pass the wrapped transport to both createKernel and the host, so
the enqueue that packs and the dequeue that resolves are the same object.
One caveat, for push transports only: a consumer who delivers job
messages through their own queue (Cloudflare Queues, SQS) and calls
host.handleJob(msg) with a message they built themselves bypasses
dequeue(), and so bypasses the resolve. Those consumers should resolve
the payload first with a createPayloadSpill(...) of their own:
const spill = createPayloadSpill({ blobStore });
await host.handleJob({
...msg,
payload: (await spill.unpack(msg.payload)) as Record<string, unknown>,
});