Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.82 KB

README.md

File metadata and controls

49 lines (33 loc) · 1.82 KB

PubSub

Build Status Coverage Status Codacy Badge Version License: MIT

The library is based on cats-effect 3 since 7.0.0 version, for cats-effect 2.x.x back ports use series/6.x.x

Typesafe layer for DistributedPubSubMediator

trait PubSub[F[_]] {

  def publish[A: Topic : ToBytes](
    msg: A,
    sender: Option[ActorRef] = None,
    sendToEachGroup: Boolean = false
  ): F[Unit]

  def subscribe[A: Topic : FromBytes : ClassTag](
    group: Option[String] = None)(
    onMsg: OnMsg[F, A]
  ): Resource[F, Unit]

  def topics(timeout: FiniteDuration = 3.seconds): F[Set[String]]
}

Ability to serialize/deserialize messages to offload akka remoting and improve throughput

Check DistributedPubSubMediatorSerializing.scala

Setup

addSbtPlugin("com.evolution" % "sbt-artifactory-plugin" % "0.0.2")

libraryDependencies += "com.evolutiongaming" %% "pubsub" % "7.0.0"

CHANGELOG

7.0.0

Upgrades
  • cats-effect 2.5.4 to 3.3.11