Skip to content

matejcerny/pgmq4s

Repository files navigation

pgmq4s pgmq4s

Scala.js Scala.js Latest version Build Status codecov

Scala 3 client for pgmq (Postgres Message Queue).

Requires PGMQ v1.11.0+ (topic-based routing). Core messaging works with v1.10.0.

Supports JVM, Scala.js, and Scala Native.

Database backends:

  • Anorm
  • Doobie
  • Skunk
  • Slick

JSON codecs

  • Circe
  • Jsoniter-scala
  • Play JSON
  • Spray JSON
  • uPickle

Need a specific DB backend or JSON bridge? Create an issue here.

Architecture

pgmq4s provides two main traits:

  • PgmqClient[F] — message operations (send, read, pop, archive, delete)
  • PgmqAdmin[F] — queue management and observability (create, drop, list, metrics)

Each database backend provides both: e.g. DoobiePgmqClient + DoobiePgmqAdmin.

Getting Started

Add to your build.sbt (replace <version> with the latest version shown in the badge above):

libraryDependencies ++= Seq(
  "io.github.matejcerny" %% "pgmq4s-core"   % "<version>",
  "io.github.matejcerny" %% "pgmq4s-circe"  % "<version>",  // or pgmq4s-jsoniter, pgmq4s-play-json, pgmq4s-spray-json, pgmq4s-upickle
  "io.github.matejcerny" %% "pgmq4s-doobie" % "<version>"   // or pgmq4s-anorm, pgmq4s-skunk, pgmq4s-slick
)

See the documentation for usage examples.

About

Scala 3 client for pgmq (Postgres Message Queue)

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages