Go API
The Go module is postgremq.dev/postgremq-go. Use the versioned native reference for public types, methods, options, and errors.
Current documentation baseline: v0.4.0, requiring Go 1.25 or later.
go get postgremq.dev/postgremq-go@v0.4.0
Open the v0.4.0 package reference. The module also contains the migration CLI, released with the same Go component version. Its embedded SQL migration version is tracked separately.
Start with Connecting, then Publishing or Consuming. ConsumeHandler manages callback concurrency and automatic settlement; Consume exposes a channel for explicit application settlement.
Go business failures need explicit nack: callbacks do not return an error. Give long-running work the supplied cancellation context, and configure a finite shutdown timeout. Acknowledgements and Graceful shutdown explain the consequences.
Use Compatibility to select SQL and SDK releases independently. Older package references remain available through pkg.go.dev's version selector; a newer source checkout is not a released API reference.