Skip to content

Commit

Permalink
Migrate elastic4s-http-streams from akka to pekko
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippus committed Nov 8, 2024
1 parent b06588b commit b9eabea
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ lazy val httpstreams = (project in file("elastic4s-http-streams"))
.settings(scala3Settings)
.settings(libraryDependencies ++=
Seq(
Dependencies.akkaActor,
Dependencies.akkaStream,
Dependencies.pekkoActor,
Dependencies.pekkoStream,
Dependencies.reactiveStreamsTck,
Dependencies.scalaTestPlusTestng
)
Expand Down
6 changes: 3 additions & 3 deletions docs/streams.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Reactive Streams

Elastic4s has an implementation of the [reactive streams](http://www.reactive-streams.org) api for both publishing and subscribing that is built
using Akka. To use this, you need to add a dependency on the elastic4s-streams module.
using Apache Pekko. To use this, you need to add a dependency on the elastic4s-streams module.

There are two things you can do with the reactive streams implementation. You can create an elastic subscriber, and have that
stream data from some publisher into elasticsearch. Or you can create an elastic publisher and have documents streamed out to subscribers.
Expand Down Expand Up @@ -31,7 +31,7 @@ import com.sksamuel.elastic4s.streams.ReactiveElastic._

An elastic publisher can be created for any arbitrary query you wish, and then using the efficient search scroll API, the entire dataset that matches your query is streamed out to subscribers.

And make sure you have an Akka Actor System in implicit scope
And make sure you have a Pekko Actor System in implicit scope

`implicit val system = ActorSystem()`

Expand All @@ -56,7 +56,7 @@ The subscriber can create index, update, or delete requests, so is a good way to

`import ReactiveElastic._`

And make sure you have an Akka Actor System in implicit scope.
And make sure you have a Pekko Actor System in implicit scope.

`implicit val system = ActorSystem()`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.sksamuel.elastic4s.streams

import akka.actor._
import org.apache.pekko.actor._
import com.sksamuel.elastic4s.requests.bulk.{BulkCompatibleRequest, BulkRequest, BulkResponseItem}
import com.sksamuel.elastic4s.requests.common.RefreshPolicy
import com.sksamuel.elastic4s.{ElasticClient, RequestFailure, RequestSuccess}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.sksamuel.elastic4s.streams

import akka.actor.ActorRefFactory
import org.apache.pekko.actor.ActorRefFactory
import com.sksamuel.elastic4s.requests.searches.SearchRequest
import com.sksamuel.elastic4s.{ElasticClient, IndexesAndTypes}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.sksamuel.elastic4s.streams

import akka.actor.{Actor, ActorRefFactory, PoisonPill, Props, Stash}
import org.apache.pekko.actor.{Actor, ActorRefFactory, PoisonPill, Props, Stash}
import com.sksamuel.elastic4s.requests.searches.{SearchHit, SearchRequest, SearchResponse}
import com.sksamuel.elastic4s.streams.PublishActor.Ready
import com.sksamuel.elastic4s.{ElasticClient, RequestFailure, RequestSuccess}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.sksamuel.elastic4s.streams

import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import com.sksamuel.elastic4s.jackson.ElasticJackson
import com.sksamuel.elastic4s.requests.bulk.BulkCompatibleRequest
import com.sksamuel.elastic4s.testkit.DockerTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.sksamuel.elastic4s.streams

import java.util.concurrent.{CountDownLatch, TimeUnit}

import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import com.sksamuel.elastic4s.requests.indexes.IndexRequest
import com.sksamuel.elastic4s.requests.searches.SearchHit
import com.sksamuel.elastic4s.testkit.DockerTests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.sksamuel.elastic4s.streams

import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import com.sksamuel.elastic4s.testkit.DockerTests
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.sksamuel.elastic4s.streams

import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import com.sksamuel.elastic4s.jackson.ElasticJackson
import com.sksamuel.elastic4s.requests.searches.SearchHit
import com.sksamuel.elastic4s.testkit.DockerTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.sksamuel.elastic4s.streams

import java.util.concurrent.{CountDownLatch, TimeUnit}

import akka.actor.ActorSystem
import org.apache.pekko.actor.ActorSystem
import com.sksamuel.elastic4s.requests.bulk.BulkResponseItem
import com.sksamuel.elastic4s.testkit.DockerTests
import org.scalatest.matchers.should.Matchers
Expand Down

0 comments on commit b9eabea

Please sign in to comment.