Repository: softwaremill/elasticmq
Pull request #895 (2023-10-28 14:16:01)

Migrating from Akka to Pekko
## Why 
#891

## What
- Change dependencies from akka to pekko
- Change imported libraries from akka to pekko
- Change configuration settings
- Change readme

Ref: [Apache Pekko Migration Guides](https://pekko.apache.org/docs/pekko/current/project/migration-guides.html)

micossow: Looks good to me 👍 
I'll merge it after https://github.com/softwaremill/elasticmq/pull/892 because I prefer to have these two changes in separate releases.
truongnmt: Thank you for your swift review and sharing release plan. 😄
Understood! Our project is all set and waiting for this change to go live. We would be very appreciated if you could help us release this any time soon. Thank you very much! ^T^

Patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 13eccf48..056ddf73 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -140,7 +140,7 @@ jobs:
         run: sbt "project server; assembly; Docker / publishLocal"
 
       - name: Build native docker image
-        run: sbt "project nativeServer; assembly; GraalVMNativeImage / packageBin; Docker / publishLocal"
+        run: sbt "project nativeServer; Docker / publishLocal"
 
   publish-jar:
     needs: [ci-2-12, ci-2-13, ci-docker]
@@ -238,4 +238,4 @@ jobs:
         run: sbt "project server; assembly; Docker / publish"
 
       - name: Publish JVM native docker image
-        run: sbt "project nativeServer; assembly; GraalVMNativeImage / packageBin; Docker / publish"
+        run: sbt "project nativeServer; assembly; Docker / publish"
diff --git a/README.md b/README.md
index 2effb858..331a0cb3 100644
--- a/README.md
+++ b/README.md
@@ -621,8 +621,8 @@ ElasticMQ exposes `Queues` MBean. It contains three operations:
 
 # Technology
 
-* Core: [Scala](http://scala-lang.org) and [Akka](http://akka.io/).
-* Rest server: [Akka HTTP](http://doc.akka.io/docs/akka-http/current/), a high-performance,
+* Core: [Scala](http://scala-lang.org) and [Pekko](https://pekko.apache.org/).
+* Rest server: [Pekko HTTP](https://pekko.apache.org/docs/pekko-http/current/), a high-performance,
   asynchronous, REST/HTTP toolkit.
 * Testing the SQS interface: [Amazon Java SDK](http://aws.amazon.com/sdkforjava/);
   see the `rest-sqs-testing-amazon-java-sdk` module for the testsuite.
diff --git a/build.sbt b/build.sbt
index 47c82ab8..65e9caa4 100644
--- a/build.sbt
+++ b/build.sbt
@@ -1,7 +1,7 @@
 import com.amazonaws.services.s3.model.PutObjectResult
 import com.softwaremill.Publish.ossPublishSettings
 import com.softwaremill.SbtSoftwareMillCommon.commonSmlBuildSettings
-import com.typesafe.sbt.packager.docker.{Cmd, ExecCmd}
+import com.typesafe.sbt.packager.docker._
 import sbt.Keys.javaOptions
 import sbt.internal.util.complete.Parsers.spaceDelimited
 import scoverage.ScoverageKeys.*
@@ -38,16 +38,16 @@ val awaitility = "org.awaitility" % "awaitility-scala" % "4.2.0"
 
 val amazonJavaSdkSqs = "com.amazonaws" % "aws-java-sdk-sqs" % "1.12.472" exclude ("commons-logging", "commons-logging")
 
-val akkaVersion = "2.6.20"
-val akkaHttpVersion = "10.2.10"
-val akka2Actor = "com.typesafe.akka" %% "akka-actor" % akkaVersion
-val akka2Slf4j = "com.typesafe.akka" %% "akka-slf4j" % akkaVersion
-val akka2Streams = "com.typesafe.akka" %% "akka-stream" % akkaVersion
-val akka2Testkit = "com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test"
-val akka2Http = "com.typesafe.akka" %% "akka-http" % akkaHttpVersion
+val pekkoVersion = "1.0.1"
+val pekkoHttpVersion = "1.0.0"
+val pekkoActor = "org.apache.pekko" %% "pekko-actor" % pekkoVersion
+val pekkoSlf4j = "org.apache.pekko" %% "pekko-slf4j" % pekkoVersion
+val pekkoStreams = "org.apache.pekko" %% "pekko-stream" % pekkoVersion
+val pekkoTestkit = "org.apache.pekko" %% "pekko-testkit" % pekkoVersion % "test"
+val pekkoHttp = "org.apache.pekko" %% "pekko-http" % pekkoHttpVersion
 val sprayJson = "io.spray" %% "spray-json" % "1.3.6"
-val akkaHttpSprayJson = "com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion
-val akka2HttpTestkit = "com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % "test"
+val pekkoHttpSprayJson = "org.apache.pekko" %% "pekko-http-spray-json" % pekkoHttpVersion
+val pekkoHttpTestkit = "org.apache.pekko" %% "pekko-http-testkit" % pekkoHttpVersion % "test"
 
 val awsSpringMessagingVersion = "2.2.6.RELEASE"
 val springVersion = "5.3.30"
@@ -61,10 +61,10 @@ val h2 = "com.h2database" % "h2" % "2.2.224"
 
 val common = Seq(scalalogging)
 
-val akka25Overrides =
-  Seq( // override the 2.4.x transitive dependency from Akka HTTP
-    "com.typesafe.akka" %% "akka-stream" % akkaVersion,
-    "com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion
+val pekko100verrides =
+  Seq( // override transitive dependency from Pekko HTTP
+    "org.apache.pekko" %% "pekko-stream" % pekkoVersion,
+    "org.apache.pekko" %% "pekko-stream-testkit" % pekkoVersion
   )
 
 val buildSettings = commonSmlBuildSettings ++ ossPublishSettings ++ Seq(
@@ -75,7 +75,7 @@ val buildSettings = commonSmlBuildSettings ++ ossPublishSettings ++ Seq(
   scalaVersion := resolvedScalaVersion,
   scalacOptions ++= Seq("-Xasync", "-target:jvm-1.8"),
   libraryDependencies += scalaXml,
-  dependencyOverrides := akka25Overrides,
+  dependencyOverrides := pekko100verrides,
   parallelExecution := false,
   sonatypeProfileName := "org.elasticmq",
   // workaround for: https://github.com/sbt/sbt/issues/692
@@ -109,7 +109,7 @@ lazy val core: Project = (project in file("core"))
   .settings(
     Seq(
       name := "elasticmq-core",
-      libraryDependencies ++= Seq(akka2Actor, akka2Testkit) ++ common,
+      libraryDependencies ++= Seq(pekkoActor, pekkoTestkit) ++ common,
       coverageMinimumStmtTotal := 94
     )
   )
@@ -126,10 +126,10 @@ lazy val persistenceCore: Project = (project in file("persistence/persistence-co
     Seq(
       name := "elasticmq-persistence-core",
       libraryDependencies ++= Seq(
-        akka2Actor,
-        akka2Slf4j,
+        pekkoActor,
+        pekkoSlf4j,
         config,
-        akka2Testkit,
+        pekkoTestkit,
         scalaAsync
       ) ++ common
     )
@@ -171,14 +171,14 @@ lazy val restSqs: Project = (project in file("rest/rest-sqs"))
     Seq(
       name := "elasticmq-rest-sqs",
       libraryDependencies ++= Seq(
-        akka2Actor,
-        akka2Slf4j,
-        akka2Http,
-        akka2Streams,
+        pekkoActor,
+        pekkoSlf4j,
+        pekkoHttp,
+        pekkoStreams,
         sprayJson,
-        akkaHttpSprayJson,
-        akka2Testkit,
-        akka2HttpTestkit,
+        pekkoHttpSprayJson,
+        pekkoTestkit,
+        pekkoHttpTestkit,
         scalaAsync
       ) ++ common
     )
@@ -242,7 +242,9 @@ lazy val server: Project = (project in file("server"))
       dockerBaseImage := "openjdk:11-jdk-stretch",
       Docker / packageName := "elasticmq",
       dockerUsername := Some("softwaremill"),
-      dockerUpdateLatest := true,
+      dockerUpdateLatest := {
+        !version.value.toLowerCase.contains("rc")
+      },
       Universal / javaOptions ++= Seq("-Dconfig.file=/opt/elasticmq.conf"),
       Docker / mappings ++= Seq(
         (baseDirectory.value / "docker" / "elasticmq.conf") -> "/opt/elasticmq.conf"
@@ -263,9 +265,12 @@ lazy val server: Project = (project in file("server"))
   .dependsOn(core, restSqs, persistenceFile, persistenceSql, commonTest % "test")
 
 val graalVmVersion = "22.1.0"
+val graalVmTag = s"ol8-java11-$graalVmVersion"
+val graalVmBaseImage = "ghcr.io/graalvm/graalvm-ce"
+val alpineVersion = "3.18"
 
 lazy val nativeServer: Project = (project in file("native-server"))
-  .enablePlugins(GraalVMNativeImagePlugin, DockerPlugin)
+  .enablePlugins(JavaAppPackaging, DockerPlugin)
   .settings(buildSettings)
   .settings(uiSettings)
   .settings(dockerBuildxSettings)
@@ -276,71 +281,104 @@ lazy val nativeServer: Project = (project in file("native-server"))
         "org.graalvm.nativeimage" % "svm" % graalVmVersion % "compile-internal"
       ),
       publish / skip := true,
-      // configures sbt-native-packager to build app using dockerized graalvm
-      // docker image source: https://github.com/graalvm/container/pkgs/container/graalvm-ce/versions
-      (GraalVMNativeImage / containerBuildImage) := GraalVMNativeImagePlugin
-        .generateContainerBuildImage(s"ghcr.io/graalvm/graalvm-ce:ol8-java11-$graalVmVersion")
-        .value,
-      graalVMNativeImageOptions ++= Seq(
-        "--static",
-        "-H:IncludeResources=.*conf",
-        "-H:IncludeResources=version",
-        "-H:IncludeResources=.*\\.properties",
-        "-H:+ReportExceptionStackTraces",
-        "-H:-ThrowUnsafeOffsetErrors",
-        "--enable-http",
-        "--enable-https",
-        "--enable-url-protocols=https,http",
-        "--report-unsupported-elements-at-runtime",
-        "--initialize-at-build-time=scala.Symbol$",
-        "--allow-incomplete-classpath",
-        "--no-fallback",
-        "--verbose"
-      ),
       Compile / mainClass := Some("org.elasticmq.server.Main"),
-      // configures sbt-native-packager to build docker image with generated executable
-      dockerBaseImage := "alpine:3.17",
-      Docker / mappings := Seq(
-        (baseDirectory.value / ".." / "server" / "docker" / "elasticmq.conf") -> "/opt/elasticmq.conf",
-        (baseDirectory.value / ".." / "server" / "src" / "main" / "resources" / "logback.xml") -> "/opt/logback.xml",
-        ((GraalVMNativeImage / target).value / "elasticmq-native-server") -> "/opt/docker/bin/elasticmq-native-server"
-      ) ++ sbt.Path.directory(baseDirectory.value / ".." / "ui" / "build"),
-      dockerEntrypoint := Seq(
-        "/sbin/tini",
-        "--",
-        "/opt/docker/bin/elasticmq-native-server",
-        "-Dconfig.file=/opt/elasticmq.conf",
-        "-Dlogback.configurationFile=/opt/logback.xml"
-      ),
-      dockerUpdateLatest := true,
-      dockerExposedPorts := Seq(9324, 9325),
+      dockerPermissionStrategy := DockerPermissionStrategy.None,
+      // We want to utilize `docker buildx` to create native image in the first stage
+      // and then create the target docker image based on Alpine with just the native image, configuration and ui files.
+      // GraalVMNativeImagePlugin does support such scenario because it uses `docker run` to build the native image
+      // and then simply copies the artifact to the result docker image, which makes it difficult to create ARM native image.
       dockerCommands := {
         val commands = dockerCommands.value
-        val index = commands.indexWhere {
-          case Cmd("FROM", args @ _*) =>
-            args.head == "alpine:3.17" && args.last == "mainstage"
-          case _ => false
+        val binaryName = name.value
+        val className = (Compile / mainClass).value.getOrElse(sys.error("Could not find a main class."))
+
+        // This is copied from DockerPlugin - it seems like the layers with id contain the runtime jars
+        // and the layers without id contain custom files defined in Docker / mappings
+        val layerMappings = (Docker / dockerLayerMappings).value
+        val layerIdsAscending = layerMappings.map(_.layerId).distinct.sortWith { (a, b) =>
+          // Make the None (unspecified) layer the last layer
+          a.getOrElse(Int.MaxValue) < b.getOrElse(Int.MaxValue)
         }
-        val (front, back) = commands.splitAt(index + 1)
-        // sbt-native-packager by default copies stage0:/opt/docker to the target container; we need to additionally
-        // copy the configuration file
-        val copyConfig = Cmd("COPY", "--from=stage0", "/opt/elasticmq.conf", "/opt")
-        val copyLogback = Cmd("COPY", "--from=stage0", "/opt/logback.xml", "/opt")
-        val copyUI = Cmd(
-          "COPY",
-          "/build/",
-          "/opt/docker"
+
+        val nativeImageCmd = Seq(
+          "/usr/local/bin/native-image",
+          "-cp",
+          layerMappings.map(_.path).filter(_.endsWith(".jar")).mkString(":"),
+          "-H:IncludeResources=.*conf",
+          "-H:IncludeResources=version",
+          "-H:IncludeResources=.*\\.properties",
+          "-H:+ReportExceptionStackTraces",
+          "-H:-ThrowUnsafeOffsetErrors",
+          s"-H:Name=$binaryName",
+          "--enable-http",
+          "--enable-https",
+          "--enable-url-protocols=https,http",
+          "--report-unsupported-elements-at-runtime",
+          "--initialize-at-build-time=scala.Symbol$",
+          "--allow-incomplete-classpath",
+          "--no-fallback",
+          "--verbose",
+          "--static",
+          className
         )
-        val tiniCommand = ExecCmd("RUN", "apk", "add", "--no-cache", "tini")
-        front ++ Seq(tiniCommand, copyConfig, copyLogback, copyUI) ++ back
+
+        // Create build stage based on GraalVM image
+        val graalVmBuildCommands = Seq(
+          Cmd("FROM", s"$graalVmBaseImage:$graalVmTag"),
+          Cmd("WORKDIR", "/opt/graalvm"),
+          ExecCmd("RUN", "gu", "install", "native-image"),
+          ExecCmd("RUN", "sh", "-c", "ln -s /opt/graalvm-ce-*/bin/native-image /usr/local/bin/native-image")
+        ) ++ layerIdsAscending.map(layerId => {
+          val files = "opt"
+          val path = layerId.map(i => s"$i/$files").getOrElse(s"$files")
+          Cmd("COPY", s"$path /$files")
+        }) ++ Seq(Cmd("RUN", nativeImageCmd: _*))
+
+        // We want to include the image generated in stage0 around the COPY commands
+        val lastIndexOfCopy = commands.lastIndexWhere {
+          case Cmd("COPY", _) => true
+          case _ => false
+        }
+
+        val (front, back) = commands.splitAt(lastIndexOfCopy + 1)
+
+        val updatedCommands = front.filter {
+          case Cmd("COPY", args@_*) =>
+            // We do not want to include jar layers (the one with number based root path: /1, /2, /3, etc.)
+            args.head.startsWith("opt")
+          case _ => true
+        } ++ Seq(
+          Cmd("COPY", "--from=0", s"/opt/graalvm/$binaryName", s"/opt/elasticmq/bin/$binaryName"),
+          ExecCmd("RUN", "apk", "add", "--no-cache", "tini")
+        ) ++ back
+
+        graalVmBuildCommands ++ updatedCommands
       },
-      Docker / packageName := "elasticmq-native",
+      Docker / defaultLinuxInstallLocation := "/opt/elasticmq",
+      Docker / mappings ++= Seq(
+        (baseDirectory.value / ".." / "server" / "docker" / "elasticmq.conf") -> "/opt/elasticmq/elasticmq.conf",
+        (baseDirectory.value / ".." / "server" / "src" / "main" / "resources" / "logback.xml") -> "/opt/elasticmq/logback.xml",
+      ) ++ sbt.Path.contentOf(baseDirectory.value / ".." / "ui" / "build").map {
+        case (file, mapping) => (file, "/opt/elasticmq/" + mapping)
+      },
+      dockerEntrypoint := Seq(
+        "/sbin/tini", // tini makes it possible to kill the process with Cmd+C/Ctrl+C when running in interactive mode (-it)
+        "--",
+        "/opt/elasticmq/bin/elasticmq-native-server",
+        "-Dconfig.file=/opt/elasticmq/elasticmq.conf",
+        "-Dlogback.configurationFile=/opt/elasticmq/logback.xml"
+      ),
+      dockerUpdateLatest := {
+        !version.value.toLowerCase.contains("rc")
+      },
+      dockerExposedPorts := Seq(9324, 9325),
       dockerUsername := Some("softwaremill"),
-      GraalVMNativeImage / packageBin := (GraalVMNativeImage / packageBin)
+      dockerExposedVolumes += "/data",
+      dockerBaseImage := s"alpine:$alpineVersion",
+      Docker / packageName := "elasticmq-native",
+      Compile / packageBin := (Compile / packageBin)
         .dependsOn(yarnTask.toTask(" build"))
-        .value,
-      dockerUpdateLatest := true,
-      dockerExposedVolumes += "/data"
+        .value
     )
   )
   .dependsOn(server)
diff --git a/core/src/main/scala/org/elasticmq/actor/QueueManagerActor.scala b/core/src/main/scala/org/elasticmq/actor/QueueManagerActor.scala
index baf3a354..69d7ca30 100644
--- a/core/src/main/scala/org/elasticmq/actor/QueueManagerActor.scala
+++ b/core/src/main/scala/org/elasticmq/actor/QueueManagerActor.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.actor
 
-import akka.actor.{ActorRef, Props}
+import org.apache.pekko.actor.{ActorRef, Props}
 import org.elasticmq._
 import org.elasticmq.actor.queue.{QueueActor, QueueEvent}
 import org.elasticmq.actor.reply._
diff --git a/core/src/main/scala/org/elasticmq/actor/queue/QueueActor.scala b/core/src/main/scala/org/elasticmq/actor/queue/QueueActor.scala
index 31e14a8d..e81d1a22 100644
--- a/core/src/main/scala/org/elasticmq/actor/queue/QueueActor.scala
+++ b/core/src/main/scala/org/elasticmq/actor/queue/QueueActor.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.actor.queue
 
-import akka.actor.ActorRef
+import org.apache.pekko.actor.ActorRef
 import org.elasticmq.QueueData
 import org.elasticmq.actor.reply.ReplyingActor
 import org.elasticmq.msg._
diff --git a/core/src/main/scala/org/elasticmq/actor/queue/QueueActorMessageOps.scala b/core/src/main/scala/org/elasticmq/actor/queue/QueueActorMessageOps.scala
index bd5716d3..eccb6220 100644
--- a/core/src/main/scala/org/elasticmq/actor/queue/QueueActorMessageOps.scala
+++ b/core/src/main/scala/org/elasticmq/actor/queue/QueueActorMessageOps.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.actor.queue
 
-import akka.actor.Timers
+import org.apache.pekko.actor.Timers
 import org.elasticmq.actor.queue.operations._
 import org.elasticmq.actor.reply._
 import org.elasticmq.msg._
@@ -19,7 +19,7 @@ trait QueueActorMessageOps
   this: QueueActorStorage =>
 
   def nowProvider: NowProvider
-  def context: akka.actor.ActorContext
+  def context: org.apache.pekko.actor.ActorContext
 
   timers.startTimerWithFixedDelay(s"Timer: ${queueData.name}", DeduplicationIdsCleanup, 1.second)
 
diff --git a/core/src/main/scala/org/elasticmq/actor/queue/QueueActorStorage.scala b/core/src/main/scala/org/elasticmq/actor/queue/QueueActorStorage.scala
index 32770962..f021ab15 100644
--- a/core/src/main/scala/org/elasticmq/actor/queue/QueueActorStorage.scala
+++ b/core/src/main/scala/org/elasticmq/actor/queue/QueueActorStorage.scala
@@ -1,7 +1,7 @@
 package org.elasticmq.actor.queue
 
-import akka.actor.{ActorContext, ActorRef}
-import akka.util.Timeout
+import org.apache.pekko.actor.{ActorContext, ActorRef}
+import org.apache.pekko.util.Timeout
 import org.elasticmq.actor.reply._
 import org.elasticmq.util.{Logging, NowProvider}
 import org.elasticmq.{FifoDeduplicationIdsHistory, QueueData}
diff --git a/core/src/main/scala/org/elasticmq/actor/queue/QueueActorWaitForMessagesOps.scala b/core/src/main/scala/org/elasticmq/actor/queue/QueueActorWaitForMessagesOps.scala
index 5b19557f..8cb81d7c 100644
--- a/core/src/main/scala/org/elasticmq/actor/queue/QueueActorWaitForMessagesOps.scala
+++ b/core/src/main/scala/org/elasticmq/actor/queue/QueueActorWaitForMessagesOps.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.actor.queue
 
-import akka.actor.{ActorRef, Cancellable}
+import org.apache.pekko.actor.{ActorRef, Cancellable}
 import org.elasticmq.actor.reply._
 import org.elasticmq.msg.{QueueMessageMsg, ReceiveMessages, SendMessage, UpdateVisibilityTimeout}
 
diff --git a/core/src/main/scala/org/elasticmq/actor/queue/QueueEventListener.scala b/core/src/main/scala/org/elasticmq/actor/queue/QueueEventListener.scala
index ac3f9739..6ce67d45 100644
--- a/core/src/main/scala/org/elasticmq/actor/queue/QueueEventListener.scala
+++ b/core/src/main/scala/org/elasticmq/actor/queue/QueueEventListener.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.actor.queue
 
-import akka.actor.ActorRef
+import org.apache.pekko.actor.ActorRef
 import org.elasticmq.actor.reply.Replyable
 import org.elasticmq.{ElasticMQError, QueueData}
 
diff --git a/core/src/main/scala/org/elasticmq/actor/queue/operations/SendMessageOp.scala b/core/src/main/scala/org/elasticmq/actor/queue/operations/SendMessageOp.scala
index 43c95171..7d8c19ac 100644
--- a/core/src/main/scala/org/elasticmq/actor/queue/operations/SendMessageOp.scala
+++ b/core/src/main/scala/org/elasticmq/actor/queue/operations/SendMessageOp.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.actor.queue.operations
 
-import akka.actor.{ActorContext, ActorRef}
+import org.apache.pekko.actor.{ActorContext, ActorRef}
 import org.elasticmq.actor.queue.{InternalMessage, QueueActorStorage, QueueEvent}
 import org.elasticmq.msg.SendMessage
 import org.elasticmq.util.Logging
diff --git a/core/src/main/scala/org/elasticmq/actor/reply/ReplySupport.scala b/core/src/main/scala/org/elasticmq/actor/reply/ReplySupport.scala
index 96548091..df895831 100644
--- a/core/src/main/scala/org/elasticmq/actor/reply/ReplySupport.scala
+++ b/core/src/main/scala/org/elasticmq/actor/reply/ReplySupport.scala
@@ -1,14 +1,15 @@
 package org.elasticmq.actor.reply
 
-import akka.actor.ActorRef
-import akka.util.Timeout
+import org.apache.pekko.actor.ActorRef
+import org.apache.pekko.util.Timeout
+import org.apache.pekko.pattern
 import scala.concurrent.Future
 import scala.reflect.ClassTag
 
 trait ReplySupport {
   implicit class ReplyActorRef(actorRef: ActorRef) {
     def ?[T](message: Replyable[T])(implicit timeout: Timeout, tag: ClassTag[T]): Future[T] = {
-      akka.pattern.ask(actorRef, message).mapTo[T]
+      pattern.ask(actorRef, message).mapTo[T]
     }
   }
 
diff --git a/core/src/main/scala/org/elasticmq/actor/reply/ReplyingActor.scala b/core/src/main/scala/org/elasticmq/actor/reply/ReplyingActor.scala
index 15873ae2..e1e38954 100644
--- a/core/src/main/scala/org/elasticmq/actor/reply/ReplyingActor.scala
+++ b/core/src/main/scala/org/elasticmq/actor/reply/ReplyingActor.scala
@@ -1,7 +1,7 @@
 package org.elasticmq.actor.reply
 
-import akka.actor.Actor
-import akka.actor.Status.Failure
+import org.apache.pekko.actor.Actor
+import org.apache.pekko.actor.Status.Failure
 import scala.reflect.ClassTag
 import scala.language.higherKinds
 
diff --git a/core/src/main/scala/org/elasticmq/metrics/MBeanMetrics.scala b/core/src/main/scala/org/elasticmq/metrics/MBeanMetrics.scala
index fb4bdcdd..068c0d04 100644
--- a/core/src/main/scala/org/elasticmq/metrics/MBeanMetrics.scala
+++ b/core/src/main/scala/org/elasticmq/metrics/MBeanMetrics.scala
@@ -2,8 +2,8 @@ package org.elasticmq.metrics
 
 import java.util.concurrent.{Executors, TimeUnit}
 
-import akka.actor.ActorRef
-import akka.util.Timeout
+import org.apache.pekko.actor.ActorRef
+import org.apache.pekko.util.Timeout
 import javax.management.openmbean._
 import org.elasticmq.QueueStatistics
 import org.elasticmq.metrics.QueuesMetrics.{queueDataNames, queueStatisticsCompositeType, queueStatisticsTabularType}
diff --git a/core/src/main/scala/org/elasticmq/metrics/QueueMetricsOps.scala b/core/src/main/scala/org/elasticmq/metrics/QueueMetricsOps.scala
index 6cf717e9..78b28d58 100644
--- a/core/src/main/scala/org/elasticmq/metrics/QueueMetricsOps.scala
+++ b/core/src/main/scala/org/elasticmq/metrics/QueueMetricsOps.scala
@@ -1,7 +1,7 @@
 package org.elasticmq.metrics
 
-import akka.actor.ActorRef
-import akka.util.Timeout
+import org.apache.pekko.actor.ActorRef
+import org.apache.pekko.util.Timeout
 import org.elasticmq.QueueStatistics
 import org.elasticmq.actor.reply.ReplyActorRef
 import org.elasticmq.msg.{GetQueueStatistics, ListQueues, LookupQueue}
diff --git a/core/src/main/scala/org/elasticmq/msg/QueueManagerMsg.scala b/core/src/main/scala/org/elasticmq/msg/QueueManagerMsg.scala
index 85b62dd0..d11e5f37 100644
--- a/core/src/main/scala/org/elasticmq/msg/QueueManagerMsg.scala
+++ b/core/src/main/scala/org/elasticmq/msg/QueueManagerMsg.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.msg
 
-import akka.actor.ActorRef
+import org.apache.pekko.actor.ActorRef
 import org.elasticmq.actor.reply.Replyable
 import org.elasticmq.{CreateQueueData, ElasticMQError}
 
diff --git a/core/src/main/scala/org/elasticmq/msg/QueueMsg.scala b/core/src/main/scala/org/elasticmq/msg/QueueMsg.scala
index 9cba7e95..7e28e3da 100644
--- a/core/src/main/scala/org/elasticmq/msg/QueueMsg.scala
+++ b/core/src/main/scala/org/elasticmq/msg/QueueMsg.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.msg
 
-import akka.actor.ActorRef
+import org.apache.pekko.actor.ActorRef
 import org.elasticmq._
 import org.elasticmq.actor.queue.InternalMessage
 import org.elasticmq.actor.reply.Replyable
diff --git a/native-server/src/main/resources/META-INF/native-image/reflect-config.json b/native-server/src/main/resources/META-INF/native-image/reflect-config.json
index 02064e74..a070f552 100644
--- a/native-server/src/main/resources/META-INF/native-image/reflect-config.json
+++ b/native-server/src/main/resources/META-INF/native-image/reflect-config.json
@@ -18,10 +18,10 @@
   "name":"[J"
 },
 {
-  "name":"[Lakka.actor.LightArrayRevolverScheduler$TaskQueue;"
+  "name":"[Lorg.apache.pekko.actor.LightArrayRevolverScheduler$TaskQueue;"
 },
 {
-  "name":"[Lakka.stream.stage.GraphStageLogic;"
+  "name":"[Lorg.apache.pekko.stream.stage.GraphStageLogic;"
 },
 {
   "name":"[Ljava.lang.Class;"
@@ -48,246 +48,246 @@
   "name":"[Z"
 },
 {
-  "name":"akka.actor.ActorCell",
+  "name":"org.apache.pekko.actor.ActorCell",
   "fields":[
-    {"name":"akka$actor$dungeon$Children$$_childrenRefsDoNotCallMeDirectly"}, 
-    {"name":"akka$actor$dungeon$Children$$_functionRefsDoNotCallMeDirectly"}, 
-    {"name":"akka$actor$dungeon$Children$$_nextNameDoNotCallMeDirectly"}, 
-    {"name":"akka$actor$dungeon$Dispatch$$_mailboxDoNotCallMeDirectly"}
+    {"name":"pekko$actor$dungeon$Children$$_childrenRefsDoNotCallMeDirectly"},
+    {"name":"pekko$actor$dungeon$Children$$_functionRefsDoNotCallMeDirectly"},
+    {"name":"pekko$actor$dungeon$Children$$_nextNameDoNotCallMeDirectly"},
+    {"name":"pekko$actor$dungeon$Dispatch$$_mailboxDoNotCallMeDirectly"}
   ]
 },
 {
-  "name":"akka.actor.DefaultSupervisorStrategy",
+  "name":"org.apache.pekko.actor.DefaultSupervisorStrategy",
   "methods":[{"name":"<init>","parameterTypes":[] }]
 },
 {
-  "name":"akka.actor.LightArrayRevolverScheduler",
-  "methods":[{"name":"<init>","parameterTypes":["com.typesafe.config.Config","akka.event.LoggingAdapter","java.util.concurrent.ThreadFactory"] }]
+  "name":"org.apache.pekko.actor.LightArrayRevolverScheduler",
+  "methods":[{"name":"<init>","parameterTypes":["com.typesafe.config.Config","org.apache.pekko.event.LoggingAdapter","java.util.concurrent.ThreadFactory"] }]
 },
 {
-  "name":"akka.actor.LightArrayRevolverScheduler$TaskHolder",
+  "name":"org.apache.pekko.actor.LightArrayRevolverScheduler$TaskHolder",
   "fields":[{"name":"task"}]
 },
 {
-  "name":"akka.actor.LightArrayRevolverScheduler$TaskQueue[]"
+  "name":"org.apache.pekko.actor.LightArrayRevolverScheduler$TaskQueue[]"
 },
 {
-  "name":"akka.actor.LocalActorRefProvider",
-  "methods":[{"name":"<init>","parameterTypes":["java.lang.String","akka.actor.ActorSystem$Settings","akka.event.EventStream","akka.actor.DynamicAccess"] }]
+  "name":"org.apache.pekko.actor.LocalActorRefProvider",
+  "methods":[{"name":"<init>","parameterTypes":["java.lang.String","org.apache.pekko.actor.ActorSystem$Settings","org.apache.pekko.event.EventStream","org.apache.pekko.actor.DynamicAccess"] }]
 },
 {
-  "name":"akka.actor.LocalActorRefProvider$Guardian",
+  "name":"org.apache.pekko.actor.LocalActorRefProvider$Guardian",
   "allDeclaredConstructors":true
 },
 {
-  "name":"akka.actor.LocalActorRefProvider$SystemGuardian",
+  "name":"org.apache.pekko.actor.LocalActorRefProvider$SystemGuardian",
   "allDeclaredConstructors":true
 },
 {
-  "name":"akka.actor.Props$EmptyActor",
+  "name":"org.apache.pekko.actor.Props$EmptyActor",
   "methods":[{"name":"<init>","parameterTypes":[] }]
 },
 {
-  "name":"akka.actor.RepointableActorRef",
+  "name":"org.apache.pekko.actor.RepointableActorRef",
   "fields":[
     {"name":"_cellDoNotCallMeDirectly"}, 
     {"name":"_lookupDoNotCallMeDirectly"}
   ]
 },
 {
-  "name":"akka.dispatch.AbstractNodeQueue",
+  "name":"org.apache.pekko.dispatch.AbstractNodeQueue",
   "fields":[{"name":"_tailDoNotCallMeDirectly"}]
 },
 {
-  "name":"akka.dispatch.AbstractNodeQueue$Node",
+  "name":"org.apache.pekko.dispatch.AbstractNodeQueue$Node",
   "fields":[{"name":"_nextDoNotCallMeDirectly"}]
 },
 {
-  "name":"akka.dispatch.BoundedControlAwareMessageQueueSemantics"
+  "name":"org.apache.pekko.dispatch.BoundedControlAwareMessageQueueSemantics"
 },
 {
-  "name":"akka.dispatch.BoundedDequeBasedMessageQueueSemantics"
+  "name":"org.apache.pekko.dispatch.BoundedDequeBasedMessageQueueSemantics"
 },
 {
-  "name":"akka.dispatch.BoundedMessageQueueSemantics"
+  "name":"org.apache.pekko.dispatch.BoundedMessageQueueSemantics"
 },
 {
-  "name":"akka.dispatch.ControlAwareMessageQueueSemantics"
+  "name":"org.apache.pekko.dispatch.ControlAwareMessageQueueSemantics"
 },
 {
-  "name":"akka.dispatch.DequeBasedMessageQueueSemantics"
+  "name":"org.apache.pekko.dispatch.DequeBasedMessageQueueSemantics"
 },
 {
-  "name":"akka.dispatch.Mailbox",
+  "name":"org.apache.pekko.dispatch.Mailbox",
   "fields":[
     {"name":"_statusDoNotCallMeDirectly"}, 
     {"name":"_systemQueueDoNotCallMeDirectly"}
   ]
 },
 {
-  "name":"akka.dispatch.MessageDispatcher",
+  "name":"org.apache.pekko.dispatch.MessageDispatcher",
   "fields":[
     {"name":"_inhabitantsDoNotCallMeDirectly"}, 
     {"name":"_shutdownScheduleDoNotCallMeDirectly"}
   ]
 },
 {
-  "name":"akka.dispatch.MultipleConsumerSemantics"
+  "name":"org.apache.pekko.dispatch.MultipleConsumerSemantics"
 },
 {
-  "name":"akka.dispatch.UnboundedControlAwareMessageQueueSemantics"
+  "name":"org.apache.pekko.dispatch.UnboundedControlAwareMessageQueueSemantics"
 },
 {
-  "name":"akka.dispatch.UnboundedDequeBasedMessageQueueSemantics"
+  "name":"org.apache.pekko.dispatch.UnboundedDequeBasedMessageQueueSemantics"
 },
 {
-  "name":"akka.dispatch.UnboundedMailbox",
-  "methods":[{"name":"<init>","parameterTypes":["akka.actor.ActorSystem$Settings","com.typesafe.config.Config"] }]
+  "name":"org.apache.pekko.dispatch.UnboundedMailbox",
+  "methods":[{"name":"<init>","parameterTypes":["org.apache.pekko.actor.ActorSystem$Settings","com.typesafe.config.Config"] }]
 },
 {
-  "name":"akka.dispatch.UnboundedMessageQueueSemantics"
+  "name":"org.apache.pekko.dispatch.UnboundedMessageQueueSemantics"
 },
 {
-  "name":"akka.event.DeadLetterListener",
+  "name":"org.apache.pekko.event.DeadLetterListener",
   "methods":[{"name":"<init>","parameterTypes":[] }]
 },
 {
-  "name":"akka.event.DefaultLoggingFilter",
+  "name":"org.apache.pekko.event.DefaultLoggingFilter",
   "allDeclaredConstructors":true,
   "allPublicConstructors":true
 },
 {
-  "name":"akka.event.EventStreamUnsubscriber",
+  "name":"org.apache.pekko.event.EventStreamUnsubscriber",
   "allDeclaredConstructors":true
 },
 {
-  "name":"akka.event.LoggerMailboxType",
-  "methods":[{"name":"<init>","parameterTypes":["akka.actor.ActorSystem$Settings","com.typesafe.config.Config"] }]
+  "name":"org.apache.pekko.event.LoggerMailboxType",
+  "methods":[{"name":"<init>","parameterTypes":["org.apache.pekko.actor.ActorSystem$Settings","com.typesafe.config.Config"] }]
 },
 {
-  "name":"akka.event.LoggerMessageQueueSemantics"
+  "name":"org.apache.pekko.event.LoggerMessageQueueSemantics"
 },
 {
-  "name":"akka.event.Logging$DefaultLogger",
+  "name":"org.apache.pekko.event.Logging$DefaultLogger",
   "allDeclaredConstructors":true,
   "allPublicConstructors":true
 },
 {
-  "name":"akka.event.Logging$StdOutLogger",
+  "name":"org.apache.pekko.event.Logging$StdOutLogger",
   "allDeclaredConstructors":true,
   "allPublicConstructors":true
 },
 {
-  "name":"akka.event.slf4j.Slf4jLogger",
+  "name":"org.apache.pekko.event.slf4j.Slf4jLogger",
   "methods":[{"name":"<init>","parameterTypes":[] }]
 },
 {
-  "name":"akka.event.slf4j.Slf4jLoggingFilter",
-  "methods":[{"name":"<init>","parameterTypes":["akka.actor.ActorSystem$Settings","akka.event.EventStream"] }]
+  "name":"org.apache.pekko.event.slf4j.Slf4jLoggingFilter",
+  "methods":[{"name":"<init>","parameterTypes":["org.apache.pekko.actor.ActorSystem$Settings","org.apache.pekko.event.EventStream"] }]
 },
 {
-  "name":"akka.http.DefaultParsingErrorHandler$",
+  "name":"org.apache.pekko.http.DefaultParsingErrorHandler$",
   "methods":[{"name":"<init>","parameterTypes":[] }]
 },
 {
-  "name":"akka.http.impl.engine.client.PoolMasterActor",
+  "name":"org.apache.pekko.http.impl.engine.client.PoolMasterActor",
   "methods":[{"name":"<init>","parameterTypes":[] }]
 },
 {
-  "name":"akka.io.SelectionHandler",
+  "name":"org.apache.pekko.io.SelectionHandler",
   "allDeclaredConstructors":true
 },
 {
-  "name":"akka.io.TcpIncomingConnection",
+  "name":"org.apache.pekko.io.TcpIncomingConnection",
   "allDeclaredConstructors":true
 },
 {
-  "name":"akka.io.TcpListener",
+  "name":"org.apache.pekko.io.TcpListener",
   "allDeclaredConstructors":true
 },
 {
-  "name":"akka.io.TcpManager",
+  "name":"org.apache.pekko.io.TcpManager",
   "allDeclaredConstructors":true
 },
 {
-  "name":"akka.pattern.PromiseActorRef",
+  "name":"org.apache.pekko.pattern.PromiseActorRef",
   "fields":[
     {"name":"_stateDoNotCallMeDirectly"}, 
     {"name":"_watchedByDoNotCallMeDirectly"}
   ]
 },
 {
-  "name":"akka.routing.ConsistentHashingPool",
+  "name":"org.apache.pekko.routing.ConsistentHashingPool",
   "methods":[{"name":"<init>","parameterTypes":["com.typesafe.config.Config"] }]
 },
 {
-  "name":"akka.routing.RoundRobinPool",
+  "name":"org.apache.pekko.routing.RoundRobinPool",
   "methods":[{"name":"<init>","parameterTypes":["com.typesafe.config.Config"] }]
 },
 {
-  "name":"akka.routing.RoutedActorCell$RouterActorCreator",
+  "name":"org.apache.pekko.routing.RoutedActorCell$RouterActorCreator",
   "allDeclaredConstructors":true
 },
 {
-  "name":"akka.serialization.BooleanSerializer",
-  "methods":[{"name":"<init>","parameterTypes":["akka.actor.ExtendedActorSystem"] }]
+  "name":"org.apache.pekko.serialization.BooleanSerializer",
+  "methods":[{"name":"<init>","parameterTypes":["org.apache.pekko.actor.ExtendedActorSystem"] }]
 },
 {
-  "name":"akka.serialization.ByteArraySerializer",
-  "methods":[{"name":"<init>","parameterTypes":["akka.actor.ExtendedActorSystem"] }]
+  "name":"org.apache.pekko.serialization.ByteArraySerializer",
+  "methods":[{"name":"<init>","parameterTypes":["org.apache.pekko.actor.ExtendedActorSystem"] }]
 },
 {
-  "name":"akka.serialization.ByteStringSerializer",
-  "methods":[{"name":"<init>","parameterTypes":["akka.actor.ExtendedActorSystem"] }]
+  "name":"org.apache.pekko.serialization.ByteStringSerializer",
+  "methods":[{"name":"<init>","parameterTypes":["org.apache.pekko.actor.ExtendedActorSystem"] }]
 },
 {
-  "name":"akka.serialization.DisabledJavaSerializer",
-  "methods":[{"name":"<init>","parameterTypes":["akka.actor.ExtendedActorSystem"] }]
+  "name":"org.apache.pekko.serialization.DisabledJavaSerializer",
+  "methods":[{"name":"<init>","parameterTypes":["org.apache.pekko.actor.ExtendedActorSystem"] }]
 },
 {
-  "name":"akka.serialization.IntSerializer",
-  "methods":[{"name":"<init>","parameterTypes":["akka.actor.ExtendedActorSystem"] }]
+  "name":"org.apache.pekko.serialization.IntSerializer",
+  "methods":[{"name":"<init>","parameterTypes":["org.apache.pekko.actor.ExtendedActorSystem"] }]
 },
 {
-  "name":"akka.serialization.LongSerializer",
-  "methods":[{"name":"<init>","parameterTypes":["akka.actor.ExtendedActorSystem"] }]
+  "name":"org.apache.pekko.serialization.LongSerializer",
+  "methods":[{"name":"<init>","parameterTypes":["org.apache.pekko.actor.ExtendedActorSystem"] }]
 },
 {
-  "name":"akka.serialization.SerializationExtension$",
+  "name":"org.apache.pekko.serialization.SerializationExtension$",
   "fields":[{"name":"MODULE$"}]
 },
 {
-  "name":"akka.serialization.StringSerializer",
-  "methods":[{"name":"<init>","parameterTypes":["akka.actor.ExtendedActorSystem"] }]
+  "name":"org.apache.pekko.serialization.StringSerializer",
+  "methods":[{"name":"<init>","parameterTypes":["org.apache.pekko.actor.ExtendedActorSystem"] }]
 },
 {
-  "name":"akka.stream.SinkRef"
+  "name":"org.apache.pekko.stream.SinkRef"
 },
 {
-  "name":"akka.stream.SourceRef"
+  "name":"org.apache.pekko.stream.SourceRef"
 },
 {
-  "name":"akka.stream.SystemMaterializer$",
+  "name":"org.apache.pekko.stream.SystemMaterializer$",
   "fields":[{"name":"MODULE$"}]
 },
 {
-  "name":"akka.stream.impl.streamref.StreamRefsProtocol"
+  "name":"org.apache.pekko.stream.impl.streamref.StreamRefsProtocol"
 },
 {
-  "name":"akka.stream.serialization.StreamRefSerializer",
-  "methods":[{"name":"<init>","parameterTypes":["akka.actor.ExtendedActorSystem"] }]
+  "name":"org.apache.pekko.stream.serialization.StreamRefSerializer",
+  "methods":[{"name":"<init>","parameterTypes":["org.apache.pekko.actor.ExtendedActorSystem"] }]
 },
 {
-  "name":"akka.stream.stage.GraphStageLogic[]"
+  "name":"org.apache.pekko.stream.stage.GraphStageLogic[]"
 },
 {
-  "name":"akka.util.ByteString$ByteString1"
+  "name":"org.apache.pekko.util.ByteString$ByteString1"
 },
 {
-  "name":"akka.util.ByteString$ByteString1C"
+  "name":"org.apache.pekko.util.ByteString$ByteString1C"
 },
 {
-  "name":"akka.util.ByteString$ByteStrings"
+  "name":"org.apache.pekko.util.ByteString$ByteStrings"
 },
 {
   "name":"boolean[]"
diff --git a/native-server/src/main/resources/META-INF/native-image/resource-config.json b/native-server/src/main/resources/META-INF/native-image/resource-config.json
index 87b8d8f9..a37f341d 100644
--- a/native-server/src/main/resources/META-INF/native-image/resource-config.json
+++ b/native-server/src/main/resources/META-INF/native-image/resource-config.json
@@ -14,7 +14,7 @@
       "pattern":"\\QMETA-INF/services/org.slf4j.spi.SLF4JServiceProvider\\E"
     }, 
     {
-      "pattern":"\\Qakka-http-version.conf\\E"
+      "pattern":"\\Qpekko-http-version.conf\\E"
     }, 
     {
       "pattern":"\\Qapplication.conf\\E"
diff --git a/native-server/src/main/resources/application.conf b/native-server/src/main/resources/application.conf
index 44e5aa56..e5de822d 100644
--- a/native-server/src/main/resources/application.conf
+++ b/native-server/src/main/resources/application.conf
@@ -1,4 +1,4 @@
-akka {
+pekko {
   library-extensions = []
 }
 
diff --git a/persistence/persistence-file/src/main/scala/org/elasticmq/persistence/file/ConfigBasedQueuePersistenceActor.scala b/persistence/persistence-file/src/main/scala/org/elasticmq/persistence/file/ConfigBasedQueuePersistenceActor.scala
index f427baa4..d3716ddd 100644
--- a/persistence/persistence-file/src/main/scala/org/elasticmq/persistence/file/ConfigBasedQueuePersistenceActor.scala
+++ b/persistence/persistence-file/src/main/scala/org/elasticmq/persistence/file/ConfigBasedQueuePersistenceActor.scala
@@ -1,7 +1,7 @@
 package org.elasticmq.persistence.file
 
-import akka.actor.{Actor, ActorRef}
-import akka.util.Timeout
+import org.apache.pekko.actor.{Actor, ActorRef}
+import org.apache.pekko.util.Timeout
 import org.elasticmq.actor.queue._
 import org.elasticmq.actor.reply._
 import org.elasticmq.msg.CreateQueue
diff --git a/persistence/persistence-sql/src/main/scala/org/elasticmq/persistence/sql/SqlQueuePersistenceActor.scala b/persistence/persistence-sql/src/main/scala/org/elasticmq/persistence/sql/SqlQueuePersistenceActor.scala
index 7dcf3696..14c29b69 100644
--- a/persistence/persistence-sql/src/main/scala/org/elasticmq/persistence/sql/SqlQueuePersistenceActor.scala
+++ b/persistence/persistence-sql/src/main/scala/org/elasticmq/persistence/sql/SqlQueuePersistenceActor.scala
@@ -1,7 +1,7 @@
 package org.elasticmq.persistence.sql
 
-import akka.actor.{Actor, ActorRef}
-import akka.util.Timeout
+import org.apache.pekko.actor.{Actor, ActorRef}
+import org.apache.pekko.util.Timeout
 import org.elasticmq.ElasticMQError
 import org.elasticmq.actor.queue._
 import org.elasticmq.actor.reply._
diff --git a/rest/rest-sqs/src/main/resources/application.conf b/rest/rest-sqs/src/main/resources/application.conf
index 8d53c56b..073373ea 100644
--- a/rest/rest-sqs/src/main/resources/application.conf
+++ b/rest/rest-sqs/src/main/resources/application.conf
@@ -1,17 +1,17 @@
 # SQS Authorization header has an illegal format
-akka.http.server.parsing.illegal-header-warnings = off
+pekko.http.server.parsing.illegal-header-warnings = off
 
-akka {
-  loggers = ["akka.event.slf4j.Slf4jLogger"]
+pekko {
+  loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"]
   loglevel = "DEBUG"
-  logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
+  logging-filter = "org.apache.pekko.event.slf4j.Slf4jLoggingFilter"
   logger-startup-timeout = 30s
 
   log-dead-letters-during-shutdown = false
 }
 
 # The SQS maximum message wait time is 20 seconds. We need slightly more than that to complete the request.
-akka.http.server.request-timeout = 21 s
+pekko.http.server.request-timeout = 21 s
 
 # Amazon SQS allows 256KB message payloads
-akka.http.server.parsing.max-uri-length = 256k
+pekko.http.server.parsing.max-uri-length = 256k
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/ActorSystemModule.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/ActorSystemModule.scala
index adf27b26..ca472245 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/ActorSystemModule.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/ActorSystemModule.scala
@@ -1,8 +1,8 @@
 package org.elasticmq.rest.sqs
 
-import akka.actor.ActorSystem
-import akka.stream.Materializer
-import akka.util.Timeout
+import org.apache.pekko.actor.ActorSystem
+import org.apache.pekko.stream.Materializer
+import org.apache.pekko.util.Timeout
 
 trait ActorSystemModule {
   implicit def actorSystem: ActorSystem
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/ChangeMessageVisibilityDirectives.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/ChangeMessageVisibilityDirectives.scala
index de20aa5a..0fb6fb8d 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/ChangeMessageVisibilityDirectives.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/ChangeMessageVisibilityDirectives.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.rest.sqs
 
-import akka.http.scaladsl.model.HttpEntity
+import org.apache.pekko.http.scaladsl.model.HttpEntity
 import org.elasticmq.actor.reply._
 import org.elasticmq.msg.UpdateVisibilityTimeout
 import org.elasticmq.rest.sqs.Action.ChangeMessageVisibility
@@ -9,7 +9,7 @@ import org.elasticmq.rest.sqs.directives.ElasticMQDirectives
 import org.elasticmq.{DeliveryReceipt, MillisVisibilityTimeout}
 import spray.json.RootJsonFormat
 import spray.json.DefaultJsonProtocol._
-import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._
+import org.apache.pekko.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._
 import org.elasticmq.rest.sqs.model.RequestPayload
 
 trait ChangeMessageVisibilityDirectives { this: ElasticMQDirectives with ResponseMarshaller =>
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/MarshallerDependencies.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/MarshallerDependencies.scala
index 9209dbcf..2575c29f 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/MarshallerDependencies.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/MarshallerDependencies.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.rest.sqs
 
-import akka.http.scaladsl.server.Directives._
+import org.apache.pekko.http.scaladsl.server.Directives._
 import org.elasticmq.rest.sqs.Constants.SqsDefaultVersion
 import scala.language.postfixOps
 
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/QueueAttributesDirectives.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/QueueAttributesDirectives.scala
index 779a5526..1c5928ed 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/QueueAttributesDirectives.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/QueueAttributesDirectives.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.rest.sqs
 
-import akka.http.scaladsl.server.Route
+import org.apache.pekko.http.scaladsl.server.Route
 import org.elasticmq.rest.sqs.Action.{GetQueueAttributes, SetQueueAttributes}
 import org.elasticmq.rest.sqs.AttributesModule.attributesToXmlConverter
 import org.elasticmq.rest.sqs.Constants._
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/QueueAttributesOps.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/QueueAttributesOps.scala
index c7134461..00af6486 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/QueueAttributesOps.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/QueueAttributesOps.scala
@@ -1,7 +1,7 @@
 package org.elasticmq.rest.sqs
 
-import akka.actor.ActorRef
-import akka.util.Timeout
+import org.apache.pekko.actor.ActorRef
+import org.apache.pekko.util.Timeout
 import org.elasticmq.actor.reply._
 import org.elasticmq.msg._
 import org.elasticmq.rest.sqs.Constants._
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/ResponseMarshaller.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/ResponseMarshaller.scala
index e2205220..71a48060 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/ResponseMarshaller.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/ResponseMarshaller.scala
@@ -1,11 +1,11 @@
 package org.elasticmq.rest.sqs
 
-import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._
+import org.apache.pekko.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._
 import spray.json.RootJsonFormat
-import akka.http.scaladsl.marshalling.Marshaller
-import akka.http.scaladsl.model.ContentTypes._
-import akka.http.scaladsl.model.{HttpEntity, RequestEntity}
-import akka.util.ByteString
+import org.apache.pekko.http.scaladsl.marshalling.Marshaller
+import org.apache.pekko.http.scaladsl.model.ContentTypes._
+import org.apache.pekko.http.scaladsl.model.{HttpEntity, RequestEntity}
+import org.apache.pekko.util.ByteString
 import org.elasticmq.rest.sqs.directives.RespondDirectives
 
 import scala.xml.{Elem, Null, UnprefixedAttribute}
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/SQSRestServerBuilder.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/SQSRestServerBuilder.scala
index 04db70fe..0d117d60 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/SQSRestServerBuilder.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/SQSRestServerBuilder.scala
@@ -1,10 +1,10 @@
 package org.elasticmq.rest.sqs
 
-import akka.actor.{ActorRef, ActorSystem, Props}
-import akka.http.scaladsl.Http
-import akka.http.scaladsl.server.{Directive1, Directives}
-import akka.stream.ActorMaterializer
-import akka.util.Timeout
+import org.apache.pekko.actor.{ActorRef, ActorSystem, Props}
+import org.apache.pekko.http.scaladsl.Http
+import org.apache.pekko.http.scaladsl.server.{Directive1, Directives}
+import org.apache.pekko.stream.ActorMaterializer
+import org.apache.pekko.util.Timeout
 import com.typesafe.config.ConfigFactory
 import org.elasticmq._
 import org.elasticmq.actor.QueueManagerActor
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/SendMessageBatchDirectives.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/SendMessageBatchDirectives.scala
index d0a9a524..4d6faf3c 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/SendMessageBatchDirectives.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/SendMessageBatchDirectives.scala
@@ -1,7 +1,7 @@
 package org.elasticmq.rest.sqs
 
 import Constants._
-import akka.http.scaladsl.server.Route
+import org.apache.pekko.http.scaladsl.server.Route
 import org.elasticmq.MessageAttribute
 import org.elasticmq.rest.sqs.Action.SendMessageBatch
 import org.elasticmq.rest.sqs.ParametersUtil.ParametersParser
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/SendMessageDirectives.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/SendMessageDirectives.scala
index 5063eff6..54bb7b02 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/SendMessageDirectives.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/SendMessageDirectives.scala
@@ -1,7 +1,7 @@
 package org.elasticmq.rest.sqs
 
-import akka.actor.ActorRef
-import akka.http.scaladsl.server.Route
+import org.apache.pekko.actor.ActorRef
+import org.apache.pekko.http.scaladsl.server.Route
 import org.elasticmq._
 import org.elasticmq.actor.reply._
 import org.elasticmq.msg.SendMessage
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/AWSProtocolDirectives.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/AWSProtocolDirectives.scala
index 13c35ac9..6bd7027a 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/AWSProtocolDirectives.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/AWSProtocolDirectives.scala
@@ -1,7 +1,7 @@
 package org.elasticmq.rest.sqs.directives
 
-import akka.http.scaladsl.model.{ContentType, MediaType}
-import akka.http.scaladsl.server.Directives.extractRequest
+import org.apache.pekko.http.scaladsl.model.{ContentType, MediaType}
+import org.apache.pekko.http.scaladsl.server.Directives.extractRequest
 import org.elasticmq.rest.sqs.AWSProtocol
 
 trait AWSProtocolDirectives {
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/AnyParamDirectives.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/AnyParamDirectives.scala
index a3722b32..93a24317 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/AnyParamDirectives.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/AnyParamDirectives.scala
@@ -1,8 +1,8 @@
 package org.elasticmq.rest.sqs.directives
 
-import akka.http.scaladsl.model.{FormData, HttpRequest}
-import akka.http.scaladsl.server.{Directives, Route, UnsupportedRequestContentTypeRejection}
-import akka.stream.Materializer
+import org.apache.pekko.http.scaladsl.model.{FormData, HttpRequest}
+import org.apache.pekko.http.scaladsl.server.{Directives, Route, UnsupportedRequestContentTypeRejection}
+import org.apache.pekko.stream.Materializer
 import org.elasticmq.rest.sqs.{AWSProtocol, ContextPathModule, QueueURLModule}
 import org.elasticmq.rest.sqs.Constants.{QueueNameParameter, QueueUrlParameter}
 import org.elasticmq.rest.sqs.directives.QueueDirectives.AccountIdRegex
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/ElasticMQDirectives.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/ElasticMQDirectives.scala
index 69c1ad57..899b54ec 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/ElasticMQDirectives.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/ElasticMQDirectives.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.rest.sqs.directives
 
-import akka.http.scaladsl.server.{Directives, Route}
+import org.apache.pekko.http.scaladsl.server.{Directives, Route}
 import org.elasticmq.rest.sqs.{ActorSystemModule, ContextPathModule, QueueManagerActorModule, QueueURLModule}
 import org.elasticmq.util.Logging
 
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/ExceptionDirectives.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/ExceptionDirectives.scala
index 506e3ac4..9925f26f 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/ExceptionDirectives.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/ExceptionDirectives.scala
@@ -1,13 +1,13 @@
 package org.elasticmq.rest.sqs.directives
 
-import akka.http.scaladsl.model.{HttpResponse, StatusCodes}
-import akka.http.scaladsl.server.{Directive0, Directives, ExceptionHandler, Route}
+import org.apache.pekko.http.scaladsl.model.{HttpResponse, StatusCodes}
+import org.apache.pekko.http.scaladsl.server.{Directive0, Directives, ExceptionHandler, Route}
 import org.elasticmq.rest.sqs.Constants._
 import org.elasticmq.rest.sqs.{AWSProtocol, SQSException}
 import org.elasticmq.util.Logging
 import spray.json.DefaultJsonProtocol._
 import spray.json.RootJsonFormat
-import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._
+import org.apache.pekko.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._
 
 trait ExceptionDirectives extends Logging {
   this: Directives with RespondDirectives =>
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/FutureDirectives.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/FutureDirectives.scala
index 9da2c82e..168c83b1 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/FutureDirectives.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/FutureDirectives.scala
@@ -1,10 +1,10 @@
 package org.elasticmq.rest.sqs.directives
 
-import akka.http.scaladsl.server.Route
+import org.apache.pekko.http.scaladsl.server.Route
 
 import scala.concurrent.Future
 import org.elasticmq.rest.sqs.ActorSystemModule
-import akka.http.scaladsl.server.Directives._
+import org.apache.pekko.http.scaladsl.server.Directives._
 
 import scala.util.{Failure, Success}
 
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/QueueDirectives.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/QueueDirectives.scala
index e12c45d5..deebc123 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/QueueDirectives.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/QueueDirectives.scala
@@ -1,9 +1,9 @@
 package org.elasticmq.rest.sqs.directives
 
-import akka.actor.ActorRef
-import akka.http.scaladsl.model.Uri
-import akka.http.scaladsl.server.PathMatcher.{Matched, Unmatched}
-import akka.http.scaladsl.server._
+import org.apache.pekko.actor.ActorRef
+import org.apache.pekko.http.scaladsl.model.Uri
+import org.apache.pekko.http.scaladsl.server.PathMatcher.{Matched, Unmatched}
+import org.apache.pekko.http.scaladsl.server._
 import org.elasticmq.QueueData
 import org.elasticmq.actor.reply._
 import org.elasticmq.msg.{GetQueueData, LookupQueue}
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/RejectionDirectives.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/RejectionDirectives.scala
index d61c6e80..862aba29 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/RejectionDirectives.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/RejectionDirectives.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.rest.sqs.directives
 
-import akka.http.scaladsl.server.{Directive0, Directives, Rejection, RejectionHandler}
+import org.apache.pekko.http.scaladsl.server.{Directive0, Directives, Rejection, RejectionHandler}
 import org.elasticmq.rest.sqs.{AWSProtocol, SQSException}
 
 trait RejectionDirectives {
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/RespondDirectives.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/RespondDirectives.scala
index 2c1b47e7..b5886eea 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/RespondDirectives.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/RespondDirectives.scala
@@ -1,12 +1,12 @@
 package org.elasticmq.rest.sqs.directives
 
-import akka.http.scaladsl.model.ContentTypes._
-import akka.http.scaladsl.model.HttpEntity
-import akka.http.scaladsl.server.{Directives, RequestContext, Route}
+import org.apache.pekko.http.scaladsl.model.ContentTypes._
+import org.apache.pekko.http.scaladsl.model.HttpEntity
+import org.apache.pekko.http.scaladsl.server.{Directives, RequestContext, Route}
 import org.elasticmq.rest.sqs.Constants._
 
 import scala.language.postfixOps
-import akka.http.scaladsl.server
+import org.apache.pekko.http.scaladsl.server
 import org.elasticmq.rest.sqs.{AWSProtocol, MarshallerDependencies}
 import org.elasticmq.rest.sqs.Constants.EmptyRequestId
 
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/UnmatchedActionRoutes.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/UnmatchedActionRoutes.scala
index 5c62add4..71f51ceb 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/UnmatchedActionRoutes.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/directives/UnmatchedActionRoutes.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.rest.sqs.directives
 
-import akka.http.scaladsl.server.{Directives, Route}
+import org.apache.pekko.http.scaladsl.server.{Directives, Route}
 import org.elasticmq.rest.sqs.model.RequestPayload
 import org.elasticmq.rest.sqs.{Action, AnyParams, SQSException}
 import org.elasticmq.util.Logging
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/model/JsonData.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/model/JsonData.scala
index e1110a48..49aa8055 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/model/JsonData.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/model/JsonData.scala
@@ -1,9 +1,9 @@
 package org.elasticmq.rest.sqs.model
 
-import akka.http.scaladsl.marshalling.Marshaller
-import akka.http.scaladsl.model.{ContentTypeRange, HttpEntity, RequestEntity}
-import akka.http.scaladsl.unmarshalling.{FromEntityUnmarshaller, Unmarshaller}
-import akka.util.ByteString
+import org.apache.pekko.http.scaladsl.marshalling.Marshaller
+import org.apache.pekko.http.scaladsl.model.{ContentTypeRange, HttpEntity, RequestEntity}
+import org.apache.pekko.http.scaladsl.unmarshalling.{FromEntityUnmarshaller, Unmarshaller}
+import org.apache.pekko.util.ByteString
 import org.elasticmq.rest.sqs.directives.AmzJsonProtocol
 
 import scala.concurrent.Future
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/model/RequestPayload.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/model/RequestPayload.scala
index 8bc2518a..a6f93ef7 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/model/RequestPayload.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/model/RequestPayload.scala
@@ -1,7 +1,7 @@
 package org.elasticmq.rest.sqs.model
 
-import akka.http.scaladsl.server.Directive0
-import akka.http.scaladsl.server.Directives._
+import org.apache.pekko.http.scaladsl.server.Directive0
+import org.apache.pekko.http.scaladsl.server.Directives._
 import org.elasticmq.rest.sqs.{Action, FlatParamsReader, SQSException}
 import spray.json.{JsObject, RootJsonFormat}
 
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/package.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/package.scala
index 43522528..fa447262 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/package.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/package.scala
@@ -1,7 +1,7 @@
 package org.elasticmq.rest
 
-import akka.http.scaladsl.server.{Directive0, Directive1, MissingQueryParamRejection}
-import akka.http.scaladsl.server.Directives._
+import org.apache.pekko.http.scaladsl.server.{Directive0, Directive1, MissingQueryParamRejection}
+import org.apache.pekko.http.scaladsl.server.Directives._
 
 package object sqs {
   type AnyParams = Map[String, String]
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/stats/StatisticsDirectives.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/stats/StatisticsDirectives.scala
index c14ad35b..087ab8d1 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/stats/StatisticsDirectives.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/stats/StatisticsDirectives.scala
@@ -1,10 +1,10 @@
 package org.elasticmq.rest.stats
 
-import akka.actor.ActorRef
-import akka.http.scaladsl.model.StatusCodes.NotFound
-import akka.http.scaladsl.model._
-import akka.http.scaladsl.model.headers.`Access-Control-Allow-Origin`
-import akka.http.scaladsl.server.Route
+import org.apache.pekko.actor.ActorRef
+import org.apache.pekko.http.scaladsl.model.StatusCodes.NotFound
+import org.apache.pekko.http.scaladsl.model._
+import org.apache.pekko.http.scaladsl.model.headers.`Access-Control-Allow-Origin`
+import org.apache.pekko.http.scaladsl.server.Route
 import org.elasticmq.metrics.QueueMetricsOps
 import org.elasticmq.rest.sqs.QueueAttributesOps
 import org.elasticmq.rest.sqs.directives.ElasticMQDirectives
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/stats/StatisticsJsonFormat.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/stats/StatisticsJsonFormat.scala
index 714b297c..603814af 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/stats/StatisticsJsonFormat.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/stats/StatisticsJsonFormat.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.rest.stats
 
-import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport
+import org.apache.pekko.http.scaladsl.marshallers.sprayjson.SprayJsonSupport
 import spray.json.{DefaultJsonProtocol, JsNumber, JsObject, JsString, JsValue, RootJsonFormat, deserializationError}
 
 trait StatisticsJsonFormat extends SprayJsonSupport with DefaultJsonProtocol {
diff --git a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/stats/StatisticsRestServerBuilder.scala b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/stats/StatisticsRestServerBuilder.scala
index c4759534..db2cd08d 100644
--- a/rest/rest-sqs/src/main/scala/org/elasticmq/rest/stats/StatisticsRestServerBuilder.scala
+++ b/rest/rest-sqs/src/main/scala/org/elasticmq/rest/stats/StatisticsRestServerBuilder.scala
@@ -1,10 +1,10 @@
 package org.elasticmq.rest.stats
 
 import java.util.concurrent.TimeUnit
-import akka.actor.{ActorRef, ActorSystem}
-import akka.http.scaladsl.Http
-import akka.stream.ActorMaterializer
-import akka.util.Timeout
+import org.apache.pekko.actor.{ActorRef, ActorSystem}
+import org.apache.pekko.http.scaladsl.Http
+import org.apache.pekko.stream.ActorMaterializer
+import org.apache.pekko.util.Timeout
 import org.elasticmq.rest.sqs.QueueAttributesOps
 import org.elasticmq.rest.sqs.directives.{AWSProtocolDirectives, ElasticMQDirectives}
 import org.elasticmq.util.{Logging, NowProvider}
diff --git a/server/src/main/scala/org/elasticmq/server/ElasticMQServer.scala b/server/src/main/scala/org/elasticmq/server/ElasticMQServer.scala
index 1fc2fbc6..281b8f82 100644
--- a/server/src/main/scala/org/elasticmq/server/ElasticMQServer.scala
+++ b/server/src/main/scala/org/elasticmq/server/ElasticMQServer.scala
@@ -1,7 +1,7 @@
 package org.elasticmq.server
 
-import akka.actor.{ActorRef, ActorSystem, Props, Terminated}
-import akka.util.Timeout
+import org.apache.pekko.actor.{ActorRef, ActorSystem, Props, Terminated}
+import org.apache.pekko.util.Timeout
 import org.elasticmq.ElasticMQError
 import org.elasticmq.actor.QueueManagerActor
 import org.elasticmq.actor.queue.QueueEvent
diff --git a/server/src/main/scala/org/elasticmq/server/Main.scala b/server/src/main/scala/org/elasticmq/server/Main.scala
index 0cef6922..3d7f2d68 100644
--- a/server/src/main/scala/org/elasticmq/server/Main.scala
+++ b/server/src/main/scala/org/elasticmq/server/Main.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.server
 
-import akka.actor.Terminated
+import org.apache.pekko.actor.Terminated
 import com.typesafe.config.ConfigFactory
 import org.elasticmq.server.config.ElasticMQServerConfig
 import org.elasticmq.util.Logging


Test patch:
diff --git a/core/src/test/scala/org/elasticmq/actor/test/ActorTest.scala b/core/src/test/scala/org/elasticmq/actor/test/ActorTest.scala
index 2662dfc5..2a49e235 100644
--- a/core/src/test/scala/org/elasticmq/actor/test/ActorTest.scala
+++ b/core/src/test/scala/org/elasticmq/actor/test/ActorTest.scala
@@ -1,8 +1,8 @@
 package org.elasticmq.actor.test
 
-import akka.actor.ActorSystem
-import akka.testkit.TestKit
-import akka.util.Timeout
+import org.apache.pekko.actor.ActorSystem
+import org.apache.pekko.testkit.TestKit
+import org.apache.pekko.util.Timeout
 import org.scalatest.concurrent.ScalaFutures
 import org.scalatest.BeforeAndAfterAll
 
diff --git a/core/src/test/scala/org/elasticmq/actor/test/QueueManagerForEachTest.scala b/core/src/test/scala/org/elasticmq/actor/test/QueueManagerForEachTest.scala
index bfe7711d..baf66442 100644
--- a/core/src/test/scala/org/elasticmq/actor/test/QueueManagerForEachTest.scala
+++ b/core/src/test/scala/org/elasticmq/actor/test/QueueManagerForEachTest.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.actor.test
 
-import akka.actor.{ActorRef, ActorSystem, Props}
+import org.apache.pekko.actor.{ActorRef, ActorSystem, Props}
 import org.elasticmq.StrictSQSLimits
 import org.elasticmq.actor.QueueManagerActor
 import org.elasticmq.util.MutableNowProvider
diff --git a/core/src/test/scala/org/elasticmq/actor/test/QueueManagerWithListenerForEachTest.scala b/core/src/test/scala/org/elasticmq/actor/test/QueueManagerWithListenerForEachTest.scala
index 542f80bc..742230ac 100644
--- a/core/src/test/scala/org/elasticmq/actor/test/QueueManagerWithListenerForEachTest.scala
+++ b/core/src/test/scala/org/elasticmq/actor/test/QueueManagerWithListenerForEachTest.scala
@@ -1,7 +1,7 @@
 package org.elasticmq.actor.test
 
-import akka.actor.{ActorRef, ActorSystem, Props}
-import akka.testkit.{TestActor, TestActors, TestProbe}
+import org.apache.pekko.actor.{ActorRef, ActorSystem, Props}
+import org.apache.pekko.testkit.{TestActor, TestActors, TestProbe}
 import org.elasticmq.StrictSQSLimits
 import org.elasticmq.actor.QueueManagerActor
 import org.elasticmq.actor.queue.{OperationSuccessful, QueueEvent}
diff --git a/performance-tests/src/test/scala/org/elasticmq/performance/LocalPerformanceTest.scala b/performance-tests/src/test/scala/org/elasticmq/performance/LocalPerformanceTest.scala
index 623d4cf6..8dc3c320 100644
--- a/performance-tests/src/test/scala/org/elasticmq/performance/LocalPerformanceTest.scala
+++ b/performance-tests/src/test/scala/org/elasticmq/performance/LocalPerformanceTest.scala
@@ -1,7 +1,7 @@
 package org.elasticmq.performance
 
-import akka.actor.{ActorRef, ActorSystem, Props}
-import akka.util.Timeout
+import org.apache.pekko.actor.{ActorRef, ActorSystem, Props}
+import org.apache.pekko.util.Timeout
 import com.amazonaws.auth.{AWSStaticCredentialsProvider, BasicAWSCredentials}
 import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration
 import com.amazonaws.services.sqs.model.{
diff --git a/rest/rest-sqs-testing-amazon-java-sdk/src/test/resources/application.conf b/rest/rest-sqs-testing-amazon-java-sdk/src/test/resources/application.conf
index 29fb0011..384b37da 100644
--- a/rest/rest-sqs-testing-amazon-java-sdk/src/test/resources/application.conf
+++ b/rest/rest-sqs-testing-amazon-java-sdk/src/test/resources/application.conf
@@ -1,4 +1,4 @@
-akka {
+pekko {
     loglevel = "INFO"
 }
 
@@ -6,7 +6,7 @@ elasticmq {
     debug = true
 }
 
-akka.http {
+pekko.http {
     server {
         bind-timeout = 10s
     }
diff --git a/rest/rest-sqs-testing-amazon-java-sdk/src/test/scala/org/elasticmq/rest/sqs/AmazonJavaSdkTestSuite.scala b/rest/rest-sqs-testing-amazon-java-sdk/src/test/scala/org/elasticmq/rest/sqs/AmazonJavaSdkTestSuite.scala
index a6434ca8..46947cf1 100644
--- a/rest/rest-sqs-testing-amazon-java-sdk/src/test/scala/org/elasticmq/rest/sqs/AmazonJavaSdkTestSuite.scala
+++ b/rest/rest-sqs-testing-amazon-java-sdk/src/test/scala/org/elasticmq/rest/sqs/AmazonJavaSdkTestSuite.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.rest.sqs
 
-import akka.http.scaladsl.model.StatusCodes
+import org.apache.pekko.http.scaladsl.model.StatusCodes
 import com.amazonaws.AmazonServiceException
 import com.amazonaws.services.sqs.AmazonSQS
 import com.amazonaws.services.sqs.model._
diff --git a/rest/rest-sqs-testing-amazon-java-sdk/src/test/scala/org/elasticmq/rest/sqs/SqlQueuePersistenceServer.scala b/rest/rest-sqs-testing-amazon-java-sdk/src/test/scala/org/elasticmq/rest/sqs/SqlQueuePersistenceServer.scala
index 208b8f31..ae2ec3b6 100644
--- a/rest/rest-sqs-testing-amazon-java-sdk/src/test/scala/org/elasticmq/rest/sqs/SqlQueuePersistenceServer.scala
+++ b/rest/rest-sqs-testing-amazon-java-sdk/src/test/scala/org/elasticmq/rest/sqs/SqlQueuePersistenceServer.scala
@@ -1,7 +1,7 @@
 package org.elasticmq.rest.sqs
 
-import akka.actor.{ActorRef, ActorSystem, Props}
-import akka.util.Timeout
+import org.apache.pekko.actor.{ActorRef, ActorSystem, Props}
+import org.apache.pekko.util.Timeout
 import com.amazonaws.auth.{AWSStaticCredentialsProvider, BasicAWSCredentials}
 import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration
 import com.amazonaws.services.sqs.{AmazonSQS, AmazonSQSClientBuilder}
diff --git a/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/RedrivePolicyJsonTest.scala b/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/RedrivePolicyJsonTest.scala
index 30327ff2..576e3a1c 100644
--- a/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/RedrivePolicyJsonTest.scala
+++ b/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/RedrivePolicyJsonTest.scala
@@ -1,6 +1,6 @@
 package org.elasticmq.rest.sqs
 
-import akka.http.scaladsl.testkit.ScalatestRouteTest
+import org.apache.pekko.http.scaladsl.testkit.ScalatestRouteTest
 import org.elasticmq.rest.sqs.model.{GenericRedrivePolicy, RedrivePolicy}
 import org.elasticmq.rest.sqs.model.RedrivePolicy.BackwardCompatibleRedrivePolicy
 import spray.json._
diff --git a/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/directives/AnyParamDirectivesTest.scala b/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/directives/AnyParamDirectivesTest.scala
index a831ff0c..67d35109 100644
--- a/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/directives/AnyParamDirectivesTest.scala
+++ b/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/directives/AnyParamDirectivesTest.scala
@@ -1,9 +1,9 @@
 package org.elasticmq.rest.sqs.directives
 
-import akka.http.scaladsl.model.FormData
-import akka.http.scaladsl.model.headers.RawHeader
-import akka.http.scaladsl.server.Directives
-import akka.http.scaladsl.testkit.ScalatestRouteTest
+import org.apache.pekko.http.scaladsl.model.FormData
+import org.apache.pekko.http.scaladsl.model.headers.RawHeader
+import org.apache.pekko.http.scaladsl.server.Directives
+import org.apache.pekko.http.scaladsl.testkit.ScalatestRouteTest
 import org.elasticmq.NodeAddress
 import org.elasticmq.rest.sqs.{AWSProtocol, ContextPathModule, QueueURLModule}
 import org.elasticmq.rest.sqs.model.JsonData
diff --git a/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/directives/QueueDirectivesTest.scala b/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/directives/QueueDirectivesTest.scala
index 00f4803b..e4d6563f 100644
--- a/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/directives/QueueDirectivesTest.scala
+++ b/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/directives/QueueDirectivesTest.scala
@@ -1,8 +1,8 @@
 package org.elasticmq.rest.sqs.directives
-import akka.actor.{ActorRef, ActorSystem, Props}
-import akka.http.scaladsl.server.Directives
-import akka.http.scaladsl.testkit.ScalatestRouteTest
-import akka.util.Timeout
+import org.apache.pekko.actor.{ActorRef, ActorSystem, Props}
+import org.apache.pekko.http.scaladsl.server.Directives
+import org.apache.pekko.http.scaladsl.testkit.ScalatestRouteTest
+import org.apache.pekko.util.Timeout
 import org.elasticmq.actor.QueueManagerActor
 import org.elasticmq.actor.reply._
 import org.elasticmq.msg.CreateQueue
diff --git a/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/directives/QueueDirectivesWithContextPathTest.scala b/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/directives/QueueDirectivesWithContextPathTest.scala
index d624964d..8996bd7a 100644
--- a/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/directives/QueueDirectivesWithContextPathTest.scala
+++ b/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/directives/QueueDirectivesWithContextPathTest.scala
@@ -1,9 +1,9 @@
 package org.elasticmq.rest.sqs.directives
 
-import akka.actor.{ActorRef, ActorSystem, Props}
-import akka.http.scaladsl.server.Directives
-import akka.http.scaladsl.testkit.ScalatestRouteTest
-import akka.util.Timeout
+import org.apache.pekko.actor.{ActorRef, ActorSystem, Props}
+import org.apache.pekko.http.scaladsl.server.Directives
+import org.apache.pekko.http.scaladsl.testkit.ScalatestRouteTest
+import org.apache.pekko.util.Timeout
 import org.elasticmq.actor.QueueManagerActor
 import org.elasticmq.actor.reply._
 import org.elasticmq.msg.CreateQueue
diff --git a/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/directives/UnmatchedActionRoutesTest.scala b/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/directives/UnmatchedActionRoutesTest.scala
index 180be50c..97145d3a 100644
--- a/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/directives/UnmatchedActionRoutesTest.scala
+++ b/rest/rest-sqs/src/test/scala/org/elasticmq/rest/sqs/directives/UnmatchedActionRoutesTest.scala
@@ -1,9 +1,9 @@
 package org.elasticmq.rest.sqs.directives
 
-import akka.http.scaladsl.model.StatusCodes.BadRequest
-import akka.http.scaladsl.server.Directives
-import akka.http.scaladsl.testkit.ScalatestRouteTest
-import akka.util.ByteString
+import org.apache.pekko.http.scaladsl.model.StatusCodes.BadRequest
+import org.apache.pekko.http.scaladsl.server.Directives
+import org.apache.pekko.http.scaladsl.testkit.ScalatestRouteTest
+import org.apache.pekko.util.ByteString
 import org.elasticmq.rest.sqs.model.RequestPayload
 import org.scalatest.flatspec.AnyFlatSpec
 import org.scalatest.matchers.should.Matchers
diff --git a/rest/rest-sqs/src/test/scala/org/elasticmq/rest/stats/StatisticsDirectivesTest.scala b/rest/rest-sqs/src/test/scala/org/elasticmq/rest/stats/StatisticsDirectivesTest.scala
index 79052110..30e5f9a1 100644
--- a/rest/rest-sqs/src/test/scala/org/elasticmq/rest/stats/StatisticsDirectivesTest.scala
+++ b/rest/rest-sqs/src/test/scala/org/elasticmq/rest/stats/StatisticsDirectivesTest.scala
@@ -1,9 +1,9 @@
 package org.elasticmq.rest.stats
 
-import akka.actor.{ActorRef, ActorSystem, Props}
-import akka.http.scaladsl.server.Directives
-import akka.http.scaladsl.testkit.ScalatestRouteTest
-import akka.util.Timeout
+import org.apache.pekko.actor.{ActorRef, ActorSystem, Props}
+import org.apache.pekko.http.scaladsl.server.Directives
+import org.apache.pekko.http.scaladsl.testkit.ScalatestRouteTest
+import org.apache.pekko.util.Timeout
 import org.elasticmq.actor.QueueManagerActor
 import org.elasticmq.actor.reply.ReplyActorRef
 import org.elasticmq.msg.{CreateQueue, DeleteQueue}