JOB 04Introduction

Installation

VarMQ needs Go 1.27 or newer. Add it to your module with go get, then import it. Pick the variant you need:

Install · go get

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.

terminal
go get github.com/goptics/varmq

main.go
import "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.

ModuleVersionGo versionOther needs
github.com/goptics/varmqv1.11.01.27 or newerNone.
github.com/goptics/varmq/contractv0.7.01.24 or newerNone. VarMQ and the adapters import it.
github.com/goptics/redisqv1.6.01.26 or newerRedis 6.0 or newer, with Lua scripts allowed.
github.com/goptics/sqliteqv0.4.01.27 or newercgo (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

FeatureVarMQredisqsqliteq
Binding with WithQueue and producers with NewQueuev1.11.0v1.6.0v0.4.0
Reject of a failed jobv1.11.0v1.6.0v0.4.0
Job outcome and cancelv1.11.0v1.6.0v0.4.0
Queue pausev1.11.0v1.6.0v0.4.0
Job records for the REST APIv1.11.0v1.6.0v0.4.0
Reading one job by ID over RESTv1.11.0no: the route answers 501no: the route answers 501
Workflowsv1.11.0v1.6.0v0.4.0

Next: the quick start.

Edit page

Last updated: