workqueue-worker

command
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

worker is one of the workqueue example. Each worker processes tasks one at a time with fair dispatch (prefetch=1). Multiple workers can run concurrently.

Usage:

  # Terminal 1 - start worker 1:

	go run ./examples/workqueue-worker --config=examples/config/local.toml

  # Terminal 2 - start worker 2:

	go run ./examples/workqueue-worker --config=examples/config/local.toml

  # Terminal 3 - publish tasks:

	go run ./examples/workqueue-publisher --config=examples/config/local.toml

If a worker dies mid-task, the message is redelivered to another worker.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL