Open-Source Wikis

/

Temporal

/

Primitives

/

History task

temporalio/temporal

History task

A history task is an item in one of the History service's internal per-shard queues. They are how the engine schedules deferred and outbound work; together with the events and mutable state, they are the third pillar of every workflow's persistent state.

Queue families

Queue Purpose Source
Transfer Push a Workflow / Activity task to Matching, update visibility, kick off child workflows. Immediate. service/history/transfer_queue_active_task_executor.go
Timer Fire deferred work — workflow sleeps, schedule-to-start timeouts, retry backoffs. service/history/timer_queue_active_task_executor.go
Visibility Update the visibility store on workflow status changes. service/history/visibility_queue_task_executor.go
Outbound Deliver Nexus operations, callbacks, and other external HTTP/gRPC requests. service/history/outbound_queue_active_task_executor.go
Archival Push completed history into the configured archive backend. service/history/archival_queue_task_executor.go
Replication Push events to peer clusters in a multi-cluster setup. service/history/replication/

Each family has both an active and a standby executor. The active runs in the cluster that owns the namespace; the standby runs in passive replicas and verifies replicated state without advancing the workflow.

Persistence

Tasks are written into per-shard task tables in the same DB transaction as the corresponding mutable state and history events — this is the transactional outbox pattern that keeps the engine and Matching consistent. Schema: each backend's transfer_tasks, timer_tasks, visibility_tasks, etc., tables.

Code references

Where to read more

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

History task – Temporal wiki | Factory