Quickback Docs
Database per Tenant

Background Work in Tenant Databases

Tenant schedules, platform queues, result jobs and partition jobs when every organization has its own Durable Object.

Schedules, queue consumers and long-running jobs run differently when each organization's data lives in its own Durable Object: work is fanned out per tenant or pinned to one. This page covers each kind of background work. Outbox delivery and the tenant code environment are on Tenant Code and the Outbox. Start at Database per Tenant for the model.

Background work

Per-tenant alarms replace global "every minute, scan every organization" sweeps. Each object has one alarm, shared by backups and tenant jobs, driven by a schedule table: a due row is moved to its retry time before the work runs, and a finished occurrence is recorded before its row is removed, so a crash retries the same occurrence up to five attempts. Handlers must make external side effects idempotent. Canceling or replacing a due occurrence prevents its stale snapshot from running; rescheduling at the same time creates a new occurrence. Unarchiving re-arms suspended work.

A tenant job is a services/queues handler that runs inside a tenant object. Mark it tenant: true (implied when it imports an unpartitioned tenant feature). A handler may not mix platform and tenant imports; a feature with no tables (helpers only) is neither, so either kind may import it. Partitioned feature imports need an explicit partition placement — see Partition jobs. Inside a tenant job, tenant on the execute context supplies scheduling, cancellation and outbox delivery; it is absent for platform handlers.

quickback/services/queues/reminderDue.ts
import { eq } from "drizzle-orm";
import { defineQueue } from "@quickback/compiler";
import { reminders } from "../../features/reminders/schema";

export default defineQueue<{ type: "reminder.due"; tenantId: string; reminderId: string }>({
  name: "reminderDue",
  messageType: "reminder.due",
  tenant: true,
  execute: async ({ message, db }) => {
    db.update(reminders).set({ sentAt: new Date().toISOString() }).where(eq(reminders.id, message.reminderId)).run();
    return { success: true };
  },
});

The same handler runs three ways:

TriggerHow
QueueA producer sends { type, tenantId, … }; the edge consumer routes it to that tenant's object (runJob). A message literal for a tenant job without tenantId fails the build (TENANCY_QUEUE_TENANT_ID); at runtime one without it is retried into the dead-letter queue.
AlarmtenantRuntime(env).schedule(key, at, message) from a tenant action or job, or scheduleTenantJob(env, tenantId, key, at, message) on the edge. One pending occurrence per key; a job reschedules its own key for the next due item.
OutboxtenantRuntime(env).send(target, message) — see Partitions.
Platform queueA tenant action or job calls tenantRuntime(env).enqueue(binding, message); the edge sends it to a platform queue and that queue's consumer routes it — see Platform queues.

Tenant actions import tenantRuntime from their define-action helper:

await tenantRuntime(env).schedule("reminder:" + row.id, Date.parse(row.remindAt), { type: "reminder.due", reminderId: row.id });

schedule, send and the edge helpers stamp tenantId. Each run gets a runId, stable per occurrence or message: use it as the idempotency key for external side effects (email, SMS, payments). Concurrent deliveries of one runId share an in-flight execution in the live object. Completion is recorded only on success. A crash after an external effect but before durable completion can repeat that effect: delivery remains at-least-once, so handlers must use that idempotency key externally.

Tenant jobs honor ack() and retry() for queues, alarms and outbox delivery. retry() is sticky and wins over a later ack() or a successful return; no completion marker is recorded for that attempt.

After an alarm, the object asks its edge to drain what the alarm left in the outbox (queue sends, realtime, lookups) through the edge's QuickbackTenantOutbox entrypoint — the tenant Worker binds it as __QB_EDGE_OUTBOX (generated in wrangler.tenant.jsonc, each target its own edge). While entries remain (the edge unreachable, entries backing off), an internal alarm asks again — after 30 s, doubling to an hour while a drain makes no progress — so delivery never waits for the tenant's next request and no cron sweeps the objects. Without the binding it does not poll: the next request or operator sync drains. A named entrypoint is reachable only through a service binding, never over HTTP; tenant app code does not see the binding, and the edge drains only registered objects (an unknown name is refused, never woken). Keys starting qb: (qb:backup, qb:outbox-flush, qb:schedule:<type>) belong to the runtime: schedule / cancel and the edge helpers refuse them (TENANT_JOB_INVALID).

An alarm that throws retries the same occurrence with backoff (10 s, doubling, capped at an hour). After five attempts it is a dead letter: a failed delivery receipt of kind alarm (target the key, method the job type, reason TENANT_ALARM_DEAD_LETTER: … with the last error). A one-off occurrence is then dropped; a tenant schedule runs again an hour later, and writes to its watched tables do not bring that retry forward.

Tenant schedules

A tenant schedule is recurring per-tenant work with no cron and no global scan: a tenant job with schedule:, run on each organization's own alarm. It runs when it is due and returns next — when it is due again (ms or a Date), or null to sleep. An organization with nothing due never wakes.

quickback/services/queues/remindersTick.ts
import { and, eq, isNull, lte, min } from "drizzle-orm";
import { defineQueue } from "@quickback/compiler";
import { reminders } from "../../features/reminders/schema";

export default defineQueue<{ type: "reminders.tick"; tenantId: string }>({
  name: "remindersTick",
  messageType: "reminders.tick",
  tenant: true,
  // Writes to these tables (any request, job or alarm) re-arm it.
  schedule: { watch: ["reminders"], debounceSeconds: 5 },
  execute: async ({ db, tenant, runId, schedule }) => {
    const now = new Date().toISOString();
    for (const r of await db.select().from(reminders).where(and(isNull(reminders.sentAt), lte(reminders.dueAt, now)))) {
      db.update(reminders).set({ sentAt: now }).where(eq(reminders.id, r.id)).run();
      tenant!.enqueue("EMAIL_QUEUE", { type: "reminder.send", reminderId: r.id });
    }
    const [next] = await db.select({ at: min(reminders.dueAt) }).from(reminders).where(isNull(reminders.sentAt));
    return { success: true, next: next?.at ? Date.parse(next.at) : null };
  },
});
  • Re-arming. SQL triggers on the watched tables (tenant tables of the organization object, by export or SQL name) mark the schedule in the write's own transaction, so every write path counts — actions, jobs, bulk statements. After each request, job or alarm the object re-arms marked schedules debounceSeconds later (default 5, 0–3600), unless one is already due sooner or is backing off after a failure: a re-arm never postpones a run or resets a retry budget. The schedule's own writes never mark it (no self-re-arm loop). A request (its deferred work included), command or job that overlapped the run while a watched table was written (an unmuted per-schedule write counter) brings the next run forward to the debounce — at most one extra run per overlapping operation, since the counter also sees the run's own writes. A watched name that resolves to no table is skipped and logged (tenant.schedule.table_unresolved).
  • From the edge. armTenantSchedules(env, tenantId, types?) re-arms an organization's schedules (all, or the given job types) for a change its writes cannot see — an edge-side row, a deploy. A deploy that adds or changes a schedule marks it on each organization's next wake; operators can arm everyone at once with POST /tenants/schedules/arm-all (a manual, bounded one-off — never a cron) or one organization with POST /tenants/:id/schedules/arm. An explicit arm also cuts a dead-letter cooldown short (after deploying a fix); a write does not.
  • At least once. A run is an alarm occurrence: runId is stable for it, a throw retries it with backoff and a dead letter is recorded as above; the schedule itself never stops. Completion is recorded only after the next occurrence is written; an occurrence found already complete is evaluated again after the debounce, never dropped.
  • Restores. A point-in-time restore rewinds the schedule rows, the marks and the data together, so they stay consistent; the platform alarm is re-armed from the rows when the object serves again, and every schedule is marked for one fresh evaluation. Work due between the restore target and the restore may have run on the abandoned timeline and runs again: schedule.restoredAt (the last restore, ms, or null) on the execute context lets a handler skip external side effects for it. A dump restore keeps the alarm rows (they are not tenant tables) and marks every schedule the same way.
  • Placement. Schedules run in organization objects only. schedule: needs tenant: true, is refused on a result job, on a qb:-prefixed type, and in shared tenancy (TENANCY_SCHEDULE); it must be true or a literal object.

Platform queues

Tenant code has no queue bindings (TENANCY_ENV_UNAVAILABLE). To hand work to the edge — email, push, webhooks — it sends a message to one of the edge Worker's queue bindings through the object's outbox:

import { defineAction, tenantRuntime } from "../.quickback/define-action";
// …
tenantRuntime(env).enqueue("COMMS_QUEUE", { type: "mail.send", guestId: row.id });
  • Same write. The call writes an outbox row with the request's writes. The edge drains the outbox after the response and calls env.COMMS_QUEUE.send({ ...message, tenantId, dedupeKey }). The row is written at the call: it is not dropped if execute later throws or returns a dry run. To send only after a successful execute, use effects.enqueue(binding, message).
  • tenantId comes from the object. The edge stamps the tenant from the object's name. A message that sets tenantId or dedupeKey itself throws (TENANT_QUEUE_MESSAGE); nothing is written.
  • At least once. A failed send keeps the entry queued and it is retried with backoff (outbox delivery), so a consumer can see a message twice. dedupeKey (a UUID fixed when the row is written) is the same on every delivery: use it as the consumer's idempotency key.
  • Receipts. enqueue(binding, message, { ref }) records ref (1–200 characters) on the row's delivery receipt. Point it at your own per-send row, such as a comms_log id, instead of copying that row into the receipt. The receipt also carries the dedupeKey, so a consumer that stores dedupeKey on its row links the two the other way.
  • Size. A message over 120 KiB of JSON, or one that is not JSON-serializable, throws at the call (TENANT_QUEUE_MESSAGE_TOO_LARGE, TENANT_QUEUE_MESSAGE). A row the edge can never send (a binding missing from the edge Worker, a message the queue refuses) is dead-lettered so it does not block the outbox.
  • Declared bindings only. The binding must be one of the edge Worker's queues (the primary queue and additionalQueues; each takes the consumer settings maxBatchSize, maxBatchTimeout, maxRetries, maxConcurrency and deadLetterQueue — see Custom queues). The build refuses any other name, or a name it cannot read (not a string literal), in tenant actions, tenant jobs, JS trigger handlers and the helpers they import (TENANCY_QUEUE_BINDING); at runtime the object refuses it (TENANT_QUEUE_UNKNOWN), and the drain dead-letters a row naming an unknown binding.
  • A tenant job uses tenant.enqueue(binding, message), the same call. effects.enqueue(binding, message) and table-level transition onEnter.enqueue steps in tenant features route through it too, after execute succeeds and before the response. A refusal there (TENANT_QUEUE_*) fails the response.

The consumer is a platform queue handler: it runs on the edge, with the platform D1. If it needs the tenant's data, it calls a result job with message.tenantId. That value is authoritative only for messages from a tenant outbox (the edge stamped it). A queue that edge code also produces to carries whatever that producer wrote: edge producers must set tenantId from the caller's ctx (ctx.activeOrgId), never from request input. A restore discards queued queue entries with the other outbox entries that are neither audit rows nor scope revocations.

Running a message at once (inline)

A queue adds seconds between the response and the consumer. For a message that should not wait (a push notification for a chat message), the edge can run the handler itself as soon as the tenant's response comes back, and keep the queue as the fallback. Both sides opt in:

// quickback/services/queues/sendPush.ts — an edge handler
export default defineQueue<{ type: "push.send"; tenantId: string; dedupeKey: string; userIds: string[] }>({
  name: "sendPush",
  messageType: "push.send",
  edgeInline: true,
  execute: async ({ message, env }) => { /* claim message.dedupeKey, then send */ return { success: true }; },
});

// a tenant action — the producer decides per message
tenantRuntime(env).enqueue("COMMS_QUEUE", { type: "push.send", userIds }, { inline: userIds.length <= 50 });
  • The row is still written to the outbox with the request's writes. After the response the edge runs the handler with the same { ...message, tenantId, dedupeKey } body, beside the realtime frames and beside any other inline message of that response.
  • The queue is the fallback. If the run throws, returns success: false, calls retry(), or takes longer than 15 seconds, the edge sends the message to the queue with the same dedupeKey. A message without inline: true, or whose handler does not declare edgeInline: true, goes to the queue as before.
  • Claim dedupeKey first. One row can reach the handler more than once: an inline run that timed out may still be running when the queue delivers it, and an edge that stops mid-run leaves the row to be claimed again after its lease. Claim message.dedupeKey (in the tenant, with a result job, or in KV) before any side effect, as for any at-least-once consumer.
  • Only on the request's own response, eight at most. A message runs inline when its row comes back with the response of the request that wrote it (up to 32 rows do). At most eight marked rows per response run inline; the rest, and every row delivered later by a drain, a sweep or a tenant job's outbox, go to the queue.
  • The run counts against the request's waitUntil time, so mark only small messages. Send large fan-outs without inline.
  • edgeInline must be the literal true on a handler that runs on the edge; a tenant job, or a project without tenant objects, fails the build (QUEUE_EDGE_INLINE). The delivery receipt of a message that ran inline has detail.inline: true.

Result jobs

Edge code sometimes needs an answer from a tenant's database: a public page showing an organization's data, or a platform action that reads tenant state. Edge code can't query tenant tables (TENANCY_ADMISSION_DEPENDENCY), and cross-tenant unsafe or root-path actions can't move into a tenant feature (TENANCY_UNSAFE_ACTION, TENANCY_ROOT_ACTION). They stay on the edge, in a platform feature, and call a result job: a tenant job declared with result: true and a resultSchema.

quickback/services/queues/reminderCount.ts
import { z } from "zod";
import { eq } from "drizzle-orm";
import { defineQueue } from "@quickback/compiler";
import { reminders } from "../../features/reminders/schema";

export default defineQueue<{ type: "reminder.count"; tenantId: string; ownerId: string }>({
  name: "reminderCount",
  messageType: "reminder.count",
  tenant: true,
  result: true,
  resultSchema: z.object({ open: z.number().int() }),
  execute: async ({ message, db }) => {
    const rows = await db.select().from(reminders).where(eq(reminders.ownerId, message.ownerId));
    return { success: true, result: { open: rows.filter((r) => !r.sentAt).length } };
  },
});
import { callTenantJob, resolveTenant } from "../../../lib/tenants";

const tenantId = await resolveTenant(env, "inviteCode", input.code); // or ctx.activeOrgId
if (!tenantId) throw new ActionError("Unknown code", "NOT_FOUND", 404);
// The edge action is the only authorization gate: check here that this caller may ask this question.
const runId = "reminder-count:" + crypto.randomUUID(); // built on the server, never from the request
const res = await callTenantJob<{ open: number }>(env, tenantId, { type: "reminder.count", ownerId: input.ownerId }, runId);
if (res.status === "unavailable") throw new ActionError("Try again shortly", res.code, 503);
if (res.status === "failed") throw new ActionError("Lookup failed", "LOOKUP_FAILED", 422); // res.error stays server-side
return res.result;

callTenantJob(env, tenantId, message, runId) returns { status: 'ok', result } | { status: 'failed', error } | { status: 'unavailable', code }:

ResultWhen
okThe handler returned { success: true, result }. The object validated result against resultSchema and checked that it serializes to at most 256 KiB, then recorded it with the run marker in one transaction.
failedThe handler returned { success: false, error } (that error, capped at 200 characters), threw (TENANT_JOB_FAILED; the error text is never returned, only logged as the job type and code), called retry(), or its result failed the schema (TENANT_JOB_RESULT_INVALID) or the size cap (TENANT_JOB_RESULT_TOO_LARGE). Also TENANT_JOB_RUN_CONFLICT, below. Nothing is recorded, so the same runId runs again. Writes the handler made are kept: key them by runId.
unavailableThe registry gate shared with tenant commands (TENANT_NOT_PROVISIONED, TENANT_PURGED, TENANT_JURISDICTION_MISMATCH, TENANT_UNAVAILABLE), an archived, purged or unmigrated object (TENANT_ARCHIVED, TENANT_PURGED, TENANT_MIGRATION_FAILED), a pending restore, an RPC failure (TENANT_OVERLOADED, …), version skew, or a malformed reply (TENANT_JOB_REPLY_INVALID). The job may or may not have run.

resultSchema must be z.object({ … }), which strips unknown keys, or a strict object (z.strictObject, .strict()), which refuses them, written inline or as a top-level const. A passthrough, loose or catchall schema fails the build (TENANCY_JOB_RESULT_SCHEMA).

A repeated runId with the same message replays the recorded result without running the handler again, for seven days; after that the runId runs again. resultTtlSeconds (a number literal, 60 to 604800) shortens that for one job: a result older than that is gone (with its run marker) the next time its runId is called, and expired results are deleted whenever a result is recorded or the object's alarm runs. Use it for read-only pulls, such as an export that reads pages of the tenant's data, whose results should not sit in the tenant's SQLite for a week. The 60-second floor keeps callTenantJob's own resend after an object reset (same runId) a replay rather than a second run. Anything else (a non-literal, out of range, or without result: true) fails the build (TENANCY_JOB_RESULT_TTL). The result is bound to a hash of the canonical message (sorted keys): the same runId with any other field is failed / TENANT_JOB_RUN_CONFLICT, never the earlier caller's result. Calls have their own run-id space (call: on the object; runJob and deliverTenantJob refuse run ids with that prefix), so a call never replays a queue, alarm or outbox run. Concurrent calls with one runId and one message share one execution. Build the runId on the server (a fresh id, or one from your own idempotency record), never from request input. The call is retried once after an object reset or a retryable RPC error, and drains the object's outbox after an ok.

Authorization. A result job runs with system rights in the tenant's object: no caller, no firewall, no access rules. The edge code that calls it is the only authorization gate, so check there that this caller may ask this question. The build requires the tenant argument to be visibly server-verified (TENANCY_JOB_CALL_TENANT_SOURCE): ctx.activeOrgId / ctx.tenantId, a resolveTenant(...) or resolvePrincipalTenant(...) result (directly or through a const), or a forEachTenant callback's tenant. If it is verified another way, such as a signed webhook naming the organization, put // quickback-allow-tenant-source: <reason> on the line above the call.

The object refuses, before the job runs, a message that is not a result job, a message for another tenant, a control object, an object of the wrong placement (an organization result job in a partition object, or a partition result job anywhere but its partition), or a missing runId (TENANT_JOB_INVALID). It sets tenantId from the object's name. The edge helper throws on the same caller bugs. Pass only a server-verified organization id: a session's organization, or one resolved through tenancy.lookups.

A result job is only ever called. A { type: '<result job>' } message literal anywhere but callTenantJob's message argument fails the build (TENANCY_JOB_RESULT_PRODUCER), and at runtime runJob, schedule, send, deliverTenantJob and scheduleTenantJob refuse it (TENANT_JOB_CALL_ONLY). One that reaches a queue anyway is retried into the dead-letter queue. An outbox entry or a scheduled alarm for a job that has since become a result job is dropped as a dead letter (logged), so it never blocks the outbox or the alarm. resultSchema is required with result: true, result must be the literal true, and the handler must be a tenant job (TENANCY_JOB_RESULT_SCHEMA). Result jobs need isolation: 'durable-object'.

Partition jobs

A tenant job normally runs in the organization object. A job that works on a partition's rows — a conversation's messages, a document's blocks — runs in that partition's own object instead, so it never routes through the organization's database. Declare the placement:

quickback/services/queues/conversationSummary.ts
import { defineQueue } from "@quickback/compiler";
import { messages } from "../../features/messages/schema";

export default defineQueue<{ type: "conversation.summary"; tenantId: string; partitionKey: string }>({
  name: "conversationSummary",
  messageType: "conversation.summary",
  placement: { partition: "conversation" },
  execute: async ({ db, tenant }) => {
    const rows = await db.select().from(messages); // this conversation's rows only
    // tenant.partitionKey === the conversation id; tenant.tenantId === the organization
    return { success: true };
  },
});

placement: 'tenant' is the organization object (the same as tenant: true); placement: { partition: '<kind>' } names the project's partition kind. A partition job imports only that kind's features (plus tableless helpers) and may be a result job too. The build refuses:

CodeWhen
TENANCY_JOB_PLACEMENTplacement is not 'tenant' or a literal { partition: '<kind>' }, names a kind the project does not declare, or is combined with tenant: true.
TENANCY_QUEUE_PARTITIONA handler imports a partitioned feature without being placed in that partition.
TENANCY_QUEUE_MIXED_PLACEMENT / TENANCY_CROSS_PARTITIONA partition job imports, or names, an organization or platform table.
TENANCY_QUEUE_PARTITION_KEYA { type: '<partition job>' } message literal has no partitionKey and is not passed to a target helper or tenant.send({ key }, …) / tenant.schedule(…) inside the partition.
TENANCY_SCHEDULEA partition job declares schedule: — tenant schedules run in organization objects only. Schedule its occurrences explicitly (below).

Targets. Every partition delivery names its exact object. The edge helpers take a TenantJobTarget:

type TenantJobTarget =
  | { kind: "organization"; organizationId: string }
  | { kind: "partition"; organizationId: string; partition: string; key: string };
HelperDoes
deliverJob(env, target, message, runId, { generation? })Runs the job now in the target object (queue semantics).
callJob(env, target, message, runId, options?)callTenantJob for a target: a partition result job runs in its partition and replays only there.
scheduleJob(env, target, key, at, message) / cancelJob(env, target, key)An occurrence in the target object's own alarm table.
enqueueTenantJob(env, binding, target, message)Sends the generated queue envelope; the edge consumer delivers it to the target.

callTenantJob, deliverTenantJob, scheduleTenantJob and cancelTenantJob stay as the organization-object spellings (they refuse a <orgId>:<key> name). Inside a tenant action or job, tenant.send({ key }, message) and tenant.schedule(key, at, message) (in a partition object) target partitions the same way. Every helper stamps tenantId and partitionKey from the target and drops any the message carries. A producer that builds its own queue message must set both: { type, tenantId, partitionKey, … }.

Authority. A partition job runs with system rights in its partition. organizationId must be server-verified exactly like callTenantJob's tenant (TENANCY_JOB_CALL_TENANT_SOURCE checks the target literal's organizationId). The key only routes within that organization, so a key from the request is not authority: check that the caller may act on that partition before calling. A partition target must already be registered to that organization in tenant_registry (its first request registers it). A job never creates a partition object: an unknown one is TENANT_NOT_PROVISIONED, a purged one TENANT_PURGED, one mid-restore TENANT_RESTORE_PENDING. A workflow calls a result job through step.job(name, target, message). That target's organization must be the run's own, and the step passes the actor authority check first.

Identity and dedupe. A job's identity is the deployment (namespace and jurisdiction), organization, partition kind, key, job type and runId. The same runId in another partition, or in another organization's partition with the same key, is a different job: each object keeps its own run markers, results and alarms. A result job's runId with a different message in the same object is TENANT_JOB_RUN_CONFLICT.

Checks in the object. Before a handler runs, the destination refuses (TENANT_JOB_PLACEMENT, dead-lettered from the outbox and alarms) a partition job outside a partition object, an organization job inside one, and a message whose partitionKey differs from the object's own name. An organization message that names a partition is refused too. Partition jobs need RPC version 16 at both ends. An older edge or tenant refuses them (TENANT_RPC_VERSION_MISMATCH), so nothing routes them to the organization object. Deploy the tenant Worker first, as for every version bump.

Restore generations. Queued work is fenced by the object's restore generation (tenant_registry.outbox_generation, advanced by every restore). enqueueTenantJob stamps the target's generation on the envelope (tenantGeneration). The consumer delivers it with that expected generation, and the object refuses any other (TENANT_JOB_STALE_GENERATION). The consumer then acks and logs it: work queued for a timeline that a restore replaced never runs against the restored data. deliverJob to a partition without an envelope generation passes the registry's current generation. A restore that has committed but not yet reconciled in the object is refused and retried. Cross-object outbox deliveries keep the source-generation fence (a restored source's old entries are never delivered). The destination stamps tenantId and partitionKey from the target name.

Scheduling and cancellation. Each object multiplexes its own scheduled rows onto its single native alarm. The same key in two partitions is two occurrences, and cancelJob on one never touches the other. Cancellation removes an occurrence that has not started. A handler already running finishes, and its runId stays the idempotency key for any side effect it made. Delivery is at least once in every lane. A restore rewinds a partition's alarm rows with its data, as for an organization.

import { deliverJob, scheduleJob } from "../../../lib/tenants";

const target = { kind: "partition", organizationId: ctx.activeOrgId!, partition: "conversation", key: input.conversationId } as const;
// The caller's access to this conversation was checked above.
await deliverJob(env, target, { type: "conversation.summary" }, "summary:" + crypto.randomUUID());
await scheduleJob(env, target, "summary", Date.now() + 60_000, { type: "conversation.summary" });

Plans that route other background work to partitions (workflows, managed files, embeddings) use this same TenantJobTarget and its checks: exact target, registered destination, placement, partition key and restore generation.

Realtime broadcasts from tenant tables (realtime: { enabled: true }) are recorded in the object's outbox with the write and replayed by the edge through the Broadcaster as the response returns (outbox delivery). createRealtime in tenant code has the edge's shape, defineRealtime namespaces included: realtime.<namespace>.<event>(…) is queued as the same broadcast('<namespace>:<event>', …) the edge sends.

On this page