JOB 04Reference

Glossary

The terms these docs use, in alphabetical order. Each term links to the page that explains it in full.

TermMeaning
AcknowledgeTo tell the storage that a job is done, so the storage forgets it or keeps a record. Only shared storage acknowledges jobs. A failed job is rejected instead, which also ends it.
BatchSeveral jobs that a pool goroutine takes together and runs one after another. A priority queue is not batched.
CancelTo stop one job. A waiting job never runs. A running job’s Context() ends, and the function must watch it.
Concurrency (limit)The most jobs a worker runs at the same time. It is an upper bound, not a pool size.
Distributed queueA queue in shared storage that workers in several processes share. Each job goes to one of them. redisq queues are distributed.
Event loopThe one goroutine in each worker that decides what runs next. It hands waiting jobs to free pool goroutines.
Goroutine (pool member)A goroutine in the worker’s pool that runs your function. The pool starts more while jobs wait, up to the concurrency limit.
JobOne unit of work: your data, an optional ID, and a status that changes as the worker runs it. Add creates it.
Job IDAn optional string that names a job. An in-memory queue refuses a second Add with an ID that a job still in the queue holds.
OutcomeHow a job ended: completed, failed or cancelled. Shared storage reports it to the job’s handle in any process.
Parked jobA job from a batch that did not start before a pause or stop. It stays Queued and runs first after Resume or Restart.
Persistent queueA queue in shared storage that keeps jobs across a restart of the process.
Priority queueA queue that gives out waiting jobs in priority order. A lower number runs first.
Queue IDThe name of a queue in the REST API’s /queues routes. Every process that binds a shared queue sees the same ID.
Queue pauseA pause of one queue, not of a worker. No worker takes its jobs until Resume. On shared storage it holds for every process.
RankThe number you set on a source with WithQueuePriority or WithTopicPriority. A lower rank goes first.
Shared storageStorage outside the process, behind a storage adapter such as redisq or sqliteq. Jobs in it survive a restart.
SourceAnything bound to a worker that gives it jobs: a queue, a priority queue or a topic subscription.
Storage adapterA type that implements some of VarMQ’s queue interfaces, such as redisq or sqliteq. It keeps jobs across restarts or shares a queue between processes.
StrategyThe rule a worker with several sources uses to pick which source gives the next job.
SubscriptionThe link between a topic and one worker, made with WithTopic. Each subscription gets its own job for every payload.
TaskOne step of a workflow. It is a job on a queue, and it can wait for other tasks to end first.
TopicAn in-memory object that gives each published payload to every subscribed worker. A queue gives each job to one worker.
UndoA job that reverses a task that completed. A failed or cancelled workflow runs the undos of its completed tasks.
Visibility timeout (redisq)How long a taken job can stay unacknowledged in redisq, five minutes by default. After that, the next sweep puts the job back in the queue.
WorkerThe pool that owns your function and the concurrency limit. It runs the jobs from the sources bound to it.
WorkflowA set of tasks with dependencies between them. VarMQ runs each task when the tasks it waits for have ended.
Edit page

Last updated: