Reference
Configuration
Queue profiles and WorkerSettings / TASKQ_* knobs.
Queue profiles
Rich defaults live on taskq.queues and are stamped onto each job at enqueue:
max_attempts, lease seconds, retry backoff- default priority
- retention windows
- optional depth limit
Changing a queue profile affects future enqueues only.
WorkerSettings (TASKQ_*)
| Knob | Default | Notes |
|---|---|---|
dsn or http_base_url | — | Exactly one transport |
registry | required | module:attr exporting TaskRegistry |
queues | required | One or more queue names |
environment | required | Must match expected_environment when set |
worker_id | auto | Optional; CLI generates a default |
concurrency | 1 | Max in-flight handlers |
batch | 1 | Claim batch size (≤ concurrency) |
poll_interval | 5 | Seconds |
listen | true | DSN only; HTTP workers must disable |
presence_interval | 60 | Seconds |
soft_stop_timeout | none | Wait forever if unset |
allow_production | false | Required when environment=production |
http_bearer_token / header pair | — | Exactly one credential source for HTTP |
http_claim_wait_seconds | 25 | Long-poll; multi-queue HTTP requires 0 |
pool_size | concurrency+2 | DSN workers only |
CLI flags mirror these fields (taskq worker --help).