Installation
VarMQ needs Go 1.27 or newer. Add it to your module with go get, then import it. Pick the variant you need:
Three install variants as tabs: VarMQ alone, VarMQ with the Redis adapter redisq, and VarMQ with the SQLite adapter sqliteq. Each tab shows the go get command and the import, and each has a copy button.
The in-memory worker pool, queues and topics.
go get github.com/goptics/varmqimport "github.com/goptics/varmq"Adds redisq, for persistent and distributed queues in Redis.
go get github.com/goptics/varmq github.com/goptics/redisq@v1.6.0import (
"github.com/goptics/redisq"
"github.com/goptics/varmq"
)Adds sqliteq, for persistent queues in SQLite files.
go get github.com/goptics/varmq github.com/goptics/sqliteq@v0.4.0import (
"github.com/goptics/sqliteq"
"github.com/goptics/varmq"
)VarMQ needs Go 1.27 or newer. Run go version to check.
The in-memory worker pool, queues and topics are all in this one package. Shared storage also needs a storage adapter, which is its own module: redisq for Redis or sqliteq for SQLite.
Versions
Each module has its own go.mod, so each one can need a different Go version. The table is for the releases these docs describe.
| Module | Version | Go version | Other needs |
|---|---|---|---|
github.com/goptics/varmq | v1.11.0 | 1.27 or newer | None. |
github.com/goptics/varmq/contract | v0.7.0 | 1.24 or newer | None. VarMQ and the adapters import it. |
github.com/goptics/redisq | v1.6.0 | 1.26 or newer | Redis 6.0 or newer, with Lua scripts allowed. |
github.com/goptics/sqliteq | v0.4.0 | 1.27 or newer | cgo (CGO_ENABLED=1) and a C compiler, because it uses mattn/go-sqlite3. |
Your module needs the highest Go version of the modules it uses. With VarMQ v1.11.0, that is Go 1.27.
What each adapter release supports
| Feature | VarMQ | redisq | sqliteq |
|---|---|---|---|
Binding with WithQueue and producers with NewQueue | v1.11.0 | v1.6.0 | v0.4.0 |
Reject of a failed job | v1.11.0 | v1.6.0 | v0.4.0 |
| Job outcome and cancel | v1.11.0 | v1.6.0 | v0.4.0 |
| Queue pause | v1.11.0 | v1.6.0 | v0.4.0 |
| Job records for the REST API | v1.11.0 | v1.6.0 | v0.4.0 |
| Reading one job by ID over REST | v1.11.0 | no: the route answers 501 | no: the route answers 501 |
| Workflows | v1.11.0 | v1.6.0 | no |
Next: the quick start.