pgx VS retry-go

Compare pgx vs retry-go and see what are their differences.

pgx

PostgreSQL driver and toolkit for Go (by jackc)

retry-go

Simple golang library for retry mechanism (by avast)
Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • InfluxDB - Access the most powerful time series database as a service
  • SaaSHub - Software Alternatives and Reviews
pgx retry-go
59 4
6,867 1,550
- 5.9%
5.6 3.2
5 days ago 6 days ago
Go Go
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

pgx

Posts with mentions or reviews of pgx. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-03-20.

retry-go

Posts with mentions or reviews of retry-go. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-03-22.
  • Network Error Handling
    3 projects | reddit.com/r/golang | 22 Mar 2023
  • retry package for golang
    4 projects | reddit.com/r/golang | 22 Aug 2022
    What is that advantage of your package compared to other ones like https://github.com/avast/retry-go?
  • Go, NATS, gRPC and PostgreSQL clean architecture microservice with monitoring and tracing 👋
    16 projects | dev.to | 29 Mar 2021
    processCreateEmail handling create email events, it's start tracing span, increase metrics counters, then unmarshal message data, and call usecase create method, if it fails, we retry for 3 times using retry-go, if it still fails, we check is the current message redelivered and if redelivery count > maxRedeliveryCount(it's up to your business logic, here is 3 times limit), handling error cases can be very different and depends on your service business logic, in this example used Dead Letter Queue approach.
  • Go, Kafka, gRPC and MongoDB microservice with metrics and tracing 👋
    6 projects | dev.to | 28 Feb 2021
    Workers validate message body then call usecase, if it's returns error, try for retry, good library for retry is retry-go, if again fails, publish error message to very simple Dead Letter Queue as i said, didn't implement here any interesting business logic, so in real production we have to handle error cases in the better way. And after message success processed commit it.

What are some alternatives?

When comparing pgx and retry-go you can also consider the following projects:

sqlx - general purpose extensions to golang's database/sql

pq - Pure Go Postgres driver for database/sql

GORM - The fantastic ORM library for Golang, aims to be developer friendly

gomock - GoMock is a mocking framework for the Go programming language.

sqlc - Generate type-safe code from SQL

go-sql-driver/mysql - Go MySQL Driver is a MySQL driver for Go's (golang) database/sql package

migrate - Database migrations. CLI and Golang library.

goqu - SQL builder and query library for golang

kafka-go - Kafka library in Go

Gin - Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.

go-sqlite3 - sqlite3 driver for go using database/sql

bun - Incredibly fast JavaScript runtime, bundler, transpiler and package manager – all in one.