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.
Click to show internal directories.
Click to hide internal directories.