Google Cloud Pub/Sub clients
Google Cloud Pub/Sub client providing stream-based, declarative, high-level API with zio and zio-streams to help to concentrate on the business logic.
Released for Scala 3 targeting JVM and Native via scala-native with exception of zio-pubsub-google due to Java dependencies.
Scala.js support could be potentially added.
Modules
| Name | Description | JVM | Native |
|---|---|---|---|
zio-pubsub | Core components/interfaces/models | ✅ | ✅ |
zio-pubsub-http | Implementation using Pub/Sub REST API based on clients from AnyMindGroup/zio-gcp | ✅ | ✅ |
zio-pubsub-google | Provides gRPC based client implementations via Google's Java library by using the StreamingPull API for subscriptions. | ✅ | ❌ |
zio-pubsub-serde-zio-schema | Provides Serializer/Deserializer using the zio-schema binary codec | ✅ | ✅ |
Getting started
To get started with sbt, add the following to your build.sbt file:
scala
libraryDependencies ++= Seq(
// core components
"com.anymindgroup" %% "zio-pubsub" % "latest",
// to use the implementation with Google's Java library
"com.anymindgroup" %% "zio-pubsub-google" % "latest",
// or to use the http implementation
// "com.anymindgroup" %% "zio-pubsub-http" % "latest",
// include for testing support
"com.anymindgroup" %% "zio-pubsub-testkit" % "latest" % Test
)