What replacing a homegrown job queue with Temporal involves
A team running a custom queue or a Sidekiq-style worker pool usually reaches the point where retries are hand-rolled, failed jobs are hard to find, and nobody can say where a multi-step job stopped. Most single-step jobs map cleanly to Standalone Activities, multi-step jobs need Workflows, and the total effort depends on how many job types the queue carries and how many of them cause side effects such as payments, emails or writes to other systems. A queue with a dozen simple jobs and no external side effects is a much smaller project than one with dozens of handlers that call third-party APIs and chain results together.
The work has four parts. The first is planning: inventorying job types, identifying which ones are idempotent, and deciding which become Standalone Activities and which become Workflows. The second is code changes to job handlers, which means moving the job function into an Activity Definition, making its side effects safe to retry, and replacing enqueue calls with starts. The third is worker deployment, either on a self-hosted Temporal Service or on Temporal Cloud, with decisions about hosting, identity, storage and network exposure. The fourth is a parallel run, where old and new paths process traffic side by side until the old queue is drained. Confirm early whether your team will deploy and operate the Temporal Service itself or buy it as a managed service, because that choice changes the deployment and operations scope more than any single handler does.
Use the drivers table below to size your own queue. Ask any partner for a written scope that lists each job type, its side effects, its owner and its cutover window, since those items determine the quote far more than the number of lines of code. Effort claims on this page are qualitative because every queue differs in how much business logic lives in its handlers.
Which queue concepts map to Temporal and which do not
This table maps the parts of a homegrown job queue to Temporal's Standalone Activity model and flags the concepts that need confirmation or a Workflow instead. Read the first four rows as direct mappings, then check the remaining rows against how your current queue actually behaves before you assume any equivalence.
| Queue concept | Temporal equivalent | What to confirm before cutover |
|---|---|---|
| Job function | Activity Definition, the code that performs the work | Confirm which handler code depends on process-local state, shared singletons or in-memory caches that a worker restart would discard. |
| One enqueued job | Standalone Activity Execution, addressable by Activity ID | Confirm how your queue assigns job IDs today so you can reuse them as Activity IDs and look up a job later. |
| Queue | Task Queue, the named list that workers poll | Confirm whether one of your queues carries several job types that should be split across separate Task Queues. |
| Worker process | Activity Worker, registered to poll one or more Task Queues | Confirm which hosts run each pool today, since Temporal workers need outbound connectivity to the Temporal Service. |
| Retries and backoff | Retry Policy set per Standalone Activity, with attempt limits and backoff settings | Confirm your current retry count, backoff curve, and which error types skip retries, then match them in the policy. |
| Scheduled or delayed jobs | Not a direct equivalent for a bare Standalone Activity, so confirm the scheduling mechanism you need | Confirm whether delays are fixed offsets, cron-style recurrence or run-at times, since these may call for a Schedule or a Workflow. |
| Uniqueness and deduplication | Activity ID identifies an execution, so duplicate starts with the same ID need explicit handling | Confirm how your queue rejects duplicates today and test how Temporal reports a start with an ID that already exists. |
| Job chains and dependent steps | Workflow is the better fit, since Temporal advises a Workflow when several dependent steps must be orchestrated | List every job that starts another job, then decide which chains move into a Workflow with Activities. |
| Custom queue priorities | Not a direct equivalent for a single priority field, so confirm the Temporal feature you would use | Confirm how your priorities are ordered and whether separate Task Queues or Temporal's priority settings would reproduce them. |
When a job becomes a Standalone Activity and when it needs a Workflow
A job that does one unit of work, has no dependency on other steps, and can be retried on its own is the natural fit for a Standalone Activity. In Temporal terms, your job function becomes an Activity Definition, each enqueued job becomes a Standalone Activity Execution addressable by its Activity ID, and the queue it sits in maps to a Task Queue served by Activity Workers. Most jobs in a typical homegrown queue look like this: send one email, resize one image, call one partner API, generate one report. Your team keeps most of the job handler code and replaces the enqueue and dequeue plumbing.
- Idempotent handlers: The handler can run more than once without corrupting data, because Temporal retries failed attempts.
- Stable Activity IDs: Choose IDs from business keys, such as an invoice number, so you can look up or deduplicate executions.
- Clear retry rules: Map existing retry counts and backoff to a Retry Policy and decide which errors are non-retryable.
- Bounded runtime: Set timeouts so a stuck handler does not hold a worker slot indefinitely.
Before you migrate, list each job type and confirm it has no step that depends on a previous job's output.
Temporal says to use a Workflow instead of Standalone Activities when several dependent steps must be orchestrated. Many homegrown job queues hide this orchestration in chained jobs, where job A enqueues job B on success and job C on failure. That chain is state held in a database table or in queue metadata. A Workflow moves that logic into code that Temporal persists and replays, so the sequence, branches and waits survive worker restarts. Use this test: if a job cannot be understood without reading the jobs it triggers, it belongs in a Workflow.
- Dependent steps: Each step consumes the output of an earlier step, such as payment authorization before fulfillment.
- Compensation steps: A failed step must undo earlier work, such as refunding a charge or releasing a reservation. Model these as Activities called from the Workflow's failure path.
- Fan-out: One trigger starts many parallel units of work whose results are gathered, such as per-account reconciliation. Coordinate them in a Workflow rather than with unlinked jobs.
- Human input: The process pauses until a person approves or responds. Use a Workflow with a signal or timer, not a worker that sleeps.
- Long-running state: The process spans hours, days or longer and must remember where it stopped.
Sketch the chain of jobs on a whiteboard and confirm which steps must run in order before writing any Workflow code.
Most migrations stall because teams cannot tell from the code which jobs chain together. Start with an inventory that records, for each job type, what enqueues it, what it enqueues, where its state is stored and who is waiting on its result. A job enqueued only by a cron scheduler and with no downstream effects is usually a Standalone Activity candidate, while a job whose completion triggers another job is a Workflow candidate. Pay attention to hidden coupling in shared tables, status columns that other jobs poll, and retry logic that re-enqueues a different job.
- Trace enqueue calls: Search for every place a job is queued from inside another job handler.
- Find shared state: Note tables or cache keys that several job types read or update.
- Check polling: A job that waits for another job's status column is a sign of an unmodeled dependency.
- Review retries: Retry paths that enqueue different work usually represent a compensation step.
- Record callers: Capture which services or users depend on the result and how long they wait.
Review the inventory with the owners of each job type, because the code often does not show business intent such as approval rules or deadlines.
Once each job type is classified, record the decision so that application owners, security reviewers and the operations team can see why a job became a Standalone Activity or a Workflow. A short decision record per job type is enough. It should state the job shape, the reason, the Task Queue it will use, the expected retry behavior and the owner. Ambiguous cases, such as a single job that later gained a second step, should be flagged for review rather than silently placed. Revisit classifications when a job's requirements change, since adding a step to a Standalone Activity often means moving it into a Workflow.
- Decision record: Capture the job shape, reason, owner and chosen design for each type.
- Task Queue assignment: Group job types that share worker code, scaling needs or security boundaries.
- Retry and timeout notes: Document the policy and the reason for non-retryable errors.
- Change triggers: Name the conditions that would require moving a job to a Workflow later.
- Review sign-off: Have the owning team and the platform team confirm the classification.
Check that every job type in the inventory has a recorded decision before any worker is switched over.
How old and new workers share traffic during cutover
The cutover starts at each enqueue point in the application, where a router decides by job type whether a job goes to the homegrown queue or to a Temporal Task Queue. Both paths run side by side while each job type is switched in turn. Before the old pool is retired, check that the homegrown queue has drained and that no job type still sends new work to it. Confirm the routing rule in one place so every producer follows the same switch.
Per job type routing from enqueue points through a parallel run to decommissioning.
How to sequence the move from queue to Temporal
The sequence takes a homegrown queue from inventory to full retirement by classifying each job type, standing up a secured Temporal Service, proving the pattern on one low-risk job, and cutting over one job type at a time with a parallel run in between.
Inventory every job type and its side effects
Engineers who own the queue list every job type, its handler, its callers, its retry and timeout settings, and every side effect it causes, such as database writes, payments, emails, file writes and calls to third-party APIs. Add the queue names, worker pools, cron-triggered jobs and any jobs that enqueue other jobs. Done when every job type has a row in one inventory that a platform owner and a business owner have both reviewed, and no handler is left unlisted.
Classify each job as an activity or a workflow
For each row, decide whether the job is a single unit of work that Temporal can run as a Standalone Activity, or a sequence of dependent steps that needs a Workflow. Temporal documents Standalone Activities as the equivalent of an enqueued job, and recommends a Workflow when several dependent steps must be orchestrated. Mark jobs that call non-idempotent external systems, since those need a idempotency key or deduplication design before migration. Done when each job has one classification, a named owner and a list of the external systems it touches.
Map queues to Task Queues and workers
Translate each existing queue or worker pool into a Task Queue and a set of Activity Workers, and record which Activity Definitions run on each. Decide whether pools with different resource needs or security zones should stay separate. Done when a mapping document lists every old queue, its replacement Task Queue, the worker deployment that serves it, and the team that deploys it.
Stand up the Temporal Service securely
Choose between a self-hosted Temporal Service and Temporal Cloud, based on who must operate the persistence, visibility and upgrades. For self-hosted, deploy with a supported method, select a persistence store from the documented list, and configure the security baseline in the self-hosted security docs: an Authorizer instead of the default noopAuthorizer, mTLS for internode and frontend traffic, a ClaimMapper for roles, and OIDC for the Web UI. Keep services off the public internet. Upgrade one minor version at a time. Done when a non-production namespace accepts authenticated calls from a test worker, and a security reviewer has signed off the configuration.
Pilot one low-risk job type
Choose a job type with few side effects, a clear owner and easy rollback, and implement it as a Standalone Activity with a Retry Policy that matches the old retry behavior. Run it in a non-production namespace, then in production with a small share of volume if the platform allows it. Confirm that the job is visible in the Web UI, that failures surface the way operators expect, and that alerts fire. Done when the pilot runs for a defined review period with a written record of the failures, retries and any operator actions taken.
Run old and new in parallel with idempotency checks
For each remaining job type, run the old handler and the Temporal activity side by side against the same input, with the Temporal path writing to a shadow target or a comparison log wherever the side effect is external or irreversible. Compare outcomes, duplicate-effect counts and timing. Confirm that retries from either path cannot double-apply a payment, message or record. Done when the comparison report shows matching results for each job type and the owners have signed off on the idempotency design.
Cut over one job type at a time
Move each job type to Temporal in its own change, switching producers to start the Standalone Activity or Workflow and disabling the old enqueue path for that type only. Keep the old worker able to drain in-flight jobs and keep a documented rollback path until the queue for that type is empty. Done when each job type has a cutover record showing the switch date, the drained queue confirmation and the owner who accepted it.
Decommission the old queue
After every job type has run on Temporal without the old path for a review period, stop the old workers, remove the enqueue code, delete the retained queue data according to your retention policy, and remove the queue infrastructure from monitoring and backup. Keep the inventory and cutover records as evidence of the change. Done when no producer or worker references the old queue, the infrastructure is removed, and the decommissioning record is filed with the platform owner.
What drives the cost and duration of the move
This table lists the factors that change how much work the move takes and what the bill looks like, with the input to gather for each. Read it as a checklist to fill in before asking for a fixed-scope quote. The main takeaway is that the job count, chaining and in-flight volume at cutover matter more than the queue software itself.
| Driver | Why it changes cost or effort | What to gather or ask for |
|---|---|---|
| Number of job types | Each job type becomes an Activity Definition or part of a Workflow, with its own inputs, retries and tests | Inventory of every enqueued job class, with owner and call sites |
| Side effects per job | Jobs that call payment, email or third-party APIs need idempotency keys and compensation logic before they can move safely | List of external calls each handler makes and whether they can be repeated |
| Chained or dependent jobs | Chains that enqueue the next job are better modeled as Workflows, which adds design and replay-safety work | Map of which jobs enqueue other jobs and the order they must run in |
| In-flight jobs at cutover | Queued and running jobs must drain or be moved, which sets the length of the parallel run period | Typical and peak queue depth, plus how long the longest job runs |
| Existing handler idempotency | Handlers that are not idempotent need changes before Temporal retries can be trusted | Retry settings in use today and any known duplicate-processing incidents |
| Number of worker pools and queues | Each pool and queue maps to a Task Queue and deployment, with its own scaling and alerting | Count of worker deployments, their scaling rules and queue names |
| Persistence and visibility stack | Self-hosted Temporal needs a supported database and a visibility store, plus operating and backing them up | Existing database platform, team skills and backup standards |
| Self-hosted or Temporal Cloud | Self-hosted adds infrastructure, upgrades, security configuration and on-call work; Temporal Cloud bills by actions and support tier | Expected action volume, support tier needed and data residency rules. Temporal Cloud pay-as-you-go starts at 50 US dollars per million actions (Temporal pricing page). Support tiers start at Business, 500 US dollars per month (Temporal pricing page). DeployOpen does not publish prices; a quote follows from the written scope. |
What usually goes wrong when a homegrown queue moves to Temporal
Most failed queue migrations trace back to a few predictable gaps: handlers that were never written for replay, jobs that run on both systems during cutover, and deployment defaults that were acceptable on an internal queue but not on a shared Temporal Service. Each risk below names the check that prevents it.
Non-idempotent handlers replayed on retry
A Sidekiq-style handler often assumes it runs once, so a charge, email or ledger write executed before a crash is repeated when Temporal retries the Activity. Review every job handler for side effects and give each external call an idempotency key derived from the job's business identity. Test a forced retry in a non-production namespace before any handler moves.
Jobs in flight during cutover
When the old queue and Temporal both accept work, a job already picked up by a legacy worker can also be scheduled in Temporal, so it runs twice. Decide per job type which system owns it from a fixed cutover point, drain the old workers, and confirm that no job type is enabled on both sides at once. Keep a record of job IDs processed by each system to reconcile overlaps.
Activity IDs used as deduplication keys
Teams sometimes reuse the old queue's job key as the Activity ID, expecting Temporal to reject duplicates. Activity IDs identify a Standalone Activity Execution for lookup and do not replace your own uniqueness rules, so a second enqueue with the same ID can fail or create a separate execution depending on the setting used. Store your deduplication key in your own table, and confirm the ID reuse behavior in the Standalone Activities documentation before relying on it.
Standalone Activities docsOpen API access on self-hosted servers
If no Authorizer is configured, self-hosted Temporal uses the default noopAuthorizer, which allows every API request with no authentication or access control. A queue that was reachable only from inside an application network can become reachable to any host that can reach the frontend. Configure an Authorizer, mTLS and a ClaimMapper before workers connect, and keep the services on hosts not reachable from the public internet.
Self-hosted security docsVisibility store undersized for job volume
A homegrown queue often keeps job history in one relational table that is pruned on a schedule. Temporal records every execution in its visibility store, and the documentation recommends Elasticsearch or OpenSearch beyond a few workflow executions. Estimate daily job counts and retention before choosing the store, and load test the visibility query patterns your support team uses to look up jobs.
Visibility docsWorker shutdown tested too late
Queue workers that exit mid-job lose work silently, while Temporal workers that stop abruptly leave Activities to time out and retry. Verify how your workers handle SIGTERM during a long Activity, how long they wait before forcing shutdown, and whether deployments in Kubernetes give them enough termination time. Run deployment rollouts under load in staging and check that no Activity is lost or duplicated.
Questions teams ask before replacing a job queue with Temporal
How much does replacing a homegrown job queue with Temporal cost?
No single figure applies, because the cost follows from the job inventory, the number of handlers to convert and the environments you must build. The main components are your engineering time to convert and test handlers, the platform work to run Temporal Server, and any partner fees under a fixed-scope agreement. Recurring costs depend on whether you self-host or use Temporal Cloud. For Temporal Cloud, the published pay-as-you-go rate starts at 50 US dollars per million actions, plus storage charges, and that is a useful input for estimating run costs. Ask any vendor or partner for a quote built from your written job inventory, and confirm which costs recur.
How long does a job queue to Temporal migration take?
Duration depends mainly on how many job types you have, how many of them need orchestration rather than a single retried call, and how much test coverage the existing handlers already have. Teams usually lose time on handlers with unclear owners, undocumented retry behavior and jobs that touch several systems. Start by sorting jobs into simple Standalone Activities and multi-step Workflows, then convert one queue at a time. Ask for a timeline tied to that inventory and to the number of environments you need for testing before production.
What must our team provide before a migration starts?
Three inputs decide whether the work can be scoped accurately: a complete job inventory, a named owner for each handler, and test environments that resemble production. The inventory should list each job type, its trigger, its retry and timeout settings, its idempotency assumptions and the systems it writes to. Handler owners must confirm behavior and sign off on conversion. Test environments need a running Temporal Service, workers connected to realistic dependencies and a way to replay representative traffic. Missing any of these usually moves effort into discovery during the build.
Can our internal team replace the queue without outside help?
Yes, many teams can, particularly when the job count is modest and at least one engineer has used Temporal before. The harder parts are operating the Temporal Service, designing workflows that stay deterministic under change and planning worker deployment. Before deciding, compare the skills in your team against the work listed in the job inventory. A fixed-scope partner engagement can cover the parts your team lacks, with scope, deliverables and timelines agreed in writing before work starts. Ask any partner to show how knowledge transfers to your engineers.
Should we run Temporal Cloud or self-host it?
The choice turns on where your data may live, who will operate the service and what support you need. Self-hosting keeps the Temporal Server in infrastructure you control. Temporal's self-hosted documentation says services should run on hosts not reachable from the public internet, and the default noopAuthorizer allows every API request until you configure authorization, so plan that work up front. Temporal Cloud shifts operation to the vendor and offers a 99.9% SLA, or 99.99% with high availability, plus SAML SSO. Confirm with Temporal whether those terms and the data location meet your regulatory requirements before deciding.
How does the old queue keep running during cutover?
Most teams run both systems in parallel for a period, moving one job type or queue at a time. New job types start on Temporal while existing ones continue on the old queue, and each converted handler is verified against its previous output before the old path is removed. Standalone Activities are addressable by Activity ID, which helps when you need to track or cancel a specific job during the transition. Keep the old worker pool running until no jobs remain in its queues, and define in advance who approves each cutover step and how you roll back.
When should a job become a Workflow instead of a Standalone Activity?
Use a Workflow when several dependent steps must be orchestrated together. Temporal's guidance on Standalone Activities says to choose a Workflow when that orchestration is needed, while a single independent job maps cleanly to a Standalone Activity Execution. Jobs that wait on external events, call several services in sequence or must compensate on failure usually belong in Workflows. Review each job type in your inventory with the handler owner, and confirm the design against the Standalone Activities documentation before converting it.
What DeployOpen needs from your team to scope the move
The scope starts with a job catalog: one row for every job type your current queue or worker pool runs. For each row, list the handler code path, the queue or pool it runs on, the trigger (API call, cron, event or another job), the average and peak daily volume, and whether the job calls out to payments, email, a ledger or another system that cannot safely run twice. Those answers decide which jobs can become Standalone Activities and which need a Workflow, and they show where idempotency keys will have to be added before any code moves. Pull the failure history for the last several months as well, including dead-letter counts, the causes recorded for each failure and any jobs that were retried by hand.
Next, document your current retry rules per job type: maximum attempts, backoff curve, timeout values, which exceptions trigger a retry and which go straight to a failure state. Temporal uses Retry Policies, so these rules must be translated deliberately, not copied from a generic default. Also send your environment and security requirements: where the workers and any Temporal Service must run, whether a self-hosted deployment or Temporal Cloud is the target, which identity provider and roles your operators use, how secrets reach the workers today, and which data classes flow through job payloads. Confirm these with your security and compliance leads before the scoping call, since they determine network exposure, access control and payload encryption choices.
Once the inputs are reviewed, DeployOpen issues a written scope that lists the deliverables, the cutover approach, the acceptance criteria and the parts your team owns, such as application changes and business sign-off. Engagements are fixed-scope, so the deliverables and timelines are agreed in writing before any work starts, and a quote follows from that written scope. Ask for the quote to show the cost of each deliverable separately, along with any recurring items such as hosting, support or retainers, so you can compare it with the internal effort your team would spend.
How DeployOpen scopes, delivers and supports a Temporal queue migration
DeployOpen approaches replacing a homegrown job queue with Temporal as a written, fixed-scope engagement. We map each existing job type to a Standalone Activity or a Workflow, then build, test and hand over the Temporal side alongside the queue it replaces, inside infrastructure you control.
How we scope
- We inventory every job type, its retry behavior, its callers and its failure handling in your current queue.
- We decide which jobs become Standalone Activities and which need Workflows, and record the reasons in writing.
- We agree the Task Queue mapping, cutover approach and deliverables in a written scope before work starts.
How we build
- We implement Activity Definitions and Standalone Activity starters in your language and service structure.
- We map existing retry settings to Retry Policies and test duplicate and timeout behavior against your current jobs.
- We run old and new queues in parallel on a non-production copy, then verify results before moving production traffic.
How we hand over
- We document the job inventory, Task Queue layout, Activity IDs convention and runbooks for your operators.
- We walk your engineers through the Temporal Web UI so they can find, retry and investigate executions.
- We confirm the deployment, access settings and retirement steps for the old queue in a written handover.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer after handover.
- A retainer can cover Temporal Server upgrades, one minor version at a time, as your release notes call for.
- Support scope, response expectations and review cadence are agreed in writing with the retainer.

