{"id":30047752,"url":"https://github.com/evolution-gaming/pekko-extension","last_synced_at":"2026-05-31T20:31:51.927Z","repository":{"id":296995889,"uuid":"991957206","full_name":"evolution-gaming/pekko-extension","owner":"evolution-gaming","description":"set of libraries with extensions for pekko","archived":false,"fork":false,"pushed_at":"2026-05-14T05:32:03.000Z","size":2640,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-14T07:30:02.871Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evolution-gaming.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-28T12:02:06.000Z","updated_at":"2026-05-14T05:32:08.000Z","dependencies_parsed_at":"2025-06-03T20:21:38.781Z","dependency_job_id":"f7d430b1-0aea-4bf5-9a65-eea93a3de023","html_url":"https://github.com/evolution-gaming/pekko-extension","commit_stats":null,"previous_names":["evolution-gaming/pekko-extension"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/evolution-gaming/pekko-extension","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolution-gaming%2Fpekko-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolution-gaming%2Fpekko-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolution-gaming%2Fpekko-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolution-gaming%2Fpekko-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evolution-gaming","download_url":"https://codeload.github.com/evolution-gaming/pekko-extension/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evolution-gaming%2Fpekko-extension/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33748607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-07T09:58:09.020Z","updated_at":"2026-05-31T20:31:51.916Z","avatar_url":"https://github.com/evolution-gaming.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/evolution-gaming/pekko-extension/workflows/CI/badge.svg)](https://github.com/evolution-gaming/pekko-extension/actions?query=workflow%3ACI)\n[![Coverage Status](https://coveralls.io/repos/github/evolution-gaming/pekko-extension/badge.svg?branch=main)](https://coveralls.io/github/evolution-gaming/pekko-extension?branch=main)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/2a147aa5b283460c8c6ab43bac4c787e)](https://app.codacy.com/gh/evolution-gaming/pekko-extension/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n[![Version](https://img.shields.io/badge/version-click-blue)](https://evolution.jfrog.io/artifactory/api/search/latestVersion?g=com.evolution\u0026a=pekko-extension_2.13\u0026repos=public)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellowgreen.svg)](https://opensource.org/licenses/MIT)\n\n# Pekko Extension libraries\n\nSet of extension libraries for [`pekko`](https://pekko.apache.org/).\n\n## Getting Started\n\nAll libraries require the same initial setup, like:\n```scala\naddSbtPlugin(\"com.evolution\" % \"sbt-artifactory-plugin\" % \"0.0.2\")\n```\nSetting dependency:\n```scala\nlibraryDependencies += \"com.evolution\" %% \"pekko-extension-\u003cname\u003e\" % \"\u003cversion\u003e\"\n```\n\n## Extensions\n\n### pekko-extension-serialization\n\nTODO add description!\n\n### pekko-extension-pubsub\n\nTypesafe layer for `DistributedPubSubMediator`.\n\n```scala\ntrait PubSub[F[_]] {\n\n  def publish[A: Topic: ToBytes](\n    msg: A,\n    sender: Option[ActorRef] = None,\n    sendToEachGroup: Boolean = false\n  ): F[Unit]\n\n  def subscribe[A: Topic: FromBytes: ClassTag](\n    group: Option[String] = None)(\n    onMsg: OnMsg[F, A]\n  ): Resource[F, Unit]\n\n  def topics(timeout: FiniteDuration = 3.seconds): F[Set[String]]\n}\n```\n\nFor an ability to serialize/deserialize messages to offload `pekko` remoting and improve throughput, \ncheck [`DistributedPubSubMediatorSerializing.scala`](src/main/scala/org/apache/pekko/cluster/pubsub/DistributedPubSubMediatorSerializing.scala).\n\n### set of `pekko-extension-test` libraries\n\nThese two libraries were created to provide a set of tests to be used in projects dependent on [Pekko](https://pekko.apache.org)\nlibraries.\nFor instance, to prevent the following \"surprise\" at runtime:\n\n```\njava.lang.IllegalStateException: You are using version 1.2.0 of Pekko HTTP, but it appears you (perhaps indirectly) also depend on older versions of related artifacts. You can solve this by adding an explicit dependency on version 1.2.0 of the [pekko-http, pekko-http-testkit] artifacts to your project. Here's a complete collection of detected artifacts: (1.1.0, [pekko-http, pekko-http-testkit]), (1.2.0, [pekko-http-core, pekko-parsing]). See also: https://pekko.apache.org/docs/pekko/current/common/binary-compatibility-rules.html#mixed-versioning-is-not-allowed\n\tat org.apache.pekko.util.ManifestInfo.checkSameVersion(ManifestInfo.scala:188)\n\tat org.apache.pekko.util.ManifestInfo.checkSameVersion(ManifestInfo.scala:166)\n\tat org.apache.pekko.http.scaladsl.HttpExt.\u003cinit\u003e(Http.scala:89)\n\tat org.apache.pekko.http.scaladsl.Http$.createExtension(Http.scala:1140)\n\tat org.apache.pekko.http.scaladsl.Http$.createExtension(Http.scala:871)\n\tat org.apache.pekko.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:1175)\n\tat org.apache.pekko.actor.ExtensionId.apply(Extension.scala:87)\n\tat org.apache.pekko.actor.ExtensionId.apply$(Extension.scala:86)\n```\n\n#### pekko-extension-test-actor\n\nFor [pekko-actor](https://pekko.apache.org/docs/pekko/current/) tests that all `pekko` modules are of the same version.\n\nSet up the dependency in `Test` scope:\n```scala\nlibraryDependencies += \"com.evolution\" %% \"pekko-extension-test-actor\" % \"\u003cversion\u003e\" % Test\n```\n\nAnd add the following test into your project:\n```scala\nimport com.evolution.pekkotest.PekkoActorSuite\n\nclass PekkoActorTest extends PekkoActorSuite\n```\n\n#### pekko-extension-test-http\n\nFor [pekko-http](https://pekko.apache.org/docs/pekko-http/current/) tests that all `pekko-http` modules are of the same version.\n\nSet up the dependency in `Test` scope:\n```scala\nlibraryDependencies += \"com.evolution\" %% \"pekko-extension-test-http\" % \"\u003cversion\u003e\" % Test\n```\n\nAnd add the following test into your project.\n```scala\nimport com.evolution.pekkotest.PekkoHttpSuite\n\nclass PekkoHttpTest extends PekkoHttpSuite\n```\n\n### pekko-extension-distributed-data-tools\n\n`SafeReplicator` is a typesafe api for [Distributed Data replicator](https://pekko.apache.org/docs/pekko/current/typed/distributed-data.html)\n\n```scala\ntrait SafeReplicator[F[_], A \u003c: ReplicatedData] {\n\n  def get(implicit consistency: ReadConsistency): F[Option[A]]\n\n  def update(modify: Option[A] =\u003e A)(implicit consistency: WriteConsistency): F[Unit]\n\n  def delete(implicit consistency: WriteConsistency): F[Boolean]\n\n  def subscribe(\n    onStop: F[Unit],\n    onChanged: A =\u003e F[Unit])(implicit\n    factory: ActorRefFactory,\n    executor: ExecutionContext\n  ): Resource[F, Unit]\n\n  def flushChanges: F[Unit]\n}\n```\n\n### pekko-extension-sharding-strategy\n\nAlternative to [org.apache.pekko.cluster.sharding.ShardCoordinator.ShardAllocationStrategy](https://github.com/apache/pekko/blob/main/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala#L78).\n\n#### Api\n\n```scala\ntrait ShardingStrategy[F[_]] {\n\n  def allocate(requester: Region, shard: Shard, current: Allocation): F[Option[Region]]\n\n  def rebalance(current: Allocation, inProgress: Set[Shard]): F[List[Shard]]\n}\n```\n\n#### Syntax\n\n```scala\nval strategy = LeastShardsStrategy()\n  .filterShards(...)\n  .filterRegions(...)\n  .rebalanceThreshold(10)\n  .takeShards(10) \n  .shardRebalanceCooldown(1.minute)\n  .logging(...)\n  .toAllocationStrategy()\n```\n\n### set of `pekko-extension-tools` libraries \n\n#### pekko-extension-tools-test\n\nTODO add description!\n\n#### pekko-extension-tools-util\n\nTODO add description!\n\n#### pekko-extension-tools-serialization\n\nTODO add description!\n\n#### pekko-extension-tools-persistence\n\nTODO add description!\n\n#### pekko-extension-tools-cluster\n\nTODO add description!\n\n#### pekko-extension-tools-instrumentation\n\nTODO add description!\n\nTODO do we need umbrella lib `pekko-extension-tools`?\n\n### pekko-extension-conhub\n\nConHub is a distributed registry used to manage websocket connections on the different nodes of an application.\nIt enables you to send a serializable message to one or many connections hiding away the complexity of distributed system.\nIn short: user provides `lookup` criteria and a `message` and `conHub` does the job routing message to physical \ninstances of a matched connections\n\nUsage example:\n```scala\ntype Connection = ??? // type representing physical connection\nfinal case class Msg(bytes: Array[Byte]) // serializable\nfinal case class Envelope(lookup: LookupById, msg: Msg)\nfinal case class LookupById(id: String)\nval conHub: ConHub[String, LookupById, Connection, Envelope] = ???\nconHub ! Envelope(LookupById(\"testId\"), Msg(Array(…)))\n```\n\n# set of `pekko-extension-effect` libraries\n\nThis project aims to build a bridge between [Pekko](https://pekko.apache.org/docs/pekko) and pure functional code based\non [cats-effect](https://typelevel.org/cats-effect).\n\n#### pekko-extension-effect-actor\n\nCovered (\"classic\", not the \"typed\" kind of actors!):\n* [Actors](https://pekko.apache.org/docs/pekko/current/actors.html)\n* [Persistence](https://pekko.apache.org/docs/pekko/current/persistence.html)\n\n##### [Tell.scala](effect-actor/src/main/scala/com/evolution/pekko/effect/Tell.scala)\n\nRepresents `ActorRef.tell`:\n```scala\ntrait Tell[F[_], -A] {\n  def apply(a: A, sender: Option[ActorRef] = None): F[Unit]\n}\n```\n\n##### [Ask.scala](effect-actor/src/main/scala/com/evolution/pekko/effect/Ask.scala)\n\nRepresents `ActorRef.ask` pattern:\n```scala\ntrait Ask[F[_], -A, B] {\n  def apply(msg: A, timeout: FiniteDuration, sender: Option[ActorRef]): F[B]\n}\n```\n\n##### [Reply.scala](effect-actor/src/main/scala/com/evolution/pekko/effect/Reply.scala)\n\nRepresents a reply pattern: `sender() ! reply`:\n```scala\ntrait Reply[F[_], -A] {\n  def apply(msg: A): F[Unit]\n}\n```\n\n##### [Receive.scala](effect-actor/src/main/scala/com/evolution/pekko/effect/Receive.scala)\n\nThis is what you need to implement instead of familiar `new Actor { ... }`:\n```scala\ntrait Receive[F[_], -A, B] {\n  def apply(msg: A): F[B]\n  def timeout:  F[B]\n}\n```\n\n##### [ActorOf.scala](effect-actor/src/main/scala/com/evolution/pekko/effect/ActorOf.scala)\n\nConstructs `Actor.scala` out of `receive: ActorCtx[F] =\u003e Resource[F, Receive[F, Any]]`.\n\n##### [ActorCtx.scala](effect-actor/src/main/scala/com/evolution/pekko/effect/ActorCtx.scala)\n\nWraps `ActorContext`:\n```scala\ntrait ActorCtx[F[_]] {\n  def self: ActorRef\n  def parent: ActorRef\n  def executor: ExecutionContextExecutor\n  def setReceiveTimeout(timeout: Duration): F[Unit]\n  def child(name: String): F[Option[ActorRef]]\n  def children: F[List[ActorRef]]\n  def actorRefFactory: ActorRefFactory\n  def watch[A](actorRef: ActorRef, msg: A): F[Unit]\n  def unwatch(actorRef: ActorRef): F[Unit]\n  def stop: F[Unit]\n}\n```\n\n#### pekko-extension-effect-persistence\n\n##### [PersistentActorOf.scala](effect-persistence/src/main/scala/com/evolution/pekko/effect/persistence/PersistentActorOf.scala)\n\nConstructs `PersistentActor.scala` out of `eventSourcedOf: ActorCtx[F] =\u003e F[EventSourced[F, S, E, C]]`\n\n\n##### [EventSourced.scala](effect-persistence/src/main/scala/com/evolution/pekko/effect/persistence/EventSourced.scala)\n\nDescribes a lifecycle of entity with regard to event sourcing, phases are: Started, Recovering, Receiving and Termination\n\n```scala\ntrait EventSourced[F[_], S, E, C] {\n  def eventSourcedId: EventSourcedId\n  def recovery: Recovery\n  def pluginIds: PluginIds\n  def start: Resource[F, RecoveryStarted[F, S, E, C]]\n}\n```\n\n##### [RecoveryStarted.scala](effect-persistence/src/main/scala/com/evolution/pekko/effect/persistence/RecoveryStarted.scala)\n\nDescribes the start of the recovery phase\n\n```scala\ntrait RecoveryStarted[F[_], S, E, C] {\n  def apply(\n    seqNr: SeqNr,\n    snapshotOffer: Option[SnapshotOffer[S]]\n  ): Resource[F, Recovering[F, S, E, C]]\n}\n```\n\n\n##### [Recovering.scala](effect-persistence/src/main/scala/com/evolution/pekko/effect/persistence/Recovering.scala)\n\nDescribes recovery phase\n\n```scala\ntrait Recovering[F[_], S, E, C] {\n  def replay: Resource[F, Replay[F, E]]\n\n  def completed(\n    seqNr: SeqNr,\n    journaller: Journaller[F, E],\n    snapshotter: Snapshotter[F, S]\n  ): Resource[F, Receive[F, C]]\n}\n```\n\n\n##### [Replay.scala](effect-persistence/src/main/scala/com/evolution/pekko/effect/persistence/Replay.scala)\n\nUsed during recovery to replay events\n\n```scala\ntrait Replay[F[_], A] {\n  def apply(seqNr: SeqNr, event: A): F[Unit]\n}\n```\n\n\n##### [Journaller.scala](effect-persistence/src/main/scala/com/evolution/pekko/effect/persistence/Journaller.scala)\n\nDescribes communication with underlying journal\n\n```scala\ntrait Journaller[F[_], -A] {\n  def append: Append[F, A]\n  def deleteTo: DeleteEventsTo[F]\n}\n```\n\n\n##### [Snapshotter.scala](effect-persistence/src/main/scala/com/evolution/pekko/effect/persistence/Snapshotter.scala)\n\nDescribes communication with underlying snapshot storage\n\n```scala\n/**\n  * Describes communication with underlying snapshot storage\n  *\n  * @tparam A - snapshot\n  */\ntrait Snapshotter[F[_], -A] {\n  def save(seqNr: SeqNr, snapshot: A): F[F[Instant]]\n  def delete(seqNr: SeqNr): F[F[Unit]]\n  def delete(criteria: SnapshotSelectionCriteria): F[F[Unit]]\n}\n```\n\n#### pekko-extension-effect-testkit\n\nTODO add description!\n\n#### pekko-extension-effect-actor-tests\n\nTODO add description! \n\n#### pekko-extension-effect-persistence-api\n\nTODO add description!\n\n#### pekko-extension-effect-persistence\n\nTODO add description!\n\n#### pekko-extension-effect-cluster\n\nTODO add description!\n\n#### pekko-extension-effect-cluster-sharding\n\nTODO add description! \n\n#### pekko-extension-effect-eventsourcing\n\n[Engine.scala](effect-eventsourcing/src/main/scala/com/evolution/pekko/effect/eventsourcing/Engine.scala)\n\nThis is the main runtime/queue where all actions against your state are processed in a desired event-sourcing sequence:\n1. validate and finalize events\n2. append events to journal\n3. publish changed state\n4. execute side effects\n\nIt is optimized for maximum throughput, hence different steps of different actions might be executed in parallel as well as events \nmight be stored in batches\n\n```scala\ntrait Engine[F[_], S, E] {\n  def state: F[State[S]]\n\n  /**\n    * @return Outer F[_] is about `load` being enqueued, this immediately provides order guarantees\n    *         Inner F[_] is about a `load` being completed\n    */\n  def apply[A](load: F[Validate[F, S, E, A]]): F[F[A]]\n}\n```\n\n## Library mappings `pekko` to `akka` \n\n| pekko                                   | akka                                                                         | migrated from version |\n|-----------------------------------------|------------------------------------------------------------------------------|-----------------------|\n| pekko-extension-serialization           | [akka-serialization](https://github.com/evolution-gaming/akka-serialization) | 1.1.0                 |\n| pekko-extension-pubsub                  | [pubsub](https://github.com/evolution-gaming/akka-pubsub)                    | 10.0.0                |\n| pekko-extension-test-actor              | [akka-test](https://github.com/evolution-gaming/akka-test)                   | 0.3.0                 |\n| pekko-extension-test-http               | [akka-test](https://github.com/evolution-gaming/akka-test)                   | 0.3.0                 |\n| pekko-extension-distributed-data-tools  | [ddata-tools](https://github.com/evolution-gaming/ddata-tools/)              | 3.1.0                 |\n| pekko-extension-sharding-strategy       | [sharding-strategy](https://github.com/evolution-gaming/sharding-strategy)   | 3.0.2                 |\n| pekko-extension-tools-test              | [akka-tools](https://github.com/evolution-gaming/akka-tools/)                | 3.3.13                |\n| pekko-extension-tools-util              | [akka-tools](https://github.com/evolution-gaming/akka-tools/)                | 3.3.13                |\n| pekko-extension-tools-serialization     | [akka-tools](https://github.com/evolution-gaming/akka-tools/)                | 3.3.13                |\n| pekko-extension-tools-persistence       | [akka-tools](https://github.com/evolution-gaming/akka-tools/)                | 3.3.13                |\n| pekko-extension-tools-cluster           | [akka-tools](https://github.com/evolution-gaming/akka-tools/)                | 3.3.13                |\n| pekko-extension-tools-instrumentation   | [akka-tools](https://github.com/evolution-gaming/akka-tools/)                | 3.3.13                |\n| pekko-extension-conhub                  | [conhub](https://github.com/evolution-gaming/conhub)                         | 3.0.0                 |\n| pekko-extension-effect-actor            | [akka-effect](https://github.com/evolution-gaming/akka-effect)               | 4.1.10                |\n| pekko-extension-effect-testkit          | [akka-effect](https://github.com/evolution-gaming/akka-effect)               | 4.1.10                |\n| pekko-extension-effect-actor-tests      | [akka-effect](https://github.com/evolution-gaming/akka-effect)               | 4.1.10                |\n| pekko-extension-effect-persistence-api  | [akka-effect](https://github.com/evolution-gaming/akka-effect)               | 4.1.10                |\n| pekko-extension-effect-persistence      | [akka-effect](https://github.com/evolution-gaming/akka-effect)               | 4.1.10                |\n| pekko-extension-effect-cluster          | [akka-effect](https://github.com/evolution-gaming/akka-effect)               | 4.1.10                |\n| pekko-extension-effect-cluster-sharding | [akka-effect](https://github.com/evolution-gaming/akka-effect)               | 4.1.10                |\n| pekko-extension-effect-eventsourcing    | [akka-effect](https://github.com/evolution-gaming/akka-effect)               | 4.1.10                |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevolution-gaming%2Fpekko-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevolution-gaming%2Fpekko-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevolution-gaming%2Fpekko-extension/lists"}