Replacing a homegrown job queue with Temporal

Retiring a custom job queue or Sidekiq-style worker pool for Temporal takes a per-job decision, a queue-to-Task-Queue mapping and a parallel run. This page explains how to plan each part.

On this page

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 conceptTemporal equivalentWhat to confirm before cutover
Job functionActivity Definition, the code that performs the workConfirm which handler code depends on process-local state, shared singletons or in-memory caches that a worker restart would discard.
One enqueued jobStandalone Activity Execution, addressable by Activity IDConfirm how your queue assigns job IDs today so you can reuse them as Activity IDs and look up a job later.
QueueTask Queue, the named list that workers pollConfirm whether one of your queues carries several job types that should be split across separate Task Queues.
Worker processActivity Worker, registered to poll one or more Task QueuesConfirm which hosts run each pool today, since Temporal workers need outbound connectivity to the Temporal Service.
Retries and backoffRetry Policy set per Standalone Activity, with attempt limits and backoff settingsConfirm your current retry count, backoff curve, and which error types skip retries, then match them in the policy.
Scheduled or delayed jobsNot a direct equivalent for a bare Standalone Activity, so confirm the scheduling mechanism you needConfirm whether delays are fixed offsets, cron-style recurrence or run-at times, since these may call for a Schedule or a Workflow.
Uniqueness and deduplicationActivity ID identifies an execution, so duplicate starts with the same ID need explicit handlingConfirm how your queue rejects duplicates today and test how Temporal reports a start with an ID that already exists.
Job chains and dependent stepsWorkflow is the better fit, since Temporal advises a Workflow when several dependent steps must be orchestratedList every job that starts another job, then decide which chains move into a Workflow with Activities.
Custom queue prioritiesNot a direct equivalent for a single priority field, so confirm the Temporal feature you would useConfirm 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.

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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.

DriverWhy it changes cost or effortWhat to gather or ask for
Number of job typesEach job type becomes an Activity Definition or part of a Workflow, with its own inputs, retries and testsInventory of every enqueued job class, with owner and call sites
Side effects per jobJobs that call payment, email or third-party APIs need idempotency keys and compensation logic before they can move safelyList of external calls each handler makes and whether they can be repeated
Chained or dependent jobsChains that enqueue the next job are better modeled as Workflows, which adds design and replay-safety workMap of which jobs enqueue other jobs and the order they must run in
In-flight jobs at cutoverQueued and running jobs must drain or be moved, which sets the length of the parallel run periodTypical and peak queue depth, plus how long the longest job runs
Existing handler idempotencyHandlers that are not idempotent need changes before Temporal retries can be trustedRetry settings in use today and any known duplicate-processing incidents
Number of worker pools and queuesEach pool and queue maps to a Task Queue and deployment, with its own scaling and alertingCount of worker deployments, their scaling rules and queue names
Persistence and visibility stackSelf-hosted Temporal needs a supported database and a visibility store, plus operating and backing them upExisting database platform, team skills and backup standards
Self-hosted or Temporal CloudSelf-hosted adds infrastructure, upgrades, security configuration and on-call work; Temporal Cloud bills by actions and support tierExpected 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 docs

Open 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 docs

Visibility 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 docs

Worker 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.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.