Installation
VarMQ needs Go 1.24 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/redisqimport (
"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/sqliteqimport (
"github.com/goptics/sqliteq"
"github.com/goptics/varmq"
)VarMQ needs Go 1.24 or newer. Run go version to check.
The in-memory worker pool, queues and topics are all in this one package. Persistent and distributed queues also need 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 redisq v1.5.0 and sqliteq v0.3.0.
| Module | Go version | Other needs |
|---|---|---|
github.com/goptics/varmq | 1.24 or newer | None. |
github.com/goptics/redisq v1.5.0 | 1.26 or newer | Redis 6.0 or newer, with Lua scripts allowed. |
github.com/goptics/sqliteq v0.3.0 | 1.24 or newer | cgo (CGO_ENABLED=1) and a C compiler, because it uses mattn/go-sqlite3. |
Neither adapter lists github.com/goptics/varmq in its go.mod. So an adapter does not set the VarMQ version; your own module does.
Next: the quick start.