diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 20ba5601ba..76591b3af8 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -42,4 +42,4 @@ jobs: cache: 'maven' - name: Build with Maven - run: mvn package javadoc:jar source:jar --batch-mode --errors --quiet -DcreateJavadoc=true -Dakka.test.single-expect-default=10s --file pom.xml -Dbuild.environment=Github + run: mvn package javadoc:jar source:jar --batch-mode --errors --quiet -DcreateJavadoc=true -Dpekko.test.single-expect-default=10s --file pom.xml -Dbuild.environment=Github diff --git a/base/model/pom.xml b/base/model/pom.xml index 950baa499f..fba917c4b1 100644 --- a/base/model/pom.xml +++ b/base/model/pom.xml @@ -47,8 +47,8 @@ test - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test diff --git a/base/model/src/main/java/org/eclipse/ditto/base/model/headers/DittoHeaderDefinition.java b/base/model/src/main/java/org/eclipse/ditto/base/model/headers/DittoHeaderDefinition.java index 438418c524..11c539b99a 100755 --- a/base/model/src/main/java/org/eclipse/ditto/base/model/headers/DittoHeaderDefinition.java +++ b/base/model/src/main/java/org/eclipse/ditto/base/model/headers/DittoHeaderDefinition.java @@ -441,7 +441,7 @@ public enum DittoHeaderDefinition implements HeaderDefinition { HeaderValueValidators.getBooleanValidator()), /** - * Internal header passing through the Akka address of an {@code AcknowledgementAggregatorActor} which was started + * Internal header passing through the Pekko address of an {@code AcknowledgementAggregatorActor} which was started * at an edge (gateway/connectivity) and is awaiting {@code Acknowledgement}s which can be sent to it by using * this address in an {@code ActorSelection}. * diff --git a/base/model/src/main/java/org/eclipse/ditto/base/model/headers/JsonFieldSelectorValidator.java b/base/model/src/main/java/org/eclipse/ditto/base/model/headers/JsonFieldSelectorValidator.java index 19cded9a6a..bc746ecc76 100644 --- a/base/model/src/main/java/org/eclipse/ditto/base/model/headers/JsonFieldSelectorValidator.java +++ b/base/model/src/main/java/org/eclipse/ditto/base/model/headers/JsonFieldSelectorValidator.java @@ -30,7 +30,7 @@ final class JsonFieldSelectorValidator extends AbstractHeaderValueValidator { /** - * Don't configure URL decoding as JsonParseOptions because Akka-Http already decodes the fields-param and we would + * Don't configure URL decoding as JsonParseOptions because Pekko-Http already decodes the fields-param and we would * decode twice. */ private static final JsonParseOptions JSON_FIELD_SELECTOR_PARSE_OPTIONS = JsonFactory.newParseOptionsBuilder() diff --git a/base/model/src/test/java/org/eclipse/ditto/base/model/signals/DittoTestSystem.java b/base/model/src/test/java/org/eclipse/ditto/base/model/signals/DittoTestSystem.java index 4358afbe55..cd41762bda 100644 --- a/base/model/src/test/java/org/eclipse/ditto/base/model/signals/DittoTestSystem.java +++ b/base/model/src/test/java/org/eclipse/ditto/base/model/signals/DittoTestSystem.java @@ -12,8 +12,9 @@ */ package org.eclipse.ditto.base.model.signals; -import akka.actor.ActorSystem; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.javadsl.TestKit; + /** * Manage creation and termination of actor systems for tests. diff --git a/base/service/pom.xml b/base/service/pom.xml index e9fb507fdd..13254eebca 100644 --- a/base/service/pom.xml +++ b/base/service/pom.xml @@ -68,35 +68,35 @@ logback-classic - com.typesafe.akka - akka-actor_${scala.version} + org.apache.pekko + pekko-actor_${scala.version} - com.lightbend.akka.management - akka-management_${scala.version} + org.apache.pekko + pekko-management_${scala.version} - com.lightbend.akka.management - akka-management-cluster-bootstrap_${scala.version} + org.apache.pekko + pekko-management-cluster-bootstrap_${scala.version} - com.lightbend.akka.management - akka-management-cluster-http_${scala.version} + org.apache.pekko + pekko-management-cluster-http_${scala.version} - com.lightbend.akka.discovery - akka-discovery-kubernetes-api_${scala.version} + org.apache.pekko + pekko-discovery-kubernetes-api_${scala.version} - com.lightbend.akka.management - akka-lease-kubernetes_${scala.version} + org.apache.pekko + pekko-lease-kubernetes_${scala.version} com.github.scullxbones - akka-persistence-mongo-common_${scala.version} + pekko-persistence-mongodb_${scala.version} @@ -126,8 +126,8 @@ - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test diff --git a/base/service/src/main/java/org/eclipse/ditto/base/service/DittoService.java b/base/service/src/main/java/org/eclipse/ditto/base/service/DittoService.java index 16b980d507..9fc4312156 100644 --- a/base/service/src/main/java/org/eclipse/ditto/base/service/DittoService.java +++ b/base/service/src/main/java/org/eclipse/ditto/base/service/DittoService.java @@ -47,17 +47,17 @@ import com.typesafe.config.ConfigValue; import com.typesafe.config.ConfigValueFactory; -import akka.Done; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.CoordinatedShutdown; -import akka.actor.Props; -import akka.cluster.Cluster; -import akka.cluster.pubsub.DistributedPubSub; -import akka.http.javadsl.Http; -import akka.http.javadsl.model.Uri; -import akka.management.cluster.bootstrap.ClusterBootstrap; -import akka.management.javadsl.AkkaManagement; +import org.apache.pekko.Done; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.CoordinatedShutdown; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.pubsub.DistributedPubSub; +import org.apache.pekko.http.javadsl.Http; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.management.cluster.bootstrap.ClusterBootstrap; +import org.apache.pekko.management.javadsl.PekkoManagement; import ch.qos.logback.classic.LoggerContext; import kamon.Kamon; import kamon.prometheus.PrometheusReporter; @@ -71,11 +71,11 @@ *
    *
  1. {@link #determineRawConfig()},
  2. *
  3. {@link #createActorSystem(com.typesafe.config.Config)},
  4. - *
  5. {@link #startStatusSupplierActor(akka.actor.ActorSystem)},
  6. - *
  7. {@link #startServiceRootActors(akka.actor.ActorSystem, org.eclipse.ditto.base.service.config.ServiceSpecificConfig)}. + *
  8. {@link #startStatusSupplierActor(org.apache.pekko.actor.ActorSystem)},
  9. + *
  10. {@link #startServiceRootActors(org.apache.pekko.actor.ActorSystem, org.eclipse.ditto.base.service.config.ServiceSpecificConfig)}. *
      - *
    1. {@link #getMainRootActorProps(org.eclipse.ditto.base.service.config.ServiceSpecificConfig, akka.actor.ActorRef)},
    2. - *
    3. {@link #startMainRootActor(akka.actor.ActorSystem, akka.actor.Props)},
    4. + *
    5. {@link #getMainRootActorProps(org.eclipse.ditto.base.service.config.ServiceSpecificConfig, org.apache.pekko.actor.ActorRef)},
    6. + *
    7. {@link #startMainRootActor(org.apache.pekko.actor.ActorSystem, org.apache.pekko.actor.Props)},
    8. *
    *
  11. *
@@ -95,7 +95,7 @@ public abstract class DittoService { */ public static final String DITTO_CONFIG_PATH = ScopedConfig.DITTO_SCOPE; - protected static final String MONGO_URI_CONFIG_PATH = "akka.contrib.persistence.mongodb.mongo.mongouri"; + protected static final String MONGO_URI_CONFIG_PATH = "pekko.contrib.persistence.mongodb.mongo.mongouri"; protected final Config rawConfig; protected final C serviceSpecificConfig; @@ -207,7 +207,7 @@ private static ScopedConfig getDittoConfigOrEmpty(final Config rawConfig) { */ private ActorSystem doStart() { logRuntimeParameters(); - final var actorSystemConfig = appendDittoInfo(appendAkkaPersistenceMongoUriToRawConfig()); + final var actorSystemConfig = appendDittoInfo(appendPekkoPersistenceMongoUriToRawConfig()); startKamon(); final var actorSystem = createActorSystem(actorSystemConfig); initializeActorSystem(actorSystem); @@ -215,7 +215,7 @@ private ActorSystem doStart() { return actorSystem; } - protected Config appendAkkaPersistenceMongoUriToRawConfig() { + protected Config appendPekkoPersistenceMongoUriToRawConfig() { return rawConfig; } @@ -255,9 +255,9 @@ private void startPrometheusReporter() { } /** - * Starts the Akka actor system as well as all required actors. + * Starts the Pekko actor system as well as all required actors. *

- * May be overridden to change the way how the Akka actor system and actors are started. Note: If this method is + * May be overridden to change the way how the Pekko actor system and actors are started. Note: If this method is * overridden, none of the following mentioned methods and their descendant methods will be called * automatically: *

@@ -267,10 +267,10 @@ private void startPrometheusReporter() { *
  • {@link #startServiceRootActors(ActorSystem, org.eclipse.ditto.base.service.config.ServiceSpecificConfig)}.
  • * * - * @param actorSystem the Akka ActorSystem to be initialized. + * @param actorSystem the Pekko ActorSystem to be initialized. */ private void initializeActorSystem(final ActorSystem actorSystem) { - startAkkaManagement(actorSystem); + startPekkoManagement(actorSystem); startClusterBootstrap(actorSystem); startStatusSupplierActor(actorSystem); @@ -310,7 +310,7 @@ private void startKamonPrometheusHttpEndpoint(final ActorSystem actorSystem) { } /** - * Creates the Akka actor system. May be overridden to change the way how the actor system is created. + * Creates the Pekko actor system. May be overridden to change the way how the actor system is created. * * @param config the configuration settings of this service. * @return the actor system. @@ -319,15 +319,15 @@ private ActorSystem createActorSystem(final Config config) { return ActorSystem.create(CLUSTER_NAME, config); } - private void startAkkaManagement(final ActorSystem actorSystem) { - logger.info("Starting AkkaManagement ..."); - final var akkaManagement = AkkaManagement.get(actorSystem); - final CompletionStage startPromise = akkaManagement.start(); + private void startPekkoManagement(final ActorSystem actorSystem) { + logger.info("Starting PekkoManagement ..."); + final var pekkoManagement = PekkoManagement.get(actorSystem); + final CompletionStage startPromise = pekkoManagement.start(); startPromise.whenComplete((uri, throwable) -> { if (null != throwable) { - logger.error("Error during start of AkkaManagement: <{}>!", throwable.getMessage(), throwable); + logger.error("Error during start of PekkoManagement: <{}>!", throwable.getMessage(), throwable); } else { - logger.info("Started AkkaManagement on URI <{}>.", uri); + logger.info("Started PekkoManagement on URI <{}>.", uri); } }); } @@ -342,7 +342,7 @@ private void startClusterBootstrap(final ActorSystem actorSystem) { * Starts the {@link org.eclipse.ditto.internal.utils.health.status.StatusSupplierActor}. * May be overridden to change the way how the actor is started. * - * @param actorSystem Akka actor system for starting actors. + * @param actorSystem Pekko actor system for starting actors. */ private void startStatusSupplierActor(final ActorSystem actorSystem) { startActor(actorSystem, StatusSupplierActor.props(rootActorName), StatusSupplierActor.ACTOR_NAME); @@ -361,7 +361,7 @@ private void logStartingActor(final String actorName) { * Starts the {@link org.eclipse.ditto.base.service.devops.DevOpsCommandsActor}. * May be overridden to change the way how the actor is started. * - * @param actorSystem Akka actor system for starting actors. + * @param actorSystem Pekko actor system for starting actors. */ private void startDevOpsCommandsActor(final ActorSystem actorSystem) { startActor(actorSystem, DevOpsCommandsActor.props(LogbackLoggingFacade.newInstance(), serviceName, @@ -375,11 +375,11 @@ private void startDevOpsCommandsActor(final ActorSystem actorSystem) { * is overridden, the following methods will not be called automatically:
    *

    *
      - *
    • {@link #getMainRootActorProps(org.eclipse.ditto.base.service.config.ServiceSpecificConfig, akka.actor.ActorRef)},
    • - *
    • {@link #startMainRootActor(akka.actor.ActorSystem, akka.actor.Props)},
    • + *
    • {@link #getMainRootActorProps(org.eclipse.ditto.base.service.config.ServiceSpecificConfig, org.apache.pekko.actor.ActorRef)},
    • + *
    • {@link #startMainRootActor(org.apache.pekko.actor.ActorSystem, org.apache.pekko.actor.Props)},
    • *
    * - * @param actorSystem Akka actor system for starting actors. + * @param actorSystem Pekko actor system for starting actors. * @param serviceSpecificConfig the configuration settings of this service. */ private void startServiceRootActors(final ActorSystem actorSystem, final C serviceSpecificConfig) { @@ -437,7 +437,7 @@ private static ActorRef getDistributedPubSubMediatorActor(final ActorSystem acto * Starts the main root actor of this service. May be overridden to change the way of starting this service's root * actor. * - * @param actorSystem Akka actor system for starting actors. + * @param actorSystem Pekko actor system for starting actors. * @param mainRootActorProps the Props of the main root actor. */ private ActorRef startMainRootActor(final ActorSystem actorSystem, final Props mainRootActorProps) { @@ -452,9 +452,9 @@ private void setUpCoordinatedShutdown(final ActorSystem actorSystem) { logger.info("Initiated coordinated shutdown; gracefully shutting down ..."); coordinatedShutdown.getShutdownReason().ifPresent(reason -> logger.info("Shutdown reason was - <{}>", reason)); - final CompletionStage stop = AkkaManagement.get(actorSystem).stop(); + final CompletionStage stop = PekkoManagement.get(actorSystem).stop(); return stop.thenApply(done -> { - logger.info("AkkaManagement stopped!"); + logger.info("PekkoManagement stopped!"); return done; }); diff --git a/base/service/src/main/java/org/eclipse/ditto/base/service/DockerSwarmServiceDiscovery.java b/base/service/src/main/java/org/eclipse/ditto/base/service/DockerSwarmServiceDiscovery.java index d518d2bbc9..7bb06d7e30 100644 --- a/base/service/src/main/java/org/eclipse/ditto/base/service/DockerSwarmServiceDiscovery.java +++ b/base/service/src/main/java/org/eclipse/ditto/base/service/DockerSwarmServiceDiscovery.java @@ -20,11 +20,11 @@ import java.util.concurrent.TimeoutException; import java.util.stream.Collectors; -import akka.actor.ExtendedActorSystem; -import akka.discovery.Lookup; -import akka.discovery.ServiceDiscovery; -import akka.dispatch.Futures; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.discovery.Lookup; +import org.apache.pekko.discovery.ServiceDiscovery; +import org.apache.pekko.dispatch.Futures; +import org.apache.pekko.pattern.Patterns; import scala.Option; import scala.collection.JavaConverters; import scala.concurrent.Future; @@ -35,7 +35,7 @@ *

    * One speciality of a Docker swarm based cluster is that the Docker swarm DNS sets a TTL of DNS entries to 600 seconds * (10 minutes) - so if a cluster forms and not all DNS entries are "there" from the beginning, it takes 10 minutes - * until DNS caches used by the default Akka {@link akka.discovery.dns.DnsServiceDiscovery DnsServiceDiscovery} are + * until DNS caches used by the default Pekko {@link org.apache.pekko.discovery.dns.DnsServiceDiscovery DnsServiceDiscovery} are * evicted and another DNS lookup is done. *

    * This implementation does not cache DNS entries and can therefore be used for bootstrapping in Docker swarm. diff --git a/base/service/src/main/java/org/eclipse/ditto/base/service/MainMethodExceptionHandler.java b/base/service/src/main/java/org/eclipse/ditto/base/service/MainMethodExceptionHandler.java index 6c7c6be0c0..5c0dbd6a54 100644 --- a/base/service/src/main/java/org/eclipse/ditto/base/service/MainMethodExceptionHandler.java +++ b/base/service/src/main/java/org/eclipse/ditto/base/service/MainMethodExceptionHandler.java @@ -21,7 +21,7 @@ import org.slf4j.Logger; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * This class wraps the execution of a Runnable for catching {@code Throwable}s. The Runnable is assumed to be the diff --git a/base/service/src/main/java/org/eclipse/ditto/base/service/NoOpRootActorStarter.java b/base/service/src/main/java/org/eclipse/ditto/base/service/NoOpRootActorStarter.java index aebfbde02c..0fba26f63e 100644 --- a/base/service/src/main/java/org/eclipse/ditto/base/service/NoOpRootActorStarter.java +++ b/base/service/src/main/java/org/eclipse/ditto/base/service/NoOpRootActorStarter.java @@ -14,7 +14,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Root actor starter that does purposefully nothing. diff --git a/base/service/src/main/java/org/eclipse/ditto/base/service/NoOpRootChildActorStarter.java b/base/service/src/main/java/org/eclipse/ditto/base/service/NoOpRootChildActorStarter.java index 12c64636d9..d071e8b6c9 100644 --- a/base/service/src/main/java/org/eclipse/ditto/base/service/NoOpRootChildActorStarter.java +++ b/base/service/src/main/java/org/eclipse/ditto/base/service/NoOpRootChildActorStarter.java @@ -14,8 +14,8 @@ import com.typesafe.config.Config; -import akka.actor.ActorContext; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorContext; +import org.apache.pekko.actor.ActorSystem; /** * Root actor child starter that does purposefully nothing. diff --git a/base/service/src/main/java/org/eclipse/ditto/base/service/RootActorStarter.java b/base/service/src/main/java/org/eclipse/ditto/base/service/RootActorStarter.java index 1ef3e7ad58..972923d6e1 100644 --- a/base/service/src/main/java/org/eclipse/ditto/base/service/RootActorStarter.java +++ b/base/service/src/main/java/org/eclipse/ditto/base/service/RootActorStarter.java @@ -19,7 +19,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Extension to start custom root actors in service. diff --git a/base/service/src/main/java/org/eclipse/ditto/base/service/RootChildActorStarter.java b/base/service/src/main/java/org/eclipse/ditto/base/service/RootChildActorStarter.java index fc670a84fb..82c7909d9a 100644 --- a/base/service/src/main/java/org/eclipse/ditto/base/service/RootChildActorStarter.java +++ b/base/service/src/main/java/org/eclipse/ditto/base/service/RootChildActorStarter.java @@ -19,8 +19,8 @@ import com.typesafe.config.Config; -import akka.actor.ActorContext; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorContext; +import org.apache.pekko.actor.ActorSystem; /** * Extension to start custom child actors in root actor. diff --git a/base/service/src/main/java/org/eclipse/ditto/base/service/UriEncoding.java b/base/service/src/main/java/org/eclipse/ditto/base/service/UriEncoding.java index c92d9b9eb6..d154fca360 100644 --- a/base/service/src/main/java/org/eclipse/ditto/base/service/UriEncoding.java +++ b/base/service/src/main/java/org/eclipse/ditto/base/service/UriEncoding.java @@ -34,7 +34,7 @@ public final class UriEncoding { private static final IntPredicate ALLOWED_IN_PATH_SEGMENT = UriEncoding::isPchar; /* * Workaround: '+' needs to be escaped to '%2B', otherwise it will be recognized as blank when decoding with MIME - * format {@code application/x-www-form-urlencoded} - what most servers do (such as akka-http). + * format {@code application/x-www-form-urlencoded} - what most servers do (such as pekko-http). */ private static final IntPredicate ALLOWED_IN_QUERY = c -> c != '+' && (isPchar(c) || '/' == c || '?' == c); private static final IntPredicate ALLOWED_IN_QUERY_PARAM = diff --git a/base/service/src/main/java/org/eclipse/ditto/base/service/actors/DittoRootActor.java b/base/service/src/main/java/org/eclipse/ditto/base/service/actors/DittoRootActor.java index 1ab8c32e63..17d3d430dc 100644 --- a/base/service/src/main/java/org/eclipse/ditto/base/service/actors/DittoRootActor.java +++ b/base/service/src/main/java/org/eclipse/ditto/base/service/actors/DittoRootActor.java @@ -12,8 +12,8 @@ */ package org.eclipse.ditto.base.service.actors; -import static akka.http.javadsl.server.Directives.logRequest; -import static akka.http.javadsl.server.Directives.logResult; +import static org.apache.pekko.http.javadsl.server.Directives.logRequest; +import static org.apache.pekko.http.javadsl.server.Directives.logResult; import java.io.PrintWriter; import java.io.StringWriter; @@ -22,28 +22,28 @@ import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; import org.eclipse.ditto.base.service.config.http.HttpConfig; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.cluster.ClusterStatusSupplier; import org.eclipse.ditto.internal.utils.config.LocalHostAddressSupplier; import org.eclipse.ditto.internal.utils.health.routes.StatusRoute; -import akka.actor.AbstractActor; -import akka.actor.ActorInitializationException; -import akka.actor.ActorKilledException; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.InvalidActorNameException; -import akka.actor.OneForOneStrategy; -import akka.actor.Props; -import akka.actor.Status; -import akka.actor.SupervisorStrategy; -import akka.cluster.Cluster; -import akka.http.javadsl.Http; -import akka.http.javadsl.server.Route; -import akka.japi.pf.DeciderBuilder; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.AskTimeoutException; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorInitializationException; +import org.apache.pekko.actor.ActorKilledException; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.InvalidActorNameException; +import org.apache.pekko.actor.OneForOneStrategy; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.http.javadsl.Http; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.japi.pf.DeciderBuilder; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.AskTimeoutException; import scala.PartialFunction; /** diff --git a/base/service/src/main/java/org/eclipse/ditto/base/service/actors/ShutdownBehaviour.java b/base/service/src/main/java/org/eclipse/ditto/base/service/actors/ShutdownBehaviour.java index a101ca6a6c..23fced59a4 100644 --- a/base/service/src/main/java/org/eclipse/ditto/base/service/actors/ShutdownBehaviour.java +++ b/base/service/src/main/java/org/eclipse/ditto/base/service/actors/ShutdownBehaviour.java @@ -21,10 +21,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.actor.ActorRef; -import akka.actor.PoisonPill; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Responsible for shutting down the given actor in case a shutdown command contains a reason that is applicable for the @@ -48,7 +48,7 @@ private ShutdownBehaviour(final String namespace, final EntityId entityId, final * Create the actor behavior from its entity ID and reference. * * @param entityId entity ID to react to. - * @param pubSubMediator Akka pub-sub mediator. + * @param pubSubMediator Pekko pub-sub mediator. * @param self reference of the actor itself. * @return the actor behavior. */ @@ -64,7 +64,7 @@ public static ShutdownBehaviour fromId(final NamespacedEntityId entityId, * Create the actor behavior from its entity ID (without namespace) and reference. * * @param entityId entity ID to react to. - * @param pubSubMediator Akka pub-sub mediator. + * @param pubSubMediator Pekko pub-sub mediator. * @param self reference of the actor itself. * @return the actor behavior. */ @@ -79,7 +79,7 @@ public static ShutdownBehaviour fromIdWithoutNamespace(final EntityId entityId, * Create the actor behavior from a namespace and ID. * * @param entityId the entity ID. - * @param pubSubMediator Akka pub-sub mediator. + * @param pubSubMediator Pekko pub-sub mediator. * @param self reference of the actor itself. * @param namespace the namespace of the actor. * @return the actor behavior. diff --git a/base/service/src/main/java/org/eclipse/ditto/base/service/actors/StartChildActor.java b/base/service/src/main/java/org/eclipse/ditto/base/service/actors/StartChildActor.java index 1bfcc58b8e..43a931a493 100644 --- a/base/service/src/main/java/org/eclipse/ditto/base/service/actors/StartChildActor.java +++ b/base/service/src/main/java/org/eclipse/ditto/base/service/actors/StartChildActor.java @@ -16,7 +16,7 @@ import javax.annotation.concurrent.Immutable; -import akka.actor.Props; +import org.apache.pekko.actor.Props; /** * Message that holds props of an actor and the name to start this actor with. diff --git a/base/service/src/main/java/org/eclipse/ditto/base/service/cluster/DittoSplitBrainResolver.java b/base/service/src/main/java/org/eclipse/ditto/base/service/cluster/DittoSplitBrainResolver.java index d4eb822dac..2b6647b240 100644 --- a/base/service/src/main/java/org/eclipse/ditto/base/service/cluster/DittoSplitBrainResolver.java +++ b/base/service/src/main/java/org/eclipse/ditto/base/service/cluster/DittoSplitBrainResolver.java @@ -19,14 +19,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.Cancellable; -import akka.actor.Props; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Cancellable; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** - * This is just a wrapper for the {@link akka.cluster.sbr.SplitBrainResolver akka sbr} with an addition, that this + * This is just a wrapper for the {@link org.apache.pekko.cluster.sbr.SplitBrainResolver pekko sbr} with an addition, that this * sbr can be turned off/on via {@link ModifySplitBrainResolver} sent as piggyback command to /system/cluster/core/daemon/downingProvider */ final class DittoSplitBrainResolver extends AbstractActor { @@ -83,10 +83,10 @@ private void updateEnabled(final ModifySplitBrainResolver modifySplitBrainResolv autoEnabling.cancel(); } if (modifySplitBrainResolver.isEnabled() && splitBrainResolverActor == null) { - LOGGER.info("Enabling Akka split brain resolver"); + LOGGER.info("Enabling Pekko split brain resolver"); splitBrainResolverActor = startChildActor(splitBrainResolverProps); } else if (!modifySplitBrainResolver.isEnabled() && splitBrainResolverActor != null) { - LOGGER.info("Stopping Akka split brain resolver"); + LOGGER.info("Stopping Pekko split brain resolver"); getContext().stop(splitBrainResolverActor); splitBrainResolverActor = null; } diff --git a/base/service/src/main/java/org/eclipse/ditto/base/service/cluster/DittoSplitBrainResolverProvider.java b/base/service/src/main/java/org/eclipse/ditto/base/service/cluster/DittoSplitBrainResolverProvider.java index d590350c67..ef920252ad 100644 --- a/base/service/src/main/java/org/eclipse/ditto/base/service/cluster/DittoSplitBrainResolverProvider.java +++ b/base/service/src/main/java/org/eclipse/ditto/base/service/cluster/DittoSplitBrainResolverProvider.java @@ -16,10 +16,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.cluster.DowningProvider; -import akka.cluster.sbr.SplitBrainResolverProvider; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.DowningProvider; +import org.apache.pekko.cluster.sbr.SplitBrainResolverProvider; import scala.Option; import scala.concurrent.duration.FiniteDuration; @@ -34,7 +34,7 @@ final class DittoSplitBrainResolverProvider extends DowningProvider { private final SplitBrainResolverProvider splitBrainResolverProvider; /** - * This constructor is called by akka. + * This constructor is called by pekko. * * @param actorSystem the actor system used to instantiate this provider. */ diff --git a/base/service/src/main/java/org/eclipse/ditto/base/service/config/http/DefaultHttpProxyConfig.java b/base/service/src/main/java/org/eclipse/ditto/base/service/config/http/DefaultHttpProxyConfig.java index d66f690645..1045897c1d 100644 --- a/base/service/src/main/java/org/eclipse/ditto/base/service/config/http/DefaultHttpProxyConfig.java +++ b/base/service/src/main/java/org/eclipse/ditto/base/service/config/http/DefaultHttpProxyConfig.java @@ -23,8 +23,8 @@ import com.typesafe.config.Config; -import akka.http.javadsl.ClientTransport; -import akka.http.javadsl.model.headers.HttpCredentials; +import org.apache.pekko.http.javadsl.ClientTransport; +import org.apache.pekko.http.javadsl.model.headers.HttpCredentials; /** * This class is the default implementation of the HTTP proxy config. diff --git a/base/service/src/main/java/org/eclipse/ditto/base/service/config/http/HttpProxyConfig.java b/base/service/src/main/java/org/eclipse/ditto/base/service/config/http/HttpProxyConfig.java index 22b2344c5f..8a67baed53 100644 --- a/base/service/src/main/java/org/eclipse/ditto/base/service/config/http/HttpProxyConfig.java +++ b/base/service/src/main/java/org/eclipse/ditto/base/service/config/http/HttpProxyConfig.java @@ -16,7 +16,7 @@ import org.eclipse.ditto.internal.utils.config.KnownConfigValue; -import akka.http.javadsl.ClientTransport; +import org.apache.pekko.http.javadsl.ClientTransport; /** * Provides configuration settings for the HTTP proxy. @@ -60,10 +60,10 @@ public interface HttpProxyConfig { String getPassword(); /** - * Converts the proxy settings to an Akka HTTP client transport object. + * Converts the proxy settings to an Pekko HTTP client transport object. * Does not check whether the proxy is enabled. * - * @return an Akka HTTP client transport object matching this config. + * @return an Pekko HTTP client transport object matching this config. */ ClientTransport toClientTransport(); diff --git a/base/service/src/main/java/org/eclipse/ditto/base/service/devops/DevOpsCommandsActor.java b/base/service/src/main/java/org/eclipse/ditto/base/service/devops/DevOpsCommandsActor.java index 18d72c71ca..a2cd2f4c19 100644 --- a/base/service/src/main/java/org/eclipse/ditto/base/service/devops/DevOpsCommandsActor.java +++ b/base/service/src/main/java/org/eclipse/ditto/base/service/devops/DevOpsCommandsActor.java @@ -47,10 +47,10 @@ import org.eclipse.ditto.base.model.signals.JsonTypeNotParsableException; import org.eclipse.ditto.base.model.signals.commands.Command; import org.eclipse.ditto.base.model.signals.commands.CommandResponse; -import org.eclipse.ditto.internal.utils.akka.actors.RetrieveConfigBehavior; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.actors.RetrieveConfigBehavior; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.internal.utils.cluster.JsonValueSourceRef; import org.eclipse.ditto.internal.utils.cluster.MappingStrategies; @@ -60,17 +60,17 @@ import com.typesafe.config.Config; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.PoisonPill; -import akka.actor.Props; -import akka.actor.ReceiveTimeout; -import akka.cluster.Cluster; -import akka.cluster.pubsub.DistributedPubSub; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.event.DiagnosticLoggingAdapter; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.ReceiveTimeout; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.pubsub.DistributedPubSub; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; /** * An actor to consume {@link org.eclipse.ditto.base.api.devops.signals.commands.DevOpsCommand}s and reply appropriately. @@ -125,12 +125,12 @@ private DevOpsCommandsActor(final LoggingFacade loggingFacade, final String serv } /** - * Creates Akka configuration object Props for this Actor. + * Creates Pekko configuration object Props for this Actor. * * @param loggingFacade a facade providing logging functionality. * @param serviceName name of the microservice. * @param instance instance number of the microservice instance. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final LoggingFacade loggingFacade, final String serviceName, final String instance) { return Props.create(DevOpsCommandsActor.class, loggingFacade, serviceName, instance); @@ -442,7 +442,7 @@ private PubSubSubscriberActor(final ActorRef pubSubMediator, final String servic } /** - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ static Props props(final ActorRef pubSubMediator, final String serviceName, @@ -536,7 +536,7 @@ private static boolean isAggregateResults(final DittoHeaders dittoHeaders) { } /** - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ static Props props(final ActorRef devOpsCommandSender, final DevOpsCommand devOpsCommand, final int expectedResponses) { diff --git a/base/service/src/main/java/org/eclipse/ditto/base/service/signaltransformer/SignalTransformers.java b/base/service/src/main/java/org/eclipse/ditto/base/service/signaltransformer/SignalTransformers.java index 8ba08d5511..7d65b4639d 100644 --- a/base/service/src/main/java/org/eclipse/ditto/base/service/signaltransformer/SignalTransformers.java +++ b/base/service/src/main/java/org/eclipse/ditto/base/service/signaltransformer/SignalTransformers.java @@ -20,8 +20,8 @@ import java.util.stream.Collectors; import org.eclipse.ditto.base.model.signals.Signal; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.extension.DittoExtensionIds; import org.eclipse.ditto.internal.utils.extension.DittoExtensionPoint; import org.eclipse.ditto.internal.utils.extension.DittoExtensionPoint.ExtensionId.ExtensionIdConfig; @@ -29,7 +29,7 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigValue; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; public final class SignalTransformers implements DittoExtensionPoint, SignalTransformer { diff --git a/base/service/src/test/java/org/eclipse/ditto/base/service/MainMethodExceptionHandlerTest.java b/base/service/src/test/java/org/eclipse/ditto/base/service/MainMethodExceptionHandlerTest.java index 8d7ba9de4c..33eabd04e7 100644 --- a/base/service/src/test/java/org/eclipse/ditto/base/service/MainMethodExceptionHandlerTest.java +++ b/base/service/src/test/java/org/eclipse/ditto/base/service/MainMethodExceptionHandlerTest.java @@ -29,7 +29,7 @@ import org.mockito.junit.MockitoJUnitRunner; import org.slf4j.Logger; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Unit test for {@link MainMethodExceptionHandler}. diff --git a/base/service/src/test/java/org/eclipse/ditto/base/service/actors/AbstractDittoRootActorTest.java b/base/service/src/test/java/org/eclipse/ditto/base/service/actors/AbstractDittoRootActorTest.java index 5528c71a71..ada7d56933 100644 --- a/base/service/src/test/java/org/eclipse/ditto/base/service/actors/AbstractDittoRootActorTest.java +++ b/base/service/src/test/java/org/eclipse/ditto/base/service/actors/AbstractDittoRootActorTest.java @@ -25,14 +25,14 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.cluster.Cluster; -import akka.japi.pf.ReceiveBuilder; -import akka.stream.Attributes; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Abstract class to test the service root actors. @@ -65,14 +65,14 @@ public abstract class AbstractDittoRootActorTest { protected ActorSystem createActorSystem() { final Map configMap = Map.of( // bind random ports - "akka.management.http.port", 0, - "akka.remote.artery.canonical.port", 0, - "akka.cluster.seed-nodes", List.of(), + "pekko.management.http.port", 0, + "pekko.remote.artery.canonical.port", 0, + "pekko.cluster.seed-nodes", List.of(), "ditto.http.port", 0, "ditto.metrics.prometheus.port", 0, // turn off System.exit(0) in the post-shutdown hook to avoid JVM termination at the end of this test - "akka.coordinated-shutdown.exit-jvm", "off" + "pekko.coordinated-shutdown.exit-jvm", "off" ); final Config config = ConfigFactory.parseMap(overrideConfig()) .withFallback(ConfigFactory.parseMap(configMap)) diff --git a/base/service/src/test/java/org/eclipse/ditto/base/service/actors/DittoRootActorControlTest.java b/base/service/src/test/java/org/eclipse/ditto/base/service/actors/DittoRootActorControlTest.java index a2541bf634..0b6d91c0a6 100644 --- a/base/service/src/test/java/org/eclipse/ditto/base/service/actors/DittoRootActorControlTest.java +++ b/base/service/src/test/java/org/eclipse/ditto/base/service/actors/DittoRootActorControlTest.java @@ -14,12 +14,12 @@ import static org.assertj.core.api.Assertions.assertThat; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.actor.Terminated; -import akka.japi.pf.ReceiveBuilder; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Terminated; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Control test case for {@link AbstractDittoRootActorTest}. diff --git a/bom/pom.xml b/bom/pom.xml index 1ad122b071..4f67ab52e2 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -28,6 +28,8 @@ 2.13 2.13.10 + 1.1.2 + 1.0.2 17 17 @@ -37,24 +39,30 @@ 2.14.3 1.4.2 0.6.1 - 2.6.21 - 3.0.8 - 10.2.10 - 1.1.4 - 3.0.1 3.0.2 1.3.0 2.9.2 0.3.0 1.8.0 - - 4.3.4 + 1.0.1 + 1.0.0 + 1.0.1 + 1.0.0 + 1.0.0 + 1.0.0 + 2.5.0 + + + 4.2.9 + + + 4.10.2 0.11.5 9.2 1.7.0 - 6.0.0 + 7.0.0 5.14.2 1.0.4 4.1.86.Final @@ -97,7 +105,6 @@ 4.7.0 1.5.1 4.2.0 - 2.5.15.2 1.35 @@ -129,18 +136,23 @@ ${typesafe-config.version}
    - + + + org.apache.pekko + pekko-serialization-jackson_2.13 + ${pekko-bom.version} + - com.typesafe.akka - akka-bom_${scala.version} + org.apache.pekko + pekko-bom_${scala.version} + ${pekko-bom.version} pom - ${akka-bom.version} import - com.typesafe.akka - akka-stream-kafka_${scala.version} - ${akka-stream-kafka.version} + org.apache.pekko + pekko-connectors-kafka_${scala.version} + ${pekko-connector-kafka.version} org.apache.kafka @@ -148,11 +160,11 @@ ${kafka-client.version} - com.typesafe.akka - akka-remote_${scala.version} - ${akka-bom.version} + org.apache.pekko + pekko-remote_${scala.version} + ${pekko-bom.version} - + io.netty @@ -161,31 +173,26 @@ - + - com.typesafe.akka - akka-http-bom_${scala.version} - pom - ${akka-http-bom.version} + org.apache.pekko + pekko-http-bom_${scala.version} + ${pekko-http-bom.version} import + pom - - com.github.scullxbones - akka-persistence-mongo-common_${scala.version} - ${akka-persistence-mongo.version} - - - io.dropwizard.metrics - * - - + org.parboiled + parboiled_${scala.version} + ${parboiled.version} + + com.github.scullxbones - akka-persistence-mongo-scala_${scala.version} - ${akka-persistence-mongo.version} + pekko-persistence-mongodb_${scala.version} + ${pekko-persistence-mongodb.version} io.dropwizard.metrics @@ -193,32 +200,38 @@ + + org.mongodb.scala + mongo-scala-driver_2.13 + ${mongo-java-driver.version} + + - + - com.lightbend.akka.management - akka-management_${scala.version} - ${akka-management.version} + org.apache.pekko + pekko-management_${scala.version} + ${pekko-management.version} - com.lightbend.akka.management - akka-management-cluster-bootstrap_${scala.version} - ${akka-management.version} + org.apache.pekko + pekko-management-cluster-bootstrap_${scala.version} + ${pekko-management.version} - com.lightbend.akka.discovery - akka-discovery-kubernetes-api_${scala.version} - ${akka-management.version} + org.apache.pekko + pekko-discovery-kubernetes-api_${scala.version} + ${pekko-management.version} - com.lightbend.akka.management - akka-management-cluster-http_${scala.version} - ${akka-management.version} + org.apache.pekko + pekko-management-cluster-http_${scala.version} + ${pekko-management.version} - com.lightbend.akka.management - akka-lease-kubernetes_${scala.version} - ${akka-management.version} + org.apache.pekko + pekko-lease-kubernetes_${scala.version} + ${pekko-management.version} @@ -274,10 +287,15 @@ scala-reflect ${scala.full.version}
    + + org.scala-lang.modules + scala-java8-compat_${scala.version} + ${scala-java8-compat.version} + org.scala-lang.modules scala-parser-combinators_${scala.version} - 1.1.2 + ${scala-parser-combinators.version} org.reactivestreams @@ -317,9 +335,9 @@ - com.newmotion - akka-rabbitmq_${scala.version} - ${newmotion-akka-rabbitmq.version} + com.github.pjfanning + pekko-rabbitmq_${scala.version} + ${pjfanning-pekko-rabbitmq.version} com.rabbitmq @@ -560,7 +578,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko ${project.version} @@ -737,7 +755,11 @@ ditto-thingsearch-service ${project.version} - + + nl.grons + metrics4-scala_${scala.version} + ${metrics4-scala.version} + com.google.code.findbugs jsr305 @@ -869,17 +891,17 @@ test - + org.scalatest scalatest_${scala.version} - ${scalatest.version} + ${scalatest.version} test - com.github.dnvriend - akka-persistence-inmemory_${scala.version} - ${akka-persistence-inmemory.version} + io.github.alstanchev + pekko-persistence-inmemory_${scala.version} + ${pekko-persistence-inmemory.version} test @@ -907,9 +929,9 @@ test - com.typesafe.akka - akka-stream-kafka-testkit_${scala.version} - ${akka-stream-kafka.version} + org.apache.pekko + pekko-connectors-kafka-testkit_${scala.version} + ${pekko-connector-kafka.version} test @@ -967,7 +989,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko test-jar ${project.version} test @@ -1003,6 +1025,7 @@ + org.eclipse.ditto diff --git a/connectivity/api/src/main/java/org/eclipse/ditto/connectivity/api/ConnectivityMessagingConstants.java b/connectivity/api/src/main/java/org/eclipse/ditto/connectivity/api/ConnectivityMessagingConstants.java index 8755555e31..5aef4f1ccc 100644 --- a/connectivity/api/src/main/java/org/eclipse/ditto/connectivity/api/ConnectivityMessagingConstants.java +++ b/connectivity/api/src/main/java/org/eclipse/ditto/connectivity/api/ConnectivityMessagingConstants.java @@ -26,7 +26,7 @@ public final class ConnectivityMessagingConstants { public static final String SHARD_REGION = "connection"; /** - * Name of the akka cluster role. + * Name of the pekko cluster role. */ public static final String CLUSTER_ROLE = "connectivity"; diff --git a/connectivity/api/src/main/java/org/eclipse/ditto/connectivity/api/MultiMappedOutboundSignal.java b/connectivity/api/src/main/java/org/eclipse/ditto/connectivity/api/MultiMappedOutboundSignal.java index 191d4a184b..c91f990354 100644 --- a/connectivity/api/src/main/java/org/eclipse/ditto/connectivity/api/MultiMappedOutboundSignal.java +++ b/connectivity/api/src/main/java/org/eclipse/ditto/connectivity/api/MultiMappedOutboundSignal.java @@ -29,7 +29,7 @@ import org.eclipse.ditto.connectivity.model.Target; import org.eclipse.ditto.base.model.signals.Signal; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Represent outbound signals that was mapped from one signal. diff --git a/connectivity/api/src/main/java/org/eclipse/ditto/connectivity/api/OutboundSignal.java b/connectivity/api/src/main/java/org/eclipse/ditto/connectivity/api/OutboundSignal.java index 0ba757f48d..8ddb8627cb 100644 --- a/connectivity/api/src/main/java/org/eclipse/ditto/connectivity/api/OutboundSignal.java +++ b/connectivity/api/src/main/java/org/eclipse/ditto/connectivity/api/OutboundSignal.java @@ -31,7 +31,7 @@ import org.eclipse.ditto.json.JsonObject; import org.eclipse.ditto.protocol.Adaptable; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Represents an outbound signal i.e. a signal that is sent from Ditto to an external target. It contains the diff --git a/connectivity/api/src/main/java/org/eclipse/ditto/connectivity/api/OutboundSignalFactory.java b/connectivity/api/src/main/java/org/eclipse/ditto/connectivity/api/OutboundSignalFactory.java index 69e94a33c9..8189b26214 100644 --- a/connectivity/api/src/main/java/org/eclipse/ditto/connectivity/api/OutboundSignalFactory.java +++ b/connectivity/api/src/main/java/org/eclipse/ditto/connectivity/api/OutboundSignalFactory.java @@ -23,7 +23,7 @@ import org.eclipse.ditto.internal.utils.cluster.MappingStrategies; import org.eclipse.ditto.base.model.signals.Signal; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Creates instances of {@link OutboundSignal}. diff --git a/connectivity/api/src/test/java/org/eclipse/ditto/connectivity/api/InboundSignalTest.java b/connectivity/api/src/test/java/org/eclipse/ditto/connectivity/api/InboundSignalTest.java index 54d3607a10..3d35302936 100644 --- a/connectivity/api/src/test/java/org/eclipse/ditto/connectivity/api/InboundSignalTest.java +++ b/connectivity/api/src/test/java/org/eclipse/ditto/connectivity/api/InboundSignalTest.java @@ -29,11 +29,11 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; -import akka.serialization.Serialization; -import akka.serialization.SerializationExtension; -import akka.serialization.Serializer; -import akka.serialization.Serializers; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.serialization.Serialization; +import org.apache.pekko.serialization.SerializationExtension; +import org.apache.pekko.serialization.Serializer; +import org.apache.pekko.serialization.Serializers; import nl.jqno.equalsverifier.EqualsVerifier; /** diff --git a/connectivity/api/src/test/resources/test.conf b/connectivity/api/src/test/resources/test.conf index 5439566322..32664069ad 100644 --- a/connectivity/api/src/test/resources/test.conf +++ b/connectivity/api/src/test/resources/test.conf @@ -2,14 +2,14 @@ ditto { mapping-strategy.implementation = "org.eclipse.ditto.connectivity.api.ConnectivityMappingStrategies" } -akka { +pekko { actor { enable-additional-serialization-bindings = on serializers { json = "org.eclipse.ditto.internal.utils.cluster.JsonJsonifiableSerializer" cbor = "org.eclipse.ditto.internal.utils.cluster.CborJsonifiableSerializer" cbor-json-value = "org.eclipse.ditto.internal.utils.cluster.CborJsonValueSerializer" - jackson-cbor = "akka.serialization.jackson.JacksonCborSerializer" + jackson-cbor = "org.apache.pekko.serialization.jackson.JacksonCborSerializer" } serialization-bindings { # Serialize Jsonifiable events with custom JSON serializer: @@ -17,7 +17,7 @@ akka { "org.eclipse.ditto.base.model.exceptions.DittoRuntimeException" = cbor "org.eclipse.ditto.base.api.devops.signals.commands.DevOpsCommandResponse" = json # to ensure readability "org.eclipse.ditto.json.JsonValue" = cbor-json-value - "org.eclipse.ditto.internal.utils.cluster.AkkaJacksonCborSerializable" = jackson-cbor + "org.eclipse.ditto.internal.utils.cluster.PekkoJacksonCborSerializable" = jackson-cbor } } } diff --git a/connectivity/model/src/main/java/org/eclipse/ditto/connectivity/model/Topic.java b/connectivity/model/src/main/java/org/eclipse/ditto/connectivity/model/Topic.java index 339dbd5b6b..f2609875ae 100644 --- a/connectivity/model/src/main/java/org/eclipse/ditto/connectivity/model/Topic.java +++ b/connectivity/model/src/main/java/org/eclipse/ditto/connectivity/model/Topic.java @@ -50,7 +50,7 @@ public enum Topic { } /** - * @return the corresponding pubsub topic used to subscribe to events of this type in the akka cluster + * @return the corresponding pubsub topic used to subscribe to events of this type in the pekko cluster */ public String getPubSubTopic() { return pubSubTopic; diff --git a/connectivity/service/pom.xml b/connectivity/service/pom.xml index 981d8aea54..11ac49bd29 100644 --- a/connectivity/service/pom.xml +++ b/connectivity/service/pom.xml @@ -117,16 +117,16 @@ hivemq-mqtt-client - com.newmotion - akka-rabbitmq_${scala.version} + com.github.pjfanning + pekko-rabbitmq_${scala.version} - com.typesafe.akka - akka-stream-kafka_${scala.version} + org.apache.pekko + pekko-connectors-kafka_${scala.version} - com.typesafe.akka - akka-http_${scala.version} + org.apache.pekko + pekko-http_${scala.version} org.mozilla @@ -183,8 +183,8 @@ jmh-generator-annprocess). jmh-generator-annprocess overwrites the whole META-IN test - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test @@ -201,7 +201,7 @@ jmh-generator-annprocess). jmh-generator-annprocess overwrites the whole META-IN org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko test test-jar @@ -224,8 +224,8 @@ jmh-generator-annprocess). jmh-generator-annprocess overwrites the whole META-IN test-jar - com.github.dnvriend - akka-persistence-inmemory_${scala.version} + io.github.alstanchev + pekko-persistence-inmemory_${scala.version} test @@ -239,8 +239,8 @@ jmh-generator-annprocess). jmh-generator-annprocess overwrites the whole META-IN test - com.typesafe.akka - akka-stream-kafka-testkit_${scala.version} + org.apache.pekko + pekko-connectors-kafka-testkit_${scala.version} test diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/ConnectivityRootActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/ConnectivityRootActor.java index 9a3357892a..3e774daa17 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/ConnectivityRootActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/ConnectivityRootActor.java @@ -27,7 +27,7 @@ import org.eclipse.ditto.connectivity.service.messaging.persistence.ConnectionSupervisorActor; import org.eclipse.ditto.edge.service.dispatching.EdgeCommandForwarderActor; import org.eclipse.ditto.edge.service.dispatching.ShardRegions; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.cluster.ClusterUtil; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.internal.utils.cluster.ShardRegionExtractor; @@ -46,14 +46,14 @@ import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.actor.SupervisorStrategy; -import akka.cluster.sharding.ClusterSharding; -import akka.cluster.sharding.ClusterShardingSettings; -import akka.event.DiagnosticLoggingAdapter; -import akka.japi.pf.DeciderBuilder; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.cluster.sharding.ClusterSharding; +import org.apache.pekko.cluster.sharding.ClusterShardingSettings; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.japi.pf.DeciderBuilder; import scala.PartialFunction; /** @@ -128,11 +128,11 @@ private ConnectivityRootActor(final ConnectivityConfig connectivityConfig, } /** - * Creates Akka configuration object Props for this ConnectivityRootActor. + * Creates Pekko configuration object Props for this ConnectivityRootActor. * * @param connectivityConfig the configuration of the Connectivity service. * @param pubSubMediator the PubSub mediator Actor. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final ConnectivityConfig connectivityConfig, final ActorRef pubSubMediator) { diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/ConnectivityService.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/ConnectivityService.java index 398528ca7e..2bda09c43c 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/ConnectivityService.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/ConnectivityService.java @@ -23,14 +23,14 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigValueFactory; -import akka.actor.ActorRef; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; /** * Entry point of the Connectivity service. * */ @AllParametersAndReturnValuesAreNonnullByDefault @@ -39,7 +39,7 @@ public final class ConnectivityService extends DittoService private static final Logger LOGGER = LoggerFactory.getLogger(ConnectivityService.class); /** - * Name for the Akka Actor System of the Connectivity service. + * Name for the Pekko Actor System of the Connectivity service. */ public static final String SERVICE_NAME = "connectivity"; @@ -68,7 +68,7 @@ protected Props getMainRootActorProps(final ConnectivityConfig connectivityConfi } @Override - protected Config appendAkkaPersistenceMongoUriToRawConfig() { + protected Config appendPekkoPersistenceMongoUriToRawConfig() { final var mongoDbConfig = serviceSpecificConfig.getMongoDbConfig(); final String mongoDbUri = mongoDbConfig.getMongoDbUri(); return rawConfig.withValue(MONGO_URI_CONFIG_PATH, ConfigValueFactory.fromAnyRef(mongoDbUri)); diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/ConnectionConfigProvider.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/ConnectionConfigProvider.java index c78873b711..11dd516f72 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/ConnectionConfigProvider.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/ConnectionConfigProvider.java @@ -24,7 +24,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Provides methods to load {@link ConnectivityConfig} and register for changes to {@link ConnectivityConfig}. @@ -57,7 +57,7 @@ CompletionStage registerForConnectivityConfigChanges(ConnectionId connecti /** * Returns {@code true} if the implementation can handle the given {@code event} to generate a modified {@link ConnectivityConfig} - * when passed to {@link #handleEvent(org.eclipse.ditto.base.model.signals.events.Event, akka.actor.ActorRef, akka.actor.ActorRef)}. + * when passed to {@link #handleEvent(org.eclipse.ditto.base.model.signals.events.Event, org.apache.pekko.actor.ActorRef, org.apache.pekko.actor.ActorRef)}. * * @param event the event that may be used to generate modified config * @return {@code true} if the event is compatible diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/ConnectionConfigProviderFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/ConnectionConfigProviderFactory.java index 72755f3031..3cbce1856e 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/ConnectionConfigProviderFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/ConnectionConfigProviderFactory.java @@ -22,11 +22,11 @@ import com.typesafe.config.Config; -import akka.actor.AbstractExtensionId; -import akka.actor.ActorSystem; -import akka.actor.DynamicAccess; -import akka.actor.ExtendedActorSystem; -import akka.actor.Extension; +import org.apache.pekko.actor.AbstractExtensionId; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.DynamicAccess; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.actor.Extension; import scala.Tuple2; import scala.jdk.javaapi.CollectionConverters; import scala.reflect.ClassTag; diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/ConnectivityConfigModifiedBehavior.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/ConnectivityConfigModifiedBehavior.java index 966281e9e2..5155cbf94e 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/ConnectivityConfigModifiedBehavior.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/ConnectivityConfigModifiedBehavior.java @@ -22,10 +22,10 @@ import com.typesafe.config.Config; -import akka.actor.AbstractActor; -import akka.actor.Actor; -import akka.actor.ActorRef; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.Actor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Behavior to modify this actor's {@link ConnectivityConfig} and register for changes to {@link ConnectivityConfig}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DefaultHonoConfig.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DefaultHonoConfig.java index fe42bc5402..64f4ce9674 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DefaultHonoConfig.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DefaultHonoConfig.java @@ -32,7 +32,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Default implementation for {@link HonoConfig}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DefaultKafkaCommitterConfig.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DefaultKafkaCommitterConfig.java index ba01fbb7cb..9595bdcc06 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DefaultKafkaCommitterConfig.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DefaultKafkaCommitterConfig.java @@ -26,12 +26,12 @@ final class DefaultKafkaCommitterConfig implements KafkaCommitterConfig { private static final String CONFIG_PATH = "committer"; - private static final String ALPAKKA_PATH = "alpakka"; + private static final String PEKKO_CONNECTORS_PATH = "pekko-connectors"; - private final Config alpakkaConfig; + private final Config pekkoConnectorsConfig; private DefaultKafkaCommitterConfig(final Config kafkaCommitterScopedConfig) { - alpakkaConfig = getConfigOrEmpty(kafkaCommitterScopedConfig, ALPAKKA_PATH); + pekkoConnectorsConfig = getConfigOrEmpty(kafkaCommitterScopedConfig, PEKKO_CONNECTORS_PATH); } /** @@ -50,8 +50,8 @@ private static Config getConfigOrEmpty(final Config config, final String configK } @Override - public Config getAlpakkaConfig() { - return alpakkaConfig; + public Config getPekkoConnectorsConfig() { + return pekkoConnectorsConfig; } @Override @@ -63,18 +63,18 @@ public boolean equals(final Object o) { return false; } final DefaultKafkaCommitterConfig that = (DefaultKafkaCommitterConfig) o; - return Objects.equals(alpakkaConfig, that.alpakkaConfig); + return Objects.equals(pekkoConnectorsConfig, that.pekkoConnectorsConfig); } @Override public int hashCode() { - return Objects.hash(alpakkaConfig); + return Objects.hash(pekkoConnectorsConfig); } @Override public String toString() { return getClass().getSimpleName() + " [" + - "alpakkaConfig=" + alpakkaConfig + + "pekkoConnectorsConfig=" + pekkoConnectorsConfig + "]"; } diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DefaultKafkaConsumerConfig.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DefaultKafkaConsumerConfig.java index 667e64d67a..f9b728371e 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DefaultKafkaConsumerConfig.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DefaultKafkaConsumerConfig.java @@ -31,12 +31,12 @@ final class DefaultKafkaConsumerConfig implements KafkaConsumerConfig { private static final String CONFIG_PATH = "consumer"; - private static final String ALPAKKA_PATH = "alpakka"; + private static final String PEKKO_CONNECTORS_PATH = "pekko-connectors"; private static final String RESTART_PATH = "restart"; private final ConnectionThrottlingConfig throttlingConfig; private final ExponentialBackOffConfig restartBackOffConfig; - private final Config alpakkaConfig; + private final Config pekkoConnectorsConfig; private final Duration metricCollectingInterval; private final long initTimeoutSeconds; @@ -44,7 +44,7 @@ private DefaultKafkaConsumerConfig(final Config kafkaConsumerScopedConfig) { throttlingConfig = ConnectionThrottlingConfig.of(kafkaConsumerScopedConfig); restartBackOffConfig = DefaultExponentialBackOffConfig.of(getConfigOrEmpty(kafkaConsumerScopedConfig, RESTART_PATH)); - alpakkaConfig = getConfigOrEmpty(kafkaConsumerScopedConfig, ALPAKKA_PATH); + pekkoConnectorsConfig = getConfigOrEmpty(kafkaConsumerScopedConfig, PEKKO_CONNECTORS_PATH); metricCollectingInterval = kafkaConsumerScopedConfig.getDuration(ConfigValue.METRIC_COLLECTING_INTERVAL.getConfigPath()); if (metricCollectingInterval.isNegative() || metricCollectingInterval.isZero()) { @@ -79,8 +79,8 @@ public ExponentialBackOffConfig getRestartBackOffConfig() { } @Override - public Config getAlpakkaConfig() { - return alpakkaConfig; + public Config getPekkoConnectorsConfig() { + return pekkoConnectorsConfig; } @Override @@ -104,14 +104,14 @@ public boolean equals(final Object o) { final DefaultKafkaConsumerConfig that = (DefaultKafkaConsumerConfig) o; return Objects.equals(throttlingConfig, that.throttlingConfig) && Objects.equals(restartBackOffConfig, that.restartBackOffConfig) && - Objects.equals(alpakkaConfig, that.alpakkaConfig) && + Objects.equals(pekkoConnectorsConfig, that.pekkoConnectorsConfig) && Objects.equals(metricCollectingInterval, that.metricCollectingInterval) && Objects.equals(initTimeoutSeconds, that.initTimeoutSeconds); } @Override public int hashCode() { - return Objects.hash(throttlingConfig, restartBackOffConfig, alpakkaConfig, metricCollectingInterval, + return Objects.hash(throttlingConfig, restartBackOffConfig, pekkoConnectorsConfig, metricCollectingInterval, initTimeoutSeconds); } @@ -120,7 +120,7 @@ public String toString() { return getClass().getSimpleName() + " [" + "throttlingConfig=" + throttlingConfig + ", restartBackOffConfig=" + restartBackOffConfig + - ", alpakkaConfig=" + alpakkaConfig + + ", pekkoConnectorsConfig=" + pekkoConnectorsConfig + ", metricCollectingInterval=" + metricCollectingInterval + ", initTimeoutSeconds=" + initTimeoutSeconds + "]"; diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DefaultKafkaProducerConfig.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DefaultKafkaProducerConfig.java index 1f1df801c1..12dc2fd556 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DefaultKafkaProducerConfig.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DefaultKafkaProducerConfig.java @@ -28,7 +28,7 @@ final class DefaultKafkaProducerConfig implements KafkaProducerConfig { private static final String CONFIG_PATH = "producer"; - private static final String ALPAKKA_PATH = "alpakka"; + private static final String PEKKO_CONNECTORS_PATH = "pekko-connectors"; private final int queueSize; private final int parallelism; @@ -37,7 +37,7 @@ final class DefaultKafkaProducerConfig implements KafkaProducerConfig { private final double randomFactor; private final int maxRestartsCount; private final Duration maxRestartsWithin; - private final Config alpakkaConfig; + private final Config pekkoConnectorsConfig; private final long initTimeoutSeconds; private DefaultKafkaProducerConfig(final Config kafkaProducerScopedConfig) { @@ -48,7 +48,7 @@ private DefaultKafkaProducerConfig(final Config kafkaProducerScopedConfig) { randomFactor = kafkaProducerScopedConfig.getDouble(ConfigValue.RANDOM_FACTOR.getConfigPath()); maxRestartsCount = kafkaProducerScopedConfig.getInt(ConfigValue.MAX_RESTARTS_COUNT.getConfigPath()); maxRestartsWithin = kafkaProducerScopedConfig.getDuration(ConfigValue.MAX_RESTARTS_WITHIN.getConfigPath()); - alpakkaConfig = kafkaProducerScopedConfig.getConfig(ALPAKKA_PATH); + pekkoConnectorsConfig = kafkaProducerScopedConfig.getConfig(PEKKO_CONNECTORS_PATH); initTimeoutSeconds = kafkaProducerScopedConfig.getLong(ConfigValue.INIT_TIMEOUT_SECONDS.getConfigPath()); } @@ -100,8 +100,8 @@ public Duration getMaxRestartsWithin() { } @Override - public Config getAlpakkaConfig() { - return alpakkaConfig; + public Config getPekkoConnectorsConfig() { + return pekkoConnectorsConfig; } @Override @@ -121,14 +121,14 @@ public boolean equals(final Object o) { Objects.equals(randomFactor, that.randomFactor) && Objects.equals(maxRestartsCount, that.maxRestartsCount) && Objects.equals(maxRestartsWithin, that.maxRestartsWithin) && - Objects.equals(alpakkaConfig, that.alpakkaConfig) && + Objects.equals(pekkoConnectorsConfig, that.pekkoConnectorsConfig) && Objects.equals(initTimeoutSeconds, that.initTimeoutSeconds); } @Override public int hashCode() { return Objects.hash(queueSize, parallelism, minBackoff, maxBackoff, maxRestartsCount, maxRestartsWithin, - randomFactor, alpakkaConfig, initTimeoutSeconds); + randomFactor, pekkoConnectorsConfig, initTimeoutSeconds); } @Override @@ -141,7 +141,7 @@ public String toString() { ", randomFactor=" + randomFactor + ", maxRestartsCount=" + maxRestartsCount + ", maxRestartsWithin=" + maxRestartsWithin + - ", alpakkaConfig=" + alpakkaConfig + + ", pekkoConnectorsConfig=" + pekkoConnectorsConfig + ", initTimeoutSeconds=" + initTimeoutSeconds + "]"; } diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DittoConnectionConfigProvider.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DittoConnectionConfigProvider.java index e2d9f3d1ab..a9b7844d7f 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DittoConnectionConfigProvider.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/DittoConnectionConfigProvider.java @@ -24,8 +24,8 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; /** * Default implementation of {@link ConnectionConfigProvider} which simply builds and returns a diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/KafkaCommitterConfig.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/KafkaCommitterConfig.java index 44e2e69521..d124f7251c 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/KafkaCommitterConfig.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/KafkaCommitterConfig.java @@ -27,7 +27,7 @@ public interface KafkaCommitterConfig { * * @return consumer configuration needed by the Kafka client. */ - Config getAlpakkaConfig(); + Config getPekkoConnectorsConfig(); /** * Returns an instance of {@code KafkaCommitterConfig} based on the settings of the specified Config. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/KafkaConsumerConfig.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/KafkaConsumerConfig.java index dd72dcc42b..2c982fec89 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/KafkaConsumerConfig.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/KafkaConsumerConfig.java @@ -47,7 +47,7 @@ public interface KafkaConsumerConfig { * * @return consumer configuration needed by the Kafka client. */ - Config getAlpakkaConfig(); + Config getPekkoConnectorsConfig(); /** * Returns the interval in which metrics from the Apache Kafka client should be collected. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/KafkaProducerConfig.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/KafkaProducerConfig.java index d7e0004739..3135dd1892 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/KafkaProducerConfig.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/config/KafkaProducerConfig.java @@ -66,7 +66,7 @@ public interface KafkaProducerConfig { * * @return consumer configuration needed by the Kafka client. */ - Config getAlpakkaConfig(); + Config getPekkoConnectorsConfig(); /** * @return timeout before the producer is initialized and considered "ready". diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/ConnectionEnforcerActorPropsFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/ConnectionEnforcerActorPropsFactory.java index a2f80255bb..994ad02603 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/ConnectionEnforcerActorPropsFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/ConnectionEnforcerActorPropsFactory.java @@ -20,8 +20,8 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; -import akka.actor.Props; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; /** * Responsible to provide the props of the actor that should be used to enforce connection commands. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/NoOpEnforcerActorPropsFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/NoOpEnforcerActorPropsFactory.java index 7a7ec4efbd..04d6f1065b 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/NoOpEnforcerActorPropsFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/NoOpEnforcerActorPropsFactory.java @@ -16,10 +16,10 @@ import com.typesafe.config.Config; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; public final class NoOpEnforcerActorPropsFactory implements ConnectionEnforcerActorPropsFactory { diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/pre/ConnectionExistenceChecker.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/pre/ConnectionExistenceChecker.java index 24fa1f9109..e5e99d4e2e 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/pre/ConnectionExistenceChecker.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/pre/ConnectionExistenceChecker.java @@ -26,8 +26,8 @@ import com.github.benmanes.caffeine.cache.AsyncCacheLoader; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; /** * checks for the existence of connections. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/pre/ModifyToCreateConnectionTransformer.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/pre/ModifyToCreateConnectionTransformer.java index 5d713fe578..061b3920fa 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/pre/ModifyToCreateConnectionTransformer.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/pre/ModifyToCreateConnectionTransformer.java @@ -22,7 +22,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Transforms a ModifyConnection into a CreateConnection if the connection does not exist already. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/pre/PreEnforcementConnectionIdCacheLoader.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/pre/PreEnforcementConnectionIdCacheLoader.java index 8968c77b10..1992c5d2cf 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/pre/PreEnforcementConnectionIdCacheLoader.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/enforcement/pre/PreEnforcementConnectionIdCacheLoader.java @@ -29,8 +29,8 @@ import com.github.benmanes.caffeine.cache.AsyncCacheLoader; -import akka.actor.ActorRef; -import akka.actor.Scheduler; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Scheduler; /** * Cache loader used for Connection existence check in pre-enforcement. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/AbstractMessageMapper.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/AbstractMessageMapper.java index 69b278e846..b6a4ab365a 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/AbstractMessageMapper.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/AbstractMessageMapper.java @@ -30,7 +30,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Abstract implementation of {@link MessageMapper} which adds an id field and also its initialization from mapping diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/CloudEventsMapper.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/CloudEventsMapper.java index 1c5d913ddd..a84fecc7e4 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/CloudEventsMapper.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/CloudEventsMapper.java @@ -37,7 +37,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * A message mapper implementation for the Mapping incoming CloudEvents to Ditto Protocol. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/ConnectionStatusMessageMapper.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/ConnectionStatusMessageMapper.java index b8c2df05fb..cbafc5a9e4 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/ConnectionStatusMessageMapper.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/ConnectionStatusMessageMapper.java @@ -30,8 +30,8 @@ import org.eclipse.ditto.connectivity.model.MessageMapperConfigurationInvalidException; import org.eclipse.ditto.connectivity.model.MessageMappingFailedException; import org.eclipse.ditto.connectivity.service.config.mapping.MappingConfig; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.json.JsonFactory; import org.eclipse.ditto.json.JsonPointer; import org.eclipse.ditto.json.JsonValue; @@ -50,7 +50,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * This mapper extracts the headers {@code creation-time} and {@code ttd} from the message and builds a diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/ConnectivitySignalEnrichmentProvider.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/ConnectivitySignalEnrichmentProvider.java index 27ce3938b9..8d132ffabe 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/ConnectivitySignalEnrichmentProvider.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/ConnectivitySignalEnrichmentProvider.java @@ -21,7 +21,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Provider of {@link SignalEnrichmentFacade} to be loaded by reflection. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/DefaultConnectivitySignalEnrichmentProvider.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/DefaultConnectivitySignalEnrichmentProvider.java index 404a70bd95..8c6ec02c97 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/DefaultConnectivitySignalEnrichmentProvider.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/DefaultConnectivitySignalEnrichmentProvider.java @@ -21,7 +21,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Provider for Connectivity-service of signal-enriching facades that uses an async Caffeine cache in order to load diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/DefaultMessageMapperFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/DefaultMessageMapperFactory.java index 5d62d9beeb..6ede80bf14 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/DefaultMessageMapperFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/DefaultMessageMapperFactory.java @@ -30,14 +30,14 @@ import org.eclipse.ditto.connectivity.model.MessageMapperConfigurationInvalidException; import org.eclipse.ditto.connectivity.model.PayloadMappingDefinition; import org.eclipse.ditto.connectivity.service.config.ConnectivityConfig; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.config.ScopedConfig; import org.eclipse.ditto.json.JsonObject; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.event.LoggingAdapter; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.event.LoggingAdapter; /** * Encapsulates responsibility for instantiating {@link MessageMapper} objects. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/DittoMessageMapper.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/DittoMessageMapper.java index d59159fb1a..e9edfeb3c6 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/DittoMessageMapper.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/DittoMessageMapper.java @@ -31,7 +31,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * A message mapper implementation for the Ditto Protocol. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/ImplicitThingCreationMessageMapper.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/ImplicitThingCreationMessageMapper.java index 492b58c4fe..a595cd6769 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/ImplicitThingCreationMessageMapper.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/ImplicitThingCreationMessageMapper.java @@ -36,8 +36,8 @@ import org.eclipse.ditto.connectivity.service.config.mapping.MappingConfig; import org.eclipse.ditto.connectivity.service.placeholders.ConnectivityPlaceholders; import org.eclipse.ditto.edge.service.placeholders.RequestPlaceholder; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.json.JsonFactory; import org.eclipse.ditto.json.JsonField; import org.eclipse.ditto.json.JsonObject; @@ -59,7 +59,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * This mapper creates a {@link org.eclipse.ditto.things.model.signals.commands.modify.CreateThing} command from diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/MessageMapper.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/MessageMapper.java index 542d2dcf0c..016491014a 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/MessageMapper.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/MessageMapper.java @@ -28,7 +28,7 @@ import org.eclipse.ditto.json.JsonObject; import org.eclipse.ditto.protocol.Adaptable; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Defines a message mapper which maps a {@link ExternalMessage} to a {@link Adaptable} and vice versa. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/MessageMapperExtension.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/MessageMapperExtension.java index 1d8121cd9d..bccaf9f52a 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/MessageMapperExtension.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/MessageMapperExtension.java @@ -22,7 +22,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Interface for wrapping an existing message mapper after creation. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/MessageMapperProvider.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/MessageMapperProvider.java index fea5c4efbd..81b02deeb2 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/MessageMapperProvider.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/MessageMapperProvider.java @@ -24,7 +24,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Extension to provide all configured {@link MessageMapper} implementations. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/NoOpMessageMapperExtension.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/NoOpMessageMapperExtension.java index e83cb69270..c2a8592c86 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/NoOpMessageMapperExtension.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/NoOpMessageMapperExtension.java @@ -18,7 +18,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; public class NoOpMessageMapperExtension implements MessageMapperExtension { diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/NormalizedMessageMapper.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/NormalizedMessageMapper.java index 7febc299d8..ade0d06c34 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/NormalizedMessageMapper.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/NormalizedMessageMapper.java @@ -43,7 +43,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * A message mapper implementation for normalized changes. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/RawMessageMapper.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/RawMessageMapper.java index b2a0995c1d..7042911c7a 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/RawMessageMapper.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/RawMessageMapper.java @@ -62,8 +62,8 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.ContentTypes; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.ContentTypes; /** * A message mapper implementation to convert between raw message payload and external message payload. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/UpdateTwinWithLiveResponseMessageMapper.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/UpdateTwinWithLiveResponseMessageMapper.java index 86e7ca297a..1e07206be9 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/UpdateTwinWithLiveResponseMessageMapper.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/UpdateTwinWithLiveResponseMessageMapper.java @@ -36,8 +36,8 @@ import org.eclipse.ditto.connectivity.service.config.mapping.MappingConfig; import org.eclipse.ditto.connectivity.service.placeholders.ConnectivityPlaceholders; import org.eclipse.ditto.edge.service.placeholders.RequestPlaceholder; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.json.JsonFactory; import org.eclipse.ditto.json.JsonObject; import org.eclipse.ditto.json.JsonPointer; @@ -57,7 +57,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * This mapper creates a {@link MergeThing} command when a {@link ThingQueryCommandResponse} was received via the diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/WrappingMessageMapper.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/WrappingMessageMapper.java index a84d111a08..3d739b2588 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/WrappingMessageMapper.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/WrappingMessageMapper.java @@ -30,7 +30,7 @@ import org.eclipse.ditto.json.JsonObject; import org.eclipse.ditto.protocol.Adaptable; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Enforce message size limits on a {@link MessageMapper} and adds random correlation IDs should they not be present diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/javascript/JavaScriptMessageMapperRhino.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/javascript/JavaScriptMessageMapperRhino.java index fe30a1d63d..8819e7aefb 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/javascript/JavaScriptMessageMapperRhino.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/mapping/javascript/JavaScriptMessageMapperRhino.java @@ -45,7 +45,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * This mapper executes its mapping methods on the current thread. The caller should be aware of that. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/AbstractMappingProcessor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/AbstractMappingProcessor.java index 82796a6076..e0f41117c7 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/AbstractMappingProcessor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/AbstractMappingProcessor.java @@ -31,7 +31,7 @@ import org.eclipse.ditto.connectivity.service.mapping.MessageMapper; import org.eclipse.ditto.connectivity.service.mapping.MessageMapperRegistry; import org.eclipse.ditto.connectivity.service.messaging.mappingoutcome.MappingOutcome; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.placeholders.ExpressionResolver; import org.eclipse.ditto.placeholders.PlaceholderFactory; import org.eclipse.ditto.placeholders.PlaceholderFilter; diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BaseClientActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BaseClientActor.java index 0c026c0ced..36cba4c18e 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BaseClientActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BaseClientActor.java @@ -118,8 +118,8 @@ import org.eclipse.ditto.edge.service.headers.DittoHeadersValidator; import org.eclipse.ditto.edge.service.streaming.StreamingSubscriptionManager; import org.eclipse.ditto.internal.models.signal.correlation.MatchingValidationResult; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.config.InstanceIdentifierSupplier; import org.eclipse.ditto.internal.utils.config.ScopedConfig; import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; @@ -134,26 +134,26 @@ import com.typesafe.config.Config; -import akka.Done; -import akka.NotUsed; -import akka.actor.AbstractFSMWithStash; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.actor.Cancellable; -import akka.actor.CoordinatedShutdown; -import akka.actor.FSM; -import akka.actor.OneForOneStrategy; -import akka.actor.Props; -import akka.actor.Status; -import akka.actor.SupervisorStrategy; -import akka.cluster.pubsub.DistributedPubSub; -import akka.japi.Pair; -import akka.japi.pf.DeciderBuilder; -import akka.japi.pf.FSMStateFunctionBuilder; -import akka.pattern.Patterns; -import akka.stream.Materializer; -import akka.stream.javadsl.Sink; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.AbstractFSMWithStash; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Cancellable; +import org.apache.pekko.actor.CoordinatedShutdown; +import org.apache.pekko.actor.FSM; +import org.apache.pekko.actor.OneForOneStrategy; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.cluster.pubsub.DistributedPubSub; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.japi.pf.DeciderBuilder; +import org.apache.pekko.japi.pf.FSMStateFunctionBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.Sink; /** * Base class for ClientActors which implement the connection handling for various connectivity protocols. @@ -294,7 +294,7 @@ public void preStart() throws Exception { // volatile states // // DO NOT use state timeout: - // FSM state timeout gets reset by any message, AND cannot be longer than 5 minutes (Akka v2.5.23). + // FSM state timeout gets reset by any message, AND cannot be longer than 5 minutes (Pekko v2.5.23). when(DISCONNECTING, inDisconnectingState()); when(CONNECTING, inConnectingState()); when(TESTING, inTestingState()); @@ -374,7 +374,7 @@ private void addCoordinatedShutdownTasks() { cancelOnStopTasks.add(coordinatedShutdown.addCancellableTask(CoordinatedShutdown.PhaseServiceUnbind(), "service-unbind-" + id, askSelfShutdownTask(Control.SERVICE_UNBIND))); coordinatedShutdown.addActorTerminationTask(CoordinatedShutdown.PhaseServiceRequestsDone(), - "service-requests-done" + id, getSelf(), Optional.of(Control.SERVICE_REQUESTS_DONE)); + "service-requests-done-" + id, getSelf(), Optional.of(Control.SERVICE_REQUESTS_DONE)); } private boolean shouldAnyTargetSendConnectionAnnouncements() { @@ -444,8 +444,8 @@ private FSM.State completeInitialization() { } /** - * Handles {@link TestConnection} commands by returning a CompletionState of {@link akka.actor.Status.Status Status} - * which may be {@link akka.actor.Status.Success Success} or {@link akka.actor.Status.Failure Failure}. + * Handles {@link TestConnection} commands by returning a CompletionState of {@link org.apache.pekko.actor.Status.Status Status} + * which may be {@link org.apache.pekko.actor.Status.Success Success} or {@link org.apache.pekko.actor.Status.Failure Failure}. * * @param testConnectionCommand the Connection to test * @return the CompletionStage with the test result @@ -541,7 +541,7 @@ protected final Sink getInboundMappingSink() { /** * Escapes the passed actorName in a actorName valid way. Actor name should be a valid URL with ASCII letters, see - * also {@code akka.actor.ActorPath#isValidPathElement}, therefore we encode the name as an ASCII URL. + * also {@code pekko.actor.ActorPath#isValidPathElement}, therefore we encode the name as an ASCII URL. * * @param name the actorName to escape. * @return the escaped name. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BaseClientData.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BaseClientData.java index 9f2a3a43fd..68d99214c9 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BaseClientData.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BaseClientData.java @@ -29,8 +29,8 @@ import org.eclipse.ditto.connectivity.model.RecoveryStatus; import org.eclipse.ditto.connectivity.service.messaging.tunnel.SshTunnelState; -import akka.actor.ActorRef; -import akka.japi.Pair; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.japi.Pair; /** * The data the {@link BaseClientActor} has in its different {@link org.eclipse.ditto.connectivity.api.BaseClientState States}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BaseConsumerActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BaseConsumerActor.java index bf45d23cc4..f806cac697 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BaseConsumerActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BaseConsumerActor.java @@ -44,19 +44,19 @@ import org.eclipse.ditto.connectivity.service.messaging.monitoring.metrics.CounterKey; import org.eclipse.ditto.connectivity.service.messaging.monitoring.metrics.MetricAlertRegistry; import org.eclipse.ditto.edge.service.acknowledgements.AcknowledgementConfig; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.config.InstanceIdentifierSupplier; import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; import org.eclipse.ditto.internal.utils.metrics.instruments.tag.Tag; import org.eclipse.ditto.internal.utils.tracing.DittoTracing; import org.eclipse.ditto.internal.utils.tracing.span.SpanTagKey; -import akka.NotUsed; -import akka.actor.AbstractActorWithTimers; -import akka.actor.ActorRef; -import akka.pattern.Patterns; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Sink; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Sink; /** * Base class for consumer actors that holds common fields and handles the address status. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BasePublisherActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BasePublisherActor.java index 9583bd4e15..2495efae03 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BasePublisherActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BasePublisherActor.java @@ -74,8 +74,8 @@ import org.eclipse.ditto.connectivity.service.messaging.validation.ConnectionValidator; import org.eclipse.ditto.connectivity.service.placeholders.ConnectivityPlaceholders; import org.eclipse.ditto.connectivity.service.util.ConnectivityMdcEntryKey; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.config.InstanceIdentifierSupplier; import org.eclipse.ditto.internal.utils.tracing.DittoTracing; import org.eclipse.ditto.internal.utils.tracing.span.SpanOperationName; @@ -87,10 +87,10 @@ import org.eclipse.ditto.things.model.signals.commands.ThingCommand; import org.eclipse.ditto.thingsearch.model.signals.events.SubscriptionEvent; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Base class for publisher actors. Holds the map of configured targets. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ChildActorNanny.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ChildActorNanny.java index a859e1efae..d29b2133ee 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ChildActorNanny.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ChildActorNanny.java @@ -23,10 +23,10 @@ import javax.annotation.concurrent.NotThreadSafe; -import akka.actor.ActorRef; -import akka.actor.ActorRefFactory; -import akka.actor.Props; -import akka.event.LoggingAdapter; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.Props; +import org.apache.pekko.event.LoggingAdapter; /** * This class takes care to start and to stop child actors in the context of a particular {@link ActorRefFactory}. @@ -70,8 +70,8 @@ public static ChildActorNanny newInstance(final ActorRefFactory actorRefFactory, * @return the {@code ActorRef} of the created child actor. * @throws NullPointerException if any argument is {@code null}. * @throws IllegalArgumentException if {@code actorName} is empty. - * @throws akka.actor.InvalidActorNameException if {@code actorName} is invalid or already in use. - * @throws akka.ConfigurationException if deployment, dispatcher or mailbox configuration is wrong. + * @throws org.apache.pekko.actor.InvalidActorNameException if {@code actorName} is invalid or already in use. + * @throws org.apache.pekko.ConfigurationException if deployment, dispatcher or mailbox configuration is wrong. * @throws UnsupportedOperationException if invoked on an ActorSystem that uses a custom user guardian. */ public ActorRef startChildActor(final CharSequence actorName, final Props actorProps) { @@ -109,8 +109,8 @@ private static String encodeAsUsAscii(final String actorName) { * @return the {@code ActorRef} of the created child actor. * @throws NullPointerException if any argument is {@code null}. * @throws IllegalArgumentException if {@code baseActorName} is empty. - * @throws akka.actor.InvalidActorNameException if {@code actorName} is invalid or already in use. - * @throws akka.ConfigurationException if deployment, dispatcher or mailbox configuration is wrong. + * @throws org.apache.pekko.actor.InvalidActorNameException if {@code actorName} is invalid or already in use. + * @throws org.apache.pekko.ConfigurationException if deployment, dispatcher or mailbox configuration is wrong. * @throws UnsupportedOperationException if invoked on an ActorSystem that uses a custom user guardian. */ public ActorRef startChildActorConflictFree(final CharSequence baseActorName, final Props actorProps) { diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ClientActorPropsFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ClientActorPropsFactory.java index d5f5a6f086..7b4af2ec71 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ClientActorPropsFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ClientActorPropsFactory.java @@ -21,9 +21,9 @@ import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; /** * Creates actor {@link Props} based on the given {@link Connection}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ConnectionIdsRetrievalActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ConnectionIdsRetrievalActor.java index 9373a78fb3..58ef39d359 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ConnectionIdsRetrievalActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ConnectionIdsRetrievalActor.java @@ -36,22 +36,22 @@ import org.eclipse.ditto.connectivity.model.signals.events.ConnectionDeleted; import org.eclipse.ditto.connectivity.service.config.ConnectionIdsRetrievalConfig; import org.eclipse.ditto.connectivity.service.messaging.persistence.ConnectionPersistenceActor; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.internal.utils.persistence.mongo.streaming.MongoReadJournal; import org.eclipse.ditto.internal.utils.persistentactors.EmptyEvent; -import akka.NotUsed; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.cluster.pubsub.DistributedPubSub; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; -import akka.stream.Materializer; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.pubsub.DistributedPubSub; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** * Actor handling messages related to connections e.g. retrieving all connections ids. @@ -98,11 +98,11 @@ public void preStart() { } /** - * Creates Akka configuration object Props for this Actor. + * Creates Pekko configuration object Props for this Actor. * * @param readJournal readJournal to extract current PIDs from. * @param connectionIdsRetrievalConfig the config to build the pid suppliers from. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final MongoReadJournal readJournal, final ConnectionIdsRetrievalConfig connectionIdsRetrievalConfig) { diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/DefaultClientActorPropsFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/DefaultClientActorPropsFactory.java index 14bc5a34f1..4caacd5dd8 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/DefaultClientActorPropsFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/DefaultClientActorPropsFactory.java @@ -26,9 +26,9 @@ import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; /** * The default implementation of {@link ClientActorPropsFactory}. Singleton which is created just once diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ExternalMessageWithSender.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ExternalMessageWithSender.java index 038a60669d..a285cdd118 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ExternalMessageWithSender.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ExternalMessageWithSender.java @@ -14,7 +14,7 @@ import org.eclipse.ditto.connectivity.api.ExternalMessage; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * This record bundles an {@link ExternalMessage} with the sender of this message. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/InboundDispatchingSink.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/InboundDispatchingSink.java index 53d2ae0f27..a9c5de41d7 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/InboundDispatchingSink.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/InboundDispatchingSink.java @@ -83,8 +83,8 @@ import org.eclipse.ditto.internal.models.signal.type.SemanticSignalType; import org.eclipse.ditto.internal.models.signal.type.SignalTypeCategory; import org.eclipse.ditto.internal.models.signal.type.SignalTypeFormatException; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.messages.model.signals.commands.MessageCommand; import org.eclipse.ditto.placeholders.ExpressionResolver; import org.eclipse.ditto.placeholders.PlaceholderFactory; @@ -100,14 +100,14 @@ import org.eclipse.ditto.thingsearch.model.signals.commands.WithSubscriptionId; import org.eclipse.ditto.thingsearch.model.signals.commands.subscription.CreateSubscription; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorRefFactory; -import akka.actor.ActorSelection; -import akka.japi.pf.PFBuilder; -import akka.pattern.Patterns; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Sink; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Sink; import scala.PartialFunction; import scala.util.Either; import scala.util.Left; diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingOutcomes.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingOutcomes.java index aba07097bf..f96b2cdf3a 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingOutcomes.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingOutcomes.java @@ -21,7 +21,7 @@ import org.eclipse.ditto.connectivity.api.MappedInboundExternalMessage; import org.eclipse.ditto.connectivity.service.messaging.mappingoutcome.MappingOutcome; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Outcome of mapping one inbound external message. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingProcessor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingProcessor.java index 17e1a62c9f..416156c1d1 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingProcessor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingProcessor.java @@ -42,13 +42,13 @@ import org.eclipse.ditto.connectivity.service.messaging.mappingoutcome.MappingOutcome; import org.eclipse.ditto.connectivity.service.util.ConnectivityMdcEntryKey; import org.eclipse.ditto.edge.service.headers.DittoHeadersValidator; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.config.ScopedConfig; import org.eclipse.ditto.protocol.Adaptable; import org.eclipse.ditto.protocol.adapter.ProtocolAdapter; import org.eclipse.ditto.things.model.ThingConstants; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Processes incoming {@link ExternalMessage}s to {@link Signal}s. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingSink.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingSink.java index bcc3d704aa..24d1a766b1 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingSink.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingSink.java @@ -27,14 +27,14 @@ import org.eclipse.ditto.connectivity.service.config.mapping.MappingConfig; import org.eclipse.ditto.connectivity.service.messaging.mappingoutcome.MappingOutcome; import org.eclipse.ditto.connectivity.service.util.ConnectivityMdcEntryKey; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; - -import akka.NotUsed; -import akka.actor.Status; -import akka.dispatch.MessageDispatcher; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Sink; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; + +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.Status; +import org.apache.pekko.dispatch.MessageDispatcher; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Sink; /** * This class creates a Sink which is responsible for inbound payload mapping. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/LegacyBaseConsumerActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/LegacyBaseConsumerActor.java index 35da850c8d..68f4a53c25 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/LegacyBaseConsumerActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/LegacyBaseConsumerActor.java @@ -20,14 +20,14 @@ import org.eclipse.ditto.connectivity.model.Source; import org.eclipse.ditto.connectivity.service.config.ConnectivityConfig; import org.eclipse.ditto.connectivity.service.util.ConnectivityMdcEntryKey; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; -import akka.stream.Materializer; -import akka.stream.OverflowStrategy; -import akka.stream.QueueOfferResult; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.SourceQueueWithComplete; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.OverflowStrategy; +import org.apache.pekko.stream.QueueOfferResult; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.SourceQueueWithComplete; /** * This class provides the previous default of telling messages to a mapping actor instead of using a stream @@ -56,13 +56,13 @@ protected LegacyBaseConsumerActor(final Connection connection, final var materializer = Materializer.createMaterializer(this::getContext); - messageMappingSourceQueue = akka.stream.javadsl.Source + messageMappingSourceQueue = org.apache.pekko.stream.javadsl.Source .queue(connectivityConfig.getMappingConfig().getBufferSize(), OverflowStrategy.dropNew()) .to(getMessageMappingSink()) .run(materializer); - dreSourceQueue = akka.stream.javadsl.Source + dreSourceQueue = org.apache.pekko.stream.javadsl.Source .queue(connectivityConfig.getMappingConfig().getBufferSize(), OverflowStrategy.dropNew()) .to(getDittoRuntimeExceptionSink()) diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundDispatchingActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundDispatchingActor.java index 3e63e41d78..ce050060fb 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundDispatchingActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundDispatchingActor.java @@ -36,15 +36,15 @@ import org.eclipse.ditto.connectivity.api.OutboundSignalFactory; import org.eclipse.ditto.connectivity.model.Target; import org.eclipse.ditto.edge.service.acknowledgements.AcknowledgementForwarderActor; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.thingsearch.model.signals.events.SubscriptionEvent; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.Props; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * This Actor makes the decision whether to dispatch outbound signals and their acknowledgements or to drop them. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingProcessor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingProcessor.java index a1b398fa48..eafc7e8634 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingProcessor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingProcessor.java @@ -42,13 +42,13 @@ import org.eclipse.ditto.connectivity.service.mapping.MessageMapper; import org.eclipse.ditto.connectivity.service.mapping.MessageMapperRegistry; import org.eclipse.ditto.connectivity.service.messaging.mappingoutcome.MappingOutcome; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.protocol.Adaptable; import org.eclipse.ditto.protocol.ProtocolFactory; import org.eclipse.ditto.protocol.adapter.ProtocolAdapter; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; /** * Processes outgoing {@link Signal}s to {@link ExternalMessage}s. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingProcessorActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingProcessorActor.java index 869909f8b5..16dce0f0a0 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingProcessorActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingProcessorActor.java @@ -73,8 +73,8 @@ import org.eclipse.ditto.connectivity.service.util.ConnectivityMdcEntryKey; import org.eclipse.ditto.edge.service.headers.DittoHeadersValidator; import org.eclipse.ditto.internal.models.signalenrichment.SignalEnrichmentFacade; -import org.eclipse.ditto.internal.utils.akka.controlflow.AbstractGraphActor; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.controlflow.AbstractGraphActor; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.config.ScopedConfig; import org.eclipse.ditto.internal.utils.pubsub.StreamingType; import org.eclipse.ditto.json.JsonFactory; @@ -101,19 +101,19 @@ import org.eclipse.ditto.things.model.signals.commands.exceptions.ThingNotAccessibleException; import org.eclipse.ditto.things.model.signals.events.ThingEventToThingConverter; -import akka.Done; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.actor.Status; -import akka.japi.Pair; -import akka.japi.pf.PFBuilder; -import akka.stream.QueueOfferResult; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.stream.QueueOfferResult; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; import scala.PartialFunction; import scala.runtime.BoxedUnit; @@ -190,7 +190,7 @@ private OutboundMappingProcessorActor(final ActorRef clientActor, */ public static void issueWeakAcknowledgements(final Signal signal, final Predicate isWeakAckLabel, - final akka.actor.ActorContext actorContext, + final org.apache.pekko.actor.ActorContext actorContext, final ThreadSafeDittoLoggingAdapter log) { final Set requestedAcks = signal.getDittoHeaders().getAcknowledgementRequests(); final boolean customAckRequested = requestedAcks.stream() @@ -269,7 +269,7 @@ private int determinePoolSize(final int connectionPoolSize, final int maxPoolSiz } /** - * Creates Akka configuration object for this actor. + * Creates Pekko configuration object for this actor. * * @param clientActor the client actor that created this mapping actor. * @param outboundMappingProcessors the MessageMappingProcessors to use for outbound messages. If at least as many @@ -277,7 +277,7 @@ private int determinePoolSize(final int connectionPoolSize, final int maxPoolSiz * @param connection the connection. * @param connectivityConfig the config of the connectivity service with potential overwrites. * @param processorPoolSize how many message processing may happen in parallel per direction (incoming or outgoing). - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final ActorRef clientActor, final List outboundMappingProcessors, diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingSettings.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingSettings.java index 445e2dc90c..6126174029 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingSettings.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingSettings.java @@ -35,11 +35,11 @@ import org.eclipse.ditto.connectivity.service.messaging.validation.ConnectionValidator; import org.eclipse.ditto.connectivity.service.util.ConnectivityMdcEntryKey; import org.eclipse.ditto.edge.service.acknowledgements.AcknowledgementConfig; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.protocol.adapter.ProtocolAdapter; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; /** * All the information required to create an OutboundMappingProcessor. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundSignalToExternalMessage.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundSignalToExternalMessage.java index 96a9c3aae6..1aaee7907d 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundSignalToExternalMessage.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/OutboundSignalToExternalMessage.java @@ -26,8 +26,8 @@ import org.eclipse.ditto.connectivity.api.ExternalMessageFactory; import org.eclipse.ditto.connectivity.api.OutboundSignal; import org.eclipse.ditto.connectivity.model.HeaderMapping; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.placeholders.ExpressionResolver; import org.eclipse.ditto.placeholders.PlaceholderFilter; diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ResponseCollectorActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ResponseCollectorActor.java index 46af9b89d9..f198697f1a 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ResponseCollectorActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/ResponseCollectorActor.java @@ -20,14 +20,14 @@ import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; import org.eclipse.ditto.base.model.signals.Signal; import org.eclipse.ditto.base.model.signals.commands.CommandResponse; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; - -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.ReceiveTimeout; -import akka.japi.pf.ReceiveBuilder; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; + +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.ReceiveTimeout; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Actor that collects a fixed number of command responses, which may be acknowledgements. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/Sending.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/Sending.java index 5dc3a4ec67..e1783ed69c 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/Sending.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/Sending.java @@ -39,7 +39,7 @@ import org.eclipse.ditto.connectivity.model.Target; import org.eclipse.ditto.connectivity.service.messaging.monitoring.ConnectionMonitor; import org.eclipse.ditto.connectivity.service.messaging.validation.ConnectionValidator; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.json.JsonValue; import org.eclipse.ditto.placeholders.ExpressionResolver; diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpClientActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpClientActor.java index be979949e9..8b12566b39 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpClientActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpClientActor.java @@ -74,21 +74,21 @@ import org.eclipse.ditto.connectivity.service.messaging.monitoring.metrics.ThrottledLoggerMetricsAlert; import org.eclipse.ditto.connectivity.service.messaging.tunnel.SshTunnelState; import org.eclipse.ditto.connectivity.service.util.ConnectivityMdcEntryKey; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.Done; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.FSM; -import akka.actor.Props; -import akka.actor.Status; -import akka.japi.pf.FSMStateFunctionBuilder; -import akka.pattern.Patterns; -import akka.stream.javadsl.Sink; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.FSM; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.japi.pf.FSMStateFunctionBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.javadsl.Sink; /** * Actor which manages a connection to an AMQP 1.0 server using the Qpid JMS client. @@ -168,16 +168,16 @@ private AmqpClientActor(final Connection connection, } /** - * Creates Akka configuration object for this actor. + * Creates Pekko configuration object for this actor. * * @param connection the connection. * @param commandForwarderActor the actor used to send signals into the ditto cluster. * @param connectionActor the connectionPersistenceActor which created this client. * @param configOverwrites an override for the default connectivity config values - * @param actorSystem the actor system. - * as Typesafe {@code Config} because this one is serializable in Akka by default. + * as Typesafe {@code Config} because this one is serializable in Pekko by default. * @param dittoHeaders headers of the command that caused this actor to be created. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final Connection connection, final ActorRef commandForwarderActor, final ActorRef connectionActor, final Config configOverwrites, final ActorSystem actorSystem, @@ -187,14 +187,14 @@ public static Props props(final Connection connection, final ActorRef commandFor } /** - * Creates Akka configuration object for this actor. + * Creates Pekko configuration object for this actor. * * @param connection connection parameters. * @param commandForwarderActor the actor used to send signals into the ditto cluster. * @param connectionActor the connectionPersistenceActor which created this client. * @param jmsConnectionFactory the JMS connection factory. * @param actorSystem the actor system. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ static Props propsForTest(final Connection connection, @Nullable final ActorRef commandForwarderActor, final ActorRef connectionActor, final JmsConnectionFactory jmsConnectionFactory, diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpConnectionSigningExtension.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpConnectionSigningExtension.java index 622060d625..5595a96c64 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpConnectionSigningExtension.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpConnectionSigningExtension.java @@ -30,10 +30,10 @@ import com.typesafe.config.Config; -import akka.actor.AbstractExtensionId; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.actor.Extension; +import org.apache.pekko.actor.AbstractExtensionId; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.actor.Extension; import scala.collection.immutable.List$; import scala.reflect.ClassTag; diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpConsumerActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpConsumerActor.java index 1cbe5ac317..dcfd02e1d8 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpConsumerActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpConsumerActor.java @@ -63,19 +63,19 @@ import org.eclipse.ditto.connectivity.service.messaging.internal.ConnectionFailure; import org.eclipse.ditto.connectivity.service.messaging.internal.RetrieveAddressStatus; import org.eclipse.ditto.connectivity.service.messaging.monitoring.logs.InfoProviderFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.config.InstanceIdentifierSupplier; import org.eclipse.ditto.internal.utils.tracing.DittoTracing; import org.eclipse.ditto.internal.utils.tracing.span.SpanOperationName; import org.eclipse.ditto.internal.utils.tracing.span.TracingSpans; -import akka.Done; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.Status; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; -import akka.stream.javadsl.Sink; +import org.apache.pekko.Done; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.javadsl.Sink; /** * Actor which receives message from an AMQP source and forwards them to a {@code MessageMappingProcessorActor}. @@ -134,7 +134,7 @@ private AmqpConsumerActor(final Connection connection, final ConsumerData consum } /** - * Creates Akka configuration object {@link Props} for this {@code AmqpConsumerActor}. + * Creates Pekko configuration object {@link Props} for this {@code AmqpConsumerActor}. * * @param connection the connection * @param consumerData the consumer data. @@ -143,7 +143,7 @@ private AmqpConsumerActor(final Connection connection, final ConsumerData consum * @param connectivityStatusResolver connectivity status resolver to resolve occurred exceptions to a connectivity * status. * @param connectivityConfig the connectivity config related to the given connection. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ static Props props(final Connection connection, final ConsumerData consumerData, final Sink inboundMappingSink, final ActorRef jmsActor, diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpPublisherActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpPublisherActor.java index ed0903dfe1..eee07eae51 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpPublisherActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpPublisherActor.java @@ -66,26 +66,26 @@ import org.eclipse.ditto.connectivity.service.messaging.amqp.status.ProducerClosedStatusReport; import org.eclipse.ditto.connectivity.service.messaging.backoff.BackOffActor; import org.eclipse.ditto.connectivity.service.messaging.internal.ConnectionFailure; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.config.InstanceIdentifierSupplier; -import akka.Done; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.Status; -import akka.japi.Pair; -import akka.japi.pf.PFBuilder; -import akka.japi.pf.ReceiveBuilder; -import akka.stream.KillSwitch; -import akka.stream.KillSwitches; -import akka.stream.Materializer; -import akka.stream.OverflowStrategy; -import akka.stream.QueueOfferResult; -import akka.stream.UniqueKillSwitch; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.SourceQueueWithComplete; -import akka.stream.scaladsl.Sink; +import org.apache.pekko.Done; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.stream.KillSwitch; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.OverflowStrategy; +import org.apache.pekko.stream.QueueOfferResult; +import org.apache.pekko.stream.UniqueKillSwitch; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.SourceQueueWithComplete; +import org.apache.pekko.stream.scaladsl.Sink; /** * Responsible for creating JMS {@link MessageProducer}s and sending {@link ExternalMessage}s as JMSMessages to those. @@ -169,14 +169,14 @@ private static CompletableFuture triggerPublishAsync( } /** - * Creates Akka configuration object {@link Props} for this {@code AmqpPublisherActor}. + * Creates Pekko configuration object {@link Props} for this {@code AmqpPublisherActor}. * * @param connection the connection this publisher belongs to * @param session the jms session * @param connectivityStatusResolver connectivity status resolver to resolve occurred exceptions to a connectivity * status. * @param connectivityConfig the connectivity configuration including potential overwrites. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ static Props props(final Connection connection, final Session session, diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpValidator.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpValidator.java index 2805b9d1f5..e805eceaa3 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpValidator.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpValidator.java @@ -33,7 +33,7 @@ import org.eclipse.ditto.connectivity.service.messaging.validation.AbstractProtocolValidator; import org.eclipse.ditto.placeholders.PlaceholderFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Connection specification for Amqp protocol. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/ConnectionBasedJmsConnectionFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/ConnectionBasedJmsConnectionFactory.java index 20fdfe95c3..e6035c6e6d 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/ConnectionBasedJmsConnectionFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/ConnectionBasedJmsConnectionFactory.java @@ -33,7 +33,7 @@ import org.eclipse.ditto.connectivity.service.messaging.tunnel.SshTunnelState; import org.slf4j.LoggerFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Factory for creating a {@link javax.jms.Connection} based on a {@link Connection}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/JMSConnectionHandlingActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/JMSConnectionHandlingActor.java index f0457d1f0a..50f458ab73 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/JMSConnectionHandlingActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/JMSConnectionHandlingActor.java @@ -40,15 +40,15 @@ import org.eclipse.ditto.connectivity.service.messaging.internal.ClientDisconnected; import org.eclipse.ditto.connectivity.service.messaging.internal.ConnectionFailure; import org.eclipse.ditto.connectivity.service.messaging.monitoring.logs.ConnectionLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.actor.Status; -import akka.dispatch.MessageDispatcher; -import akka.event.DiagnosticLoggingAdapter; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.dispatch.MessageDispatcher; +import org.apache.pekko.event.DiagnosticLoggingAdapter; /** * This actor executes operations (connect/disconnect) on JMS Connection/Session. It is separated into an actor @@ -103,13 +103,13 @@ private JMSConnectionHandlingActor(final Connection connection, } /** - * Creates Akka configuration object {@link Props} for this {@code JMSConnectionHandlingActor}. + * Creates Pekko configuration object {@link Props} for this {@code JMSConnectionHandlingActor}. * * @param connection the connection * @param exceptionListener the exception listener * @param jmsConnectionFactory the jms connection factory * @param connectionLogger used to log failures during certificate validation. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ static Props props(final Connection connection, final ExceptionListener exceptionListener, final JmsConnectionFactory jmsConnectionFactory, final ConnectionLogger connectionLogger) { diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/JMSPropertyMapper.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/JMSPropertyMapper.java index 697dc19127..125b4a3d1a 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/JMSPropertyMapper.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/JMSPropertyMapper.java @@ -34,10 +34,10 @@ import org.apache.qpid.jms.provider.amqp.message.AmqpJmsMessageFacade; import org.apache.qpid.proton.amqp.Symbol; import org.eclipse.ditto.base.model.headers.DittoHeaderDefinition; -import org.eclipse.ditto.internal.utils.akka.logging.CommonMdcEntryKey; -import org.eclipse.ditto.internal.utils.akka.logging.MdcEntrySettable; +import org.eclipse.ditto.internal.utils.pekko.logging.CommonMdcEntryKey; +import org.eclipse.ditto.internal.utils.pekko.logging.MdcEntrySettable; -import akka.event.LoggingAdapter; +import org.apache.pekko.event.LoggingAdapter; /** * Converts between headers and AMQP 1.0 properties and application properties. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/MessageRateLimiterBehavior.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/MessageRateLimiterBehavior.java index 5a363f8458..9433f09de7 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/MessageRateLimiterBehavior.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/MessageRateLimiterBehavior.java @@ -17,11 +17,11 @@ import org.eclipse.ditto.connectivity.service.config.Amqp10Config; import org.eclipse.ditto.connectivity.service.config.ConnectionThrottlingConfig; -import akka.actor.AbstractActor; -import akka.actor.Actor; -import akka.actor.Timers; -import akka.event.LoggingAdapter; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.Actor; +import org.apache.pekko.actor.Timers; +import org.apache.pekko.event.LoggingAdapter; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Mixin for limitation of unacknowledged messages or messages diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/PlainCredentialsSupplier.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/PlainCredentialsSupplier.java index f2931572b8..06a1fb1213 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/PlainCredentialsSupplier.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/PlainCredentialsSupplier.java @@ -17,7 +17,7 @@ import org.eclipse.ditto.connectivity.model.Connection; import org.eclipse.ditto.connectivity.model.UserPasswordCredentials; -import akka.http.javadsl.model.Uri; +import org.apache.pekko.http.javadsl.model.Uri; /** * Supplier of optional username-password credentials. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/SaslPlainCredentialsSupplier.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/SaslPlainCredentialsSupplier.java index 6cf45ce2ac..092ad98f1d 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/SaslPlainCredentialsSupplier.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/SaslPlainCredentialsSupplier.java @@ -18,7 +18,7 @@ import org.eclipse.ditto.connectivity.model.Credentials; import org.eclipse.ditto.connectivity.model.UserPasswordCredentials; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Computes any username and password to authenticate an AMQP connection via SASL PLAIN. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/backoff/BackOffActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/backoff/BackOffActor.java index 2d8b684116..6ed55179ce 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/backoff/BackOffActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/backoff/BackOffActor.java @@ -16,14 +16,14 @@ import java.time.Duration; import org.eclipse.ditto.connectivity.service.config.BackOffConfig; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; - -import akka.actor.AbstractActor; -import akka.actor.AbstractActorWithTimers; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.event.DiagnosticLoggingAdapter; -import akka.japi.pf.ReceiveBuilder; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; + +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Actor that can be used to provide back-off behaviour for a message. You can use it the following way: diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/hono/DefaultHonoConnectionFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/hono/DefaultHonoConnectionFactory.java index 99043999f8..f37040c598 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/hono/DefaultHonoConnectionFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/hono/DefaultHonoConnectionFactory.java @@ -25,7 +25,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Default implementation of {@link HonoConnectionFactory}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/hono/HonoConnectionFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/hono/HonoConnectionFactory.java index 8552aee4b5..9b17143347 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/hono/HonoConnectionFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/hono/HonoConnectionFactory.java @@ -48,7 +48,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Base implementation of a factory for getting a Hono {@link Connection}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/hono/HonoValidator.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/hono/HonoValidator.java index 5d864339b3..e971fc2a29 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/hono/HonoValidator.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/hono/HonoValidator.java @@ -36,7 +36,7 @@ import org.eclipse.ditto.connectivity.service.placeholders.ConnectivityPlaceholders; import org.eclipse.ditto.placeholders.PlaceholderFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; @Immutable public final class HonoValidator extends AbstractProtocolValidator { diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AsyncJwtLoader.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AsyncJwtLoader.java index 03f032bca8..0106b474b4 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AsyncJwtLoader.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AsyncJwtLoader.java @@ -31,22 +31,22 @@ import com.github.benmanes.caffeine.cache.AsyncCacheLoader; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.http.javadsl.Http; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpEntities; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.MediaRanges; -import akka.http.javadsl.model.MediaTypes; -import akka.http.javadsl.model.headers.Accept; -import akka.stream.Materializer; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.util.ByteString; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.Http; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpEntities; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.MediaRanges; +import org.apache.pekko.http.javadsl.model.MediaTypes; +import org.apache.pekko.http.javadsl.model.headers.Accept; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.util.ByteString; import scala.util.Failure; import scala.util.Success; import scala.util.Try; diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AwsRequestSigning.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AwsRequestSigning.java index 5f2e3f4539..6cb5cc0605 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AwsRequestSigning.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AwsRequestSigning.java @@ -32,18 +32,18 @@ import org.eclipse.ditto.internal.utils.pubsub.ddata.Hashes; import org.eclipse.ditto.json.JsonParseException; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.ContentType; -import akka.http.javadsl.model.HttpEntity; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.Query; -import akka.http.javadsl.model.Uri; -import akka.http.javadsl.model.headers.HttpCredentials; -import akka.japi.Pair; -import akka.stream.javadsl.Source; -import akka.util.ByteString; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.ContentType; +import org.apache.pekko.http.javadsl.model.HttpEntity; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.Query; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.http.javadsl.model.headers.HttpCredentials; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.util.ByteString; /** * Signing of HTTP requests to authenticate at AWS. @@ -280,8 +280,8 @@ private static String getCredentialScope(final Instant xAmzDate, final String re private static String getContentTypeAsCanonicalHeader(final HttpRequest request) { final ContentType contentType = - request.getHeader(akka.http.javadsl.model.headers.ContentType.class) - .map(akka.http.javadsl.model.headers.ContentType::contentType) + request.getHeader(org.apache.pekko.http.javadsl.model.headers.ContentType.class) + .map(org.apache.pekko.http.javadsl.model.headers.ContentType::contentType) .orElse(request.entity().getContentType()); return CONTENT_TYPE_HEADER + ":" + contentType.mediaType() + diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AwsRequestSigningFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AwsRequestSigningFactory.java index 06002a211b..cc11e44bac 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AwsRequestSigningFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AwsRequestSigningFactory.java @@ -21,7 +21,7 @@ import org.eclipse.ditto.json.JsonObject; import org.eclipse.ditto.json.JsonValue; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Creator of the signing process {@code AWS4-HMAC-SHA256}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AzMonitorRequestSigning.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AzMonitorRequestSigning.java index ddc718e4ec..6aa4960179 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AzMonitorRequestSigning.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AzMonitorRequestSigning.java @@ -22,15 +22,15 @@ import org.eclipse.ditto.connectivity.model.MessageSendingFailedException; import org.eclipse.ditto.connectivity.service.messaging.signing.Signing; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.ContentType; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpMethod; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.headers.HttpCredentials; -import akka.stream.javadsl.Source; -import akka.util.ByteString; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.ContentType; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpMethod; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.headers.HttpCredentials; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.util.ByteString; /** * Signing of HTTP requests to authenticate at Azure Monitor Data Collector. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AzMonitorRequestSigningFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AzMonitorRequestSigningFactory.java index c64785b4f5..982035e1ec 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AzMonitorRequestSigningFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AzMonitorRequestSigningFactory.java @@ -18,7 +18,7 @@ import org.eclipse.ditto.json.JsonFieldDefinition; import org.eclipse.ditto.json.JsonObject; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Creator of the signing process for Azure Monitor Data Collector. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/ClientCredentialsFlow.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/ClientCredentialsFlow.java index b11f0cb311..74c5d3bc58 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/ClientCredentialsFlow.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/ClientCredentialsFlow.java @@ -17,11 +17,11 @@ import org.eclipse.ditto.jwt.model.JsonWebToken; import org.eclipse.ditto.jwt.model.JwtInvalidException; -import akka.NotUsed; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.headers.HttpCredentials; -import akka.japi.Pair; -import akka.stream.javadsl.Flow; +import org.apache.pekko.NotUsed; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.headers.HttpCredentials; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.javadsl.Flow; /** * Flow of HTTP requests that authenticate via client-credentials flow. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/ClientCredentialsFlowVisitor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/ClientCredentialsFlowVisitor.java index 0f0d96bb31..775c65821b 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/ClientCredentialsFlowVisitor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/ClientCredentialsFlowVisitor.java @@ -28,11 +28,11 @@ import com.github.benmanes.caffeine.cache.Expiry; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpRequest; -import akka.japi.Pair; -import akka.stream.javadsl.Flow; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.javadsl.Flow; /** * Visitor to create a flow that augment requests with bearer tokens. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/DefaultHttpPushFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/DefaultHttpPushFactory.java index 6ac544ad7a..c9447e36ea 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/DefaultHttpPushFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/DefaultHttpPushFactory.java @@ -31,26 +31,26 @@ import org.eclipse.ditto.connectivity.service.messaging.monitoring.ConnectionMonitor; import org.eclipse.ditto.connectivity.service.messaging.monitoring.logs.ConnectionLogger; import org.eclipse.ditto.connectivity.service.messaging.tunnel.SshTunnelState; -import org.eclipse.ditto.internal.utils.akka.controlflow.TimeoutFlow; +import org.eclipse.ditto.internal.utils.pekko.controlflow.TimeoutFlow; import org.eclipse.ditto.internal.utils.metrics.instruments.timer.PreparedTimer; import org.eclipse.ditto.internal.utils.metrics.instruments.timer.StartedTimer; -import akka.actor.ActorSystem; -import akka.event.LoggingAdapter; -import akka.http.javadsl.ClientTransport; -import akka.http.javadsl.ConnectHttp; -import akka.http.javadsl.ConnectionContext; -import akka.http.javadsl.Http; -import akka.http.javadsl.HttpsConnectionContext; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.Uri; -import akka.http.javadsl.model.headers.HttpCredentials; -import akka.http.javadsl.settings.ClientConnectionSettings; -import akka.http.javadsl.settings.ConnectionPoolSettings; -import akka.http.javadsl.settings.ParserSettings; -import akka.japi.Pair; -import akka.stream.javadsl.Flow; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.event.LoggingAdapter; +import org.apache.pekko.http.javadsl.ClientTransport; +import org.apache.pekko.http.javadsl.ConnectHttp; +import org.apache.pekko.http.javadsl.ConnectionContext; +import org.apache.pekko.http.javadsl.Http; +import org.apache.pekko.http.javadsl.HttpsConnectionContext; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.http.javadsl.model.headers.HttpCredentials; +import org.apache.pekko.http.javadsl.settings.ClientConnectionSettings; +import org.apache.pekko.http.javadsl.settings.ConnectionPoolSettings; +import org.apache.pekko.http.javadsl.settings.ParserSettings; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.javadsl.Flow; import scala.util.Failure; import scala.util.Try; @@ -251,8 +251,8 @@ private static ConnectionPoolSettings disambiguateByConnectionId(final ActorSyst final ParserSettings parserSettings = ParserSettings.forClient(system); - // start with the default maximum cached value per header of Akka HTTP. - // "default=12" should be kept consistent with akka-http reference.conf + // start with the default maximum cached value per header of Pekko HTTP. + // "default=12" should be kept consistent with pekko-http reference.conf final Map disambiguator = new HashMap<>(parserSettings.getHeaderValueCacheLimits()); disambiguator.put(id.toString(), disambiguator.getOrDefault("default", 12)); diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPublishTarget.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPublishTarget.java index a5ea82d876..a25c00f170 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPublishTarget.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPublishTarget.java @@ -19,8 +19,8 @@ import org.eclipse.ditto.connectivity.service.messaging.PublishTarget; -import akka.http.javadsl.model.HttpMethod; -import akka.http.javadsl.model.HttpMethods; +import org.apache.pekko.http.javadsl.model.HttpMethod; +import org.apache.pekko.http.javadsl.model.HttpMethods; /** * A HTTP target to which messages can be published. @@ -40,7 +40,7 @@ private HttpPublishTarget(final HttpMethod method, final String pathWithQuery) { } /** - * @return the Akka HTTP method to use for the HTTP request. + * @return the Pekko HTTP method to use for the HTTP request. */ HttpMethod getMethod() { return method; diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPublisherActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPublisherActor.java index f07c47ce72..783a28bf97 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPublisherActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPublisherActor.java @@ -60,7 +60,7 @@ import org.eclipse.ditto.connectivity.service.messaging.monitoring.ConnectionMonitor; import org.eclipse.ditto.connectivity.service.messaging.monitoring.logs.InfoProviderFactory; import org.eclipse.ditto.connectivity.service.messaging.signing.NoOpSigning; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; import org.eclipse.ditto.internal.utils.metrics.instruments.timer.PreparedTimer; import org.eclipse.ditto.json.JsonFactory; @@ -81,31 +81,31 @@ import org.eclipse.ditto.things.model.signals.commands.ThingCommand; import org.eclipse.ditto.things.model.signals.commands.ThingCommandResponse; -import akka.Done; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.http.javadsl.model.HttpCharset; -import akka.http.javadsl.model.HttpEntities; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpMethod; -import akka.http.javadsl.model.HttpMethods; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.Uri; -import akka.http.javadsl.model.headers.ContentType; -import akka.japi.Pair; -import akka.japi.pf.ReceiveBuilder; -import akka.stream.KillSwitch; -import akka.stream.KillSwitches; -import akka.stream.Materializer; -import akka.stream.OverflowStrategy; -import akka.stream.QueueOfferResult; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.SourceQueue; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.http.javadsl.model.HttpCharset; +import org.apache.pekko.http.javadsl.model.HttpEntities; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpMethod; +import org.apache.pekko.http.javadsl.model.HttpMethods; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.http.javadsl.model.headers.ContentType; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.stream.KillSwitch; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.OverflowStrategy; +import org.apache.pekko.stream.QueueOfferResult; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.SourceQueue; import scala.util.Try; /** @@ -168,14 +168,14 @@ private HttpPublisherActor(final Connection connection, } /** - * Creates Akka configuration object for this actor. + * Creates Pekko configuration object for this actor. * * @param connection the connection. * @param factory the http push factory to use. * @param connectivityStatusResolver connectivity status resolver to resolve occurred exceptions to a connectivity * status. * @param connectivityConfig the config of the connectivity service with potential overwrites. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ static Props props(final Connection connection, final HttpPushFactory factory, @@ -255,7 +255,7 @@ private static CompletionStage getResponseBody(final HttpResponse res .withSizeLimit(maxBytes) .toStrict(READ_BODY_TIMEOUT_MS, materializer) .thenApply(strictEntity -> { - final akka.http.javadsl.model.ContentType contentType = strictEntity.getContentType(); + final org.apache.pekko.http.javadsl.model.ContentType contentType = strictEntity.getContentType(); final Charset charset = contentType.getCharsetOption() .map(HttpCharset::nioCharset) .orElse(StandardCharsets.UTF_8); diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushClientActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushClientActor.java index bcc2a98d42..540b465686 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushClientActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushClientActor.java @@ -44,15 +44,15 @@ import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.Status; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.Uri; -import akka.japi.Pair; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; import scala.util.Try; /** diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushContext.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushContext.java index ded3e4295a..eab7795df0 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushContext.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushContext.java @@ -15,7 +15,7 @@ import org.eclipse.ditto.connectivity.api.ExternalMessage; import org.eclipse.ditto.connectivity.service.messaging.monitoring.ConnectionMonitor; -import akka.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.HttpResponse; import scala.util.Try; /** diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushFactory.java index 2bb6536c44..58bf5d75ca 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushFactory.java @@ -25,12 +25,12 @@ import org.eclipse.ditto.connectivity.service.messaging.tunnel.SshTunnelState; import org.eclipse.ditto.internal.utils.metrics.instruments.timer.PreparedTimer; -import akka.actor.ActorSystem; -import akka.event.LoggingAdapter; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.japi.Pair; -import akka.stream.javadsl.Flow; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.event.LoggingAdapter; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.javadsl.Flow; import scala.util.Try; /** @@ -50,7 +50,7 @@ public interface HttpPushFactory { /** * Create a flow to send HTTP(S) requests. * - * @param system the actor system with the default Akka HTTP configuration. + * @param system the actor system with the default Pekko HTTP configuration. * @param log logger for the flow. * @param requestTimeout timeout of each request. * @return flow from request-correlationId pairs to response-correlationId pairs. @@ -66,7 +66,7 @@ public interface HttpPushFactory { /** * Create a flow to send HTTP(S) requests. * - * @param system the actor system with the default Akka HTTP configuration. + * @param system the actor system with the default Pekko HTTP configuration. * @param log logger for the flow. * @param requestTimeout timeout of each request. * @param timer timer to measure HTTP requests. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushRoundTripSignalsValidator.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushRoundTripSignalsValidator.java index b85191762a..3e427e8256 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushRoundTripSignalsValidator.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushRoundTripSignalsValidator.java @@ -30,8 +30,8 @@ import org.eclipse.ditto.connectivity.service.messaging.monitoring.logs.ConnectionLogger; import org.eclipse.ditto.internal.models.signal.correlation.CommandAndCommandResponseMatchingValidator; import org.eclipse.ditto.internal.models.signal.correlation.MatchingValidationResult; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; /** * Validates that a specified {@link Command} and {@link CommandResponse} are associated with each other, i.e. that the diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushValidator.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushValidator.java index 15cc29ba6e..c34a04e984 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushValidator.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushValidator.java @@ -32,10 +32,10 @@ import org.eclipse.ditto.connectivity.service.messaging.Resolvers; import org.eclipse.ditto.connectivity.service.messaging.validation.AbstractProtocolValidator; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpMethod; -import akka.http.javadsl.model.HttpMethods; -import akka.http.javadsl.model.Uri; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpMethod; +import org.apache.pekko.http.javadsl.model.HttpMethods; +import org.apache.pekko.http.javadsl.model.Uri; /** * Validation of http-push connections. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpRequestSigning.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpRequestSigning.java index fec20cac80..5180706357 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpRequestSigning.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpRequestSigning.java @@ -16,9 +16,9 @@ import org.eclipse.ditto.connectivity.service.messaging.signing.Signing; -import akka.NotUsed; -import akka.http.javadsl.model.HttpRequest; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.stream.javadsl.Source; /** * Functional interface for signing an HTTP request before sending it. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpRequestSigningExtension.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpRequestSigningExtension.java index 692892709d..298f5115af 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpRequestSigningExtension.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpRequestSigningExtension.java @@ -29,10 +29,10 @@ import com.typesafe.config.Config; -import akka.actor.AbstractExtensionId; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.actor.Extension; +import org.apache.pekko.actor.AbstractExtensionId; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.actor.Extension; import scala.collection.immutable.List$; import scala.reflect.ClassTag; diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpRequestSigningFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpRequestSigningFactory.java index 4b0e2a7cc5..8eebc60a75 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpRequestSigningFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpRequestSigningFactory.java @@ -14,7 +14,7 @@ import org.eclipse.ditto.connectivity.model.HmacCredentials; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Functional interface for creator of {@code RequestSigning} from {@code HmacCredentials}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/AbstractWithOrigin.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/AbstractWithOrigin.java index ec7d073dab..3c0f8861f8 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/AbstractWithOrigin.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/AbstractWithOrigin.java @@ -17,7 +17,7 @@ import javax.annotation.Nullable; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Abstract base implementation for {@link WithOrigin}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/ClientDisconnected.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/ClientDisconnected.java index 6956880054..31c6ea1846 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/ClientDisconnected.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/ClientDisconnected.java @@ -14,7 +14,7 @@ import javax.annotation.Nullable; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Messaging internal event when a diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/ConnectionFailure.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/ConnectionFailure.java index bfad31095e..a83fb305fc 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/ConnectionFailure.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/ConnectionFailure.java @@ -24,8 +24,8 @@ import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; import org.eclipse.ditto.connectivity.model.ConnectivityStatus; -import akka.actor.ActorRef; -import akka.actor.Status; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Status; /** * Messaging internal error message for when a Failure was detected on a Connection. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/ImmutableClientDisconnected.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/ImmutableClientDisconnected.java index 35d0d5c273..4d9b3836fb 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/ImmutableClientDisconnected.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/ImmutableClientDisconnected.java @@ -17,7 +17,7 @@ import javax.annotation.Nullable; import javax.annotation.concurrent.Immutable; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Immutable implementation of {@link ClientDisconnected}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/ImmutableConnectionFailure.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/ImmutableConnectionFailure.java index 4228a43080..9664182c9c 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/ImmutableConnectionFailure.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/ImmutableConnectionFailure.java @@ -21,8 +21,8 @@ import org.eclipse.ditto.connectivity.model.ConnectivityStatus; -import akka.actor.ActorRef; -import akka.actor.Status; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Status; /** * Immutable implementation of {@link ConnectionFailure}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/WithOrigin.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/WithOrigin.java index c11ee08aa6..0b624ec35d 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/WithOrigin.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/internal/WithOrigin.java @@ -14,7 +14,7 @@ import java.util.Optional; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Messaging internal interface for all messages containing an {@link ActorRef} origin. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtLeastOnceConsumerStream.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtLeastOnceConsumerStream.java index ee402144a9..1a7c4eb457 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtLeastOnceConsumerStream.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtLeastOnceConsumerStream.java @@ -26,19 +26,19 @@ import org.eclipse.ditto.connectivity.service.config.ConnectionThrottlingConfig; import org.eclipse.ditto.connectivity.service.messaging.AcknowledgeableMessage; import org.eclipse.ditto.connectivity.service.messaging.monitoring.ConnectionMonitor; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.slf4j.Logger; -import akka.Done; -import akka.NotUsed; -import akka.kafka.CommitterSettings; -import akka.kafka.ConsumerMessage.CommittableOffset; -import akka.kafka.javadsl.Committer; -import akka.kafka.javadsl.Consumer; -import akka.stream.Materializer; -import akka.stream.javadsl.MergeHub; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.kafka.CommitterSettings; +import org.apache.pekko.kafka.ConsumerMessage.CommittableOffset; +import org.apache.pekko.kafka.javadsl.Committer; +import org.apache.pekko.kafka.javadsl.Consumer; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.MergeHub; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** * Kafka consumer stream with "at least once" (QoS 1) semantics. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtLeastOnceKafkaConsumerSourceSupplier.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtLeastOnceKafkaConsumerSourceSupplier.java index fb4144de1d..772ccfe0d7 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtLeastOnceKafkaConsumerSourceSupplier.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtLeastOnceKafkaConsumerSourceSupplier.java @@ -17,16 +17,16 @@ import org.apache.kafka.clients.consumer.ConsumerConfig; -import akka.kafka.AutoSubscription; -import akka.kafka.ConsumerMessage; -import akka.kafka.ConsumerSettings; -import akka.kafka.Subscriptions; -import akka.kafka.javadsl.Consumer; -import akka.stream.javadsl.Source; +import org.apache.pekko.kafka.AutoSubscription; +import org.apache.pekko.kafka.ConsumerMessage; +import org.apache.pekko.kafka.ConsumerSettings; +import org.apache.pekko.kafka.Subscriptions; +import org.apache.pekko.kafka.javadsl.Consumer; +import org.apache.pekko.stream.javadsl.Source; /** - * Supplies a {@link Source} of {@link akka.kafka.ConsumerMessage.CommittableMessage}s retaining a - * {@link akka.kafka.javadsl.Consumer.Control} in order to be able to shutdown/terminate Kafka consumption. + * Supplies a {@link Source} of {@link org.apache.pekko.kafka.ConsumerMessage.CommittableMessage}s retaining a + * {@link org.apache.pekko.kafka.javadsl.Consumer.Control} in order to be able to shutdown/terminate Kafka consumption. */ class AtLeastOnceKafkaConsumerSourceSupplier implements Supplier, Consumer.Control>> { diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtMostOnceConsumerStream.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtMostOnceConsumerStream.java index 11121e7a80..10cf3aedd4 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtMostOnceConsumerStream.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtMostOnceConsumerStream.java @@ -26,16 +26,16 @@ import org.eclipse.ditto.connectivity.service.config.ConnectionThrottlingConfig; import org.eclipse.ditto.connectivity.service.messaging.AcknowledgeableMessage; import org.eclipse.ditto.connectivity.service.messaging.monitoring.ConnectionMonitor; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.slf4j.Logger; -import akka.Done; -import akka.NotUsed; -import akka.kafka.javadsl.Consumer; -import akka.stream.Materializer; -import akka.stream.javadsl.MergeHub; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.kafka.javadsl.Consumer; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.MergeHub; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** * Kafka consumer stream with "at most once" (QoS 0) semantics. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtMostOnceKafkaConsumerSourceSupplier.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtMostOnceKafkaConsumerSourceSupplier.java index 9a3cb3d43c..a40652d559 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtMostOnceKafkaConsumerSourceSupplier.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtMostOnceKafkaConsumerSourceSupplier.java @@ -17,15 +17,15 @@ import org.apache.kafka.clients.consumer.ConsumerRecord; -import akka.kafka.AutoSubscription; -import akka.kafka.ConsumerSettings; -import akka.kafka.Subscriptions; -import akka.kafka.javadsl.Consumer; -import akka.stream.javadsl.Source; +import org.apache.pekko.kafka.AutoSubscription; +import org.apache.pekko.kafka.ConsumerSettings; +import org.apache.pekko.kafka.Subscriptions; +import org.apache.pekko.kafka.javadsl.Consumer; +import org.apache.pekko.stream.javadsl.Source; /** * Supplies a {@link Source} of {@link org.apache.kafka.clients.consumer.ConsumerRecord}s retaining a - * {@link akka.kafka.javadsl.Consumer.Control} in order to be able to shutdown/terminate Kafka consumption. + * {@link org.apache.pekko.kafka.javadsl.Consumer.Control} in order to be able to shutdown/terminate Kafka consumption. */ class AtMostOnceKafkaConsumerSourceSupplier implements Supplier, Consumer.Control>> { diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/CommittableTransformationResult.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/CommittableTransformationResult.java index 11a21b3efd..ff29e3302b 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/CommittableTransformationResult.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/CommittableTransformationResult.java @@ -16,7 +16,7 @@ import javax.annotation.concurrent.Immutable; -import akka.kafka.ConsumerMessage; +import org.apache.pekko.kafka.ConsumerMessage; /** * Contains a {@link TransformationResult} containing either a diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/DefaultKafkaPublisherActorFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/DefaultKafkaPublisherActorFactory.java index ee0fb44e53..9ff9d2d1c6 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/DefaultKafkaPublisherActorFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/DefaultKafkaPublisherActorFactory.java @@ -19,7 +19,7 @@ import org.eclipse.ditto.connectivity.service.config.ConnectivityConfig; import org.eclipse.ditto.connectivity.service.messaging.ConnectivityStatusResolver; -import akka.actor.Props; +import org.apache.pekko.actor.Props; /** * Default implementation, providing a {@link KafkaPublisherActor}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/DefaultSendProducerFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/DefaultSendProducerFactory.java index 6f5c201cfc..a8613ae6cf 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/DefaultSendProducerFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/DefaultSendProducerFactory.java @@ -14,9 +14,9 @@ import java.nio.ByteBuffer; -import akka.actor.ActorSystem; -import akka.kafka.ProducerSettings; -import akka.kafka.javadsl.SendProducer; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.kafka.ProducerSettings; +import org.apache.pekko.kafka.javadsl.SendProducer; /** * Default implementation of {@link SendProducerFactory}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaAcknowledgableMessage.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaAcknowledgableMessage.java index d67764fecd..598e5b0d39 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaAcknowledgableMessage.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaAcknowledgableMessage.java @@ -21,10 +21,10 @@ import org.eclipse.ditto.connectivity.service.messaging.AcknowledgeableMessage; import org.eclipse.ditto.connectivity.service.messaging.monitoring.ConnectionMonitor; -import akka.kafka.ConsumerMessage; +import org.apache.pekko.kafka.ConsumerMessage; /** - * Wraps an {@link AcknowledgeableMessage} and provides a future of {@link akka.kafka.ConsumerMessage.CommittableOffset} + * Wraps an {@link AcknowledgeableMessage} and provides a future of {@link org.apache.pekko.kafka.ConsumerMessage.CommittableOffset} * which is completed: *
      *
    • successfully once the requested acknowledgement was issued/settled
    • diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaClientActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaClientActor.java index 67edd2d51f..83e8fb90eb 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaClientActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaClientActor.java @@ -50,11 +50,11 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.Status; -import akka.japi.pf.FSMStateFunctionBuilder; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.japi.pf.FSMStateFunctionBuilder; +import org.apache.pekko.pattern.Patterns; /** * Actor which handles connection to Kafka server. @@ -102,14 +102,14 @@ private KafkaClientActor(final Connection connection, } /** - * Creates Akka configuration object for this actor. + * Creates Pekko configuration object for this actor. * * @param connection the connection. * @param commandForwarderActor the actor used to send signals into the ditto cluster. * @param connectionActor the connectionPersistenceActor which created this client. * @param dittoHeaders headers of the command that caused this actor to be created. * @param connectivityConfigOverwrites the overwrites for the connectivity config for the given connection. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final Connection connection, final ActorRef commandForwarderActor, diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaCompletableMessage.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaCompletableMessage.java index 4e1af80dbb..7056dc0ca6 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaCompletableMessage.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaCompletableMessage.java @@ -20,10 +20,10 @@ import org.eclipse.ditto.connectivity.api.ExternalMessage; import org.eclipse.ditto.connectivity.service.messaging.AcknowledgeableMessage; -import akka.Done; +import org.apache.pekko.Done; /** - * Wraps an {@link org.eclipse.ditto.connectivity.service.messaging.AcknowledgeableMessage} and provides a future of {@link akka.Done} + * Wraps an {@link org.eclipse.ditto.connectivity.service.messaging.AcknowledgeableMessage} and provides a future of {@link org.apache.pekko.Done} * which is completed successfully in all cases: *
        *
      • once the requested acknowledgement was issued/settled
      • diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerActor.java index ee4dee61d5..13fff540a1 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerActor.java @@ -31,16 +31,16 @@ import org.eclipse.ditto.connectivity.service.messaging.ConnectivityStatusResolver; import org.eclipse.ditto.connectivity.service.messaging.internal.ConnectionFailure; import org.eclipse.ditto.connectivity.service.messaging.internal.RetrieveAddressStatus; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.config.InstanceIdentifierSupplier; -import akka.Done; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.stream.Materializer; -import akka.stream.javadsl.Sink; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.Sink; /** * Actor which streams messages from Kafka. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerMetrics.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerMetrics.java index 7aaf6ae22e..72dbf313b8 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerMetrics.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerMetrics.java @@ -24,7 +24,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.kafka.javadsl.Consumer; +import org.apache.pekko.kafka.javadsl.Consumer; /** * Gets the Apache Kafka Metrics from a ConsumerControl and creates/sets Kamon gauges accordingly. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerStream.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerStream.java index 24c139fda8..7cfa1a629b 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerStream.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerStream.java @@ -17,7 +17,7 @@ import javax.annotation.concurrent.Immutable; -import akka.Done; +import org.apache.pekko.Done; /** * A start- and stoppable kafka consumer stream. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerStreamFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerStreamFactory.java index b1fc7d004c..56a3770d6e 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerStreamFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerStreamFactory.java @@ -27,9 +27,9 @@ import org.eclipse.ditto.connectivity.service.messaging.AcknowledgeableMessage; import org.eclipse.ditto.connectivity.service.messaging.monitoring.ConnectionMonitor; -import akka.NotUsed; -import akka.stream.Materializer; -import akka.stream.javadsl.Sink; +import org.apache.pekko.NotUsed; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.Sink; /** * A factory for building different {@link KafkaConsumerStream} implementations, e.g. for different quality of services. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaMessageTransformer.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaMessageTransformer.java index f27e5c7665..0e2ea29e16 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaMessageTransformer.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaMessageTransformer.java @@ -36,12 +36,12 @@ import org.eclipse.ditto.connectivity.model.EnforcementFilterFactory; import org.eclipse.ditto.connectivity.model.Source; import org.eclipse.ditto.connectivity.service.messaging.monitoring.ConnectionMonitor; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.tracing.DittoTracing; import org.eclipse.ditto.internal.utils.tracing.span.SpanOperationName; -import akka.kafka.ConsumerMessage; +import org.apache.pekko.kafka.ConsumerMessage; /** * Transforms incoming messages from Apache Kafka to {@link org.eclipse.ditto.connectivity.api.ExternalMessage}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaPublisherActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaPublisherActor.java index 6fa2f64c7f..0470401764 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaPublisherActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaPublisherActor.java @@ -59,26 +59,26 @@ import org.eclipse.ditto.json.JsonObject; import org.eclipse.ditto.json.JsonObjectBuilder; -import akka.Done; -import akka.NotUsed; -import akka.actor.Props; -import akka.actor.Status; -import akka.japi.Pair; -import akka.japi.pf.ReceiveBuilder; -import akka.kafka.ProducerMessage; -import akka.kafka.javadsl.SendProducer; -import akka.stream.KillSwitch; -import akka.stream.KillSwitches; -import akka.stream.Materializer; -import akka.stream.OverflowStrategy; -import akka.stream.QueueOfferResult; -import akka.stream.RestartSettings; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.RestartFlow; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.SourceQueueWithComplete; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.kafka.ProducerMessage; +import org.apache.pekko.kafka.javadsl.SendProducer; +import org.apache.pekko.stream.KillSwitch; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.OverflowStrategy; +import org.apache.pekko.stream.QueueOfferResult; +import org.apache.pekko.stream.RestartSettings; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.RestartFlow; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.SourceQueueWithComplete; /** * Responsible for publishing {@link org.eclipse.ditto.connectivity.api.ExternalMessage}s into a Kafka broker. @@ -107,7 +107,7 @@ private KafkaPublisherActor(final Connection connection, } /** - * Creates Akka configuration object {@link akka.actor.Props} for this {@code BasePublisherActor}. + * Creates Pekko configuration object {@link org.apache.pekko.actor.Props} for this {@code BasePublisherActor}. * * @param connection the connection this publisher belongs to. * @param producerFactory factory to create kafka SendProducer. @@ -115,7 +115,7 @@ private KafkaPublisherActor(final Connection connection, * @param connectivityStatusResolver connectivity status resolver to resolve occurred exceptions to a connectivity * status. * @param connectivityConfig the config of the connectivity service with potential overwrites. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ static Props props(final Connection connection, final SendProducerFactory producerFactory, diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaPublisherActorFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaPublisherActorFactory.java index b2a78681c7..9885243072 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaPublisherActorFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaPublisherActorFactory.java @@ -16,7 +16,7 @@ import org.eclipse.ditto.connectivity.service.config.ConnectivityConfig; import org.eclipse.ditto.connectivity.service.messaging.ConnectivityStatusResolver; -import akka.actor.Props; +import org.apache.pekko.actor.Props; /** * Factory for creating {@link KafkaPublisherActor}s. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaValidator.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaValidator.java index 284d8c3ba9..864e36367e 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaValidator.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaValidator.java @@ -41,7 +41,7 @@ import org.eclipse.ditto.placeholders.PlaceholderFactory; import org.eclipse.ditto.placeholders.UnresolvedPlaceholderException; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Validator for Kafka connections. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/PropertiesFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/PropertiesFactory.java index d14033bc78..dd8feb051c 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/PropertiesFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/PropertiesFactory.java @@ -33,10 +33,10 @@ import com.typesafe.config.Config; -import akka.kafka.CommitterSettings; -import akka.kafka.ConnectionCheckerSettings; -import akka.kafka.ConsumerSettings; -import akka.kafka.ProducerSettings; +import org.apache.pekko.kafka.CommitterSettings; +import org.apache.pekko.kafka.ConnectionCheckerSettings; +import org.apache.pekko.kafka.ConsumerSettings; +import org.apache.pekko.kafka.ProducerSettings; /** * Creates Kafka properties from a given {@link org.eclipse.ditto.connectivity.model.Connection} configuration. @@ -96,11 +96,11 @@ static PropertiesFactory newInstance(final Connection connection, * @return the settings. */ ConsumerSettings getConsumerSettings(final boolean dryRun) { - final Config alpakkaConfig = config.getConsumerConfig().getAlpakkaConfig(); + final Config pekkoConnectorsConfig = config.getConsumerConfig().getPekkoConnectorsConfig(); final ConnectionCheckerSettings connectionCheckerSettings = - ConnectionCheckerSettings.apply(alpakkaConfig.getConfig("connection-checker")); + ConnectionCheckerSettings.apply(pekkoConnectorsConfig.getConfig("connection-checker")); final ConsumerSettings consumerSettings = - ConsumerSettings.apply(alpakkaConfig, new StringDeserializer(), new ByteBufferDeserializer()) + ConsumerSettings.apply(pekkoConnectorsConfig, new StringDeserializer(), new ByteBufferDeserializer()) .withBootstrapServers(bootstrapServers) .withGroupId(connection.getId().toString()) .withClientId(clientId + "-consumer") @@ -115,13 +115,13 @@ ConsumerSettings getConsumerSettings(final boolean dryRun) { } CommitterSettings getCommitterSettings() { - final Config committerConfig = config.getCommitterConfig().getAlpakkaConfig(); + final Config committerConfig = config.getCommitterConfig().getPekkoConnectorsConfig(); return CommitterSettings.apply(committerConfig); } ProducerSettings getProducerSettings() { - final Config alpakkaConfig = config.getProducerConfig().getAlpakkaConfig(); - return ProducerSettings.apply(alpakkaConfig, new StringSerializer(), new ByteBufferSerializer()) + final Config pekkoConnectorsConfig = config.getProducerConfig().getPekkoConnectorsConfig(); + return ProducerSettings.apply(pekkoConnectorsConfig, new StringSerializer(), new ByteBufferSerializer()) .withBootstrapServers(bootstrapServers) .withProperties(getClientIdProperties()) .withProperties(getTrustedSelfSignedCertificates()) @@ -194,7 +194,7 @@ private boolean isConnectionSecure() { /** * Convert a structured Config into flat map from config paths to values. - * Replicates Alpakka Kafka client's interpretation of client Config. + * Replicates Pekko Connectors Kafka client's interpretation of client Config. * * @param config the Config object. * @return flat map from config paths to values. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/RestartableKafkaConsumerStream.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/RestartableKafkaConsumerStream.java index e35dfd27e0..a0c430cee1 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/RestartableKafkaConsumerStream.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/RestartableKafkaConsumerStream.java @@ -22,7 +22,7 @@ import org.eclipse.ditto.base.service.config.supervision.ExponentialBackOff; import org.eclipse.ditto.base.service.config.supervision.ExponentialBackOffConfig; -import akka.Done; +import org.apache.pekko.Done; /** * Responsible to wrap a {@link KafkaConsumerStream} and restart it on demand. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/SendProducerFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/SendProducerFactory.java index 0d8225c6b4..7b348b714b 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/SendProducerFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/SendProducerFactory.java @@ -14,7 +14,7 @@ import java.nio.ByteBuffer; -import akka.kafka.javadsl.SendProducer; +import org.apache.pekko.kafka.javadsl.SendProducer; /** * Creates Kafka {@link SendProducer}s. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/TransformationResult.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/TransformationResult.java index 9d80a09362..693dd21a85 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/TransformationResult.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/kafka/TransformationResult.java @@ -22,7 +22,7 @@ import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; import org.eclipse.ditto.connectivity.api.ExternalMessage; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.slf4j.Logger; /** diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/AbstractConnectionLogger.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/AbstractConnectionLogger.java index 6f51c7b744..0593f720ea 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/AbstractConnectionLogger.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/AbstractConnectionLogger.java @@ -26,8 +26,8 @@ import org.eclipse.ditto.connectivity.model.LogLevel; import org.eclipse.ditto.connectivity.model.LogType; import org.eclipse.ditto.connectivity.service.messaging.monitoring.ConnectionMonitor; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; /** * Abstract base implementation of {@link ConnectionLogger} with some shared functionalities of all loggers. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/ConnectionLoggerRegistry.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/ConnectionLoggerRegistry.java index 2287d49ea5..b7a3629a9b 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/ConnectionLoggerRegistry.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/ConnectionLoggerRegistry.java @@ -49,8 +49,8 @@ import org.eclipse.ditto.connectivity.service.config.MonitoringLoggerConfig; import org.eclipse.ditto.connectivity.service.messaging.monitoring.ConnectionMonitorRegistry; import org.eclipse.ditto.connectivity.service.util.ConnectivityMdcEntryKey; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.komamitsu.fluency.Fluency; import org.slf4j.Logger; diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/DefaultMuteableConnectionLogger.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/DefaultMuteableConnectionLogger.java index c0f484d224..c45243ee01 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/DefaultMuteableConnectionLogger.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/DefaultMuteableConnectionLogger.java @@ -27,8 +27,8 @@ import org.eclipse.ditto.connectivity.model.LogEntry; import org.eclipse.ditto.connectivity.service.messaging.monitoring.ConnectionMonitor; import org.eclipse.ditto.connectivity.service.util.ConnectivityMdcEntryKey; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; /** * Default implementation of {@link MuteableConnectionLogger}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/EvictingConnectionLogger.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/EvictingConnectionLogger.java index 164fc3cffd..9617718147 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/EvictingConnectionLogger.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/EvictingConnectionLogger.java @@ -27,8 +27,8 @@ import org.eclipse.ditto.connectivity.model.LogLevel; import org.eclipse.ditto.connectivity.model.LogType; import org.eclipse.ditto.connectivity.service.messaging.monitoring.ConnectionMonitor; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; import org.eclipse.ditto.internal.utils.metrics.instruments.timer.StartedTimer; diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/ExceptionalConnectionLogger.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/ExceptionalConnectionLogger.java index 33b6c0f956..3bf090cde3 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/ExceptionalConnectionLogger.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/ExceptionalConnectionLogger.java @@ -25,8 +25,8 @@ import org.eclipse.ditto.connectivity.model.LogEntry; import org.eclipse.ditto.connectivity.service.messaging.monitoring.ConnectionMonitor; import org.eclipse.ditto.connectivity.service.util.ConnectivityMdcEntryKey; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; /** * An exceptional connection logger, which logs method calls on tracing to allow for analyzing missed logs. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/FluentPublishingConnectionLogger.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/FluentPublishingConnectionLogger.java index 63ec0d0f15..ec7b51088a 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/FluentPublishingConnectionLogger.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/FluentPublishingConnectionLogger.java @@ -32,8 +32,8 @@ import org.eclipse.ditto.connectivity.model.LogLevel; import org.eclipse.ditto.connectivity.model.LogType; import org.eclipse.ditto.connectivity.service.messaging.monitoring.ConnectionMonitor; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.json.JsonFieldDefinition; import org.komamitsu.fluency.BufferFullException; import org.komamitsu.fluency.EventTime; diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/RetrieveConnectionLogsAggregatorActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/RetrieveConnectionLogsAggregatorActor.java index b79755d476..d634336a20 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/RetrieveConnectionLogsAggregatorActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/RetrieveConnectionLogsAggregatorActor.java @@ -25,13 +25,13 @@ import org.eclipse.ditto.connectivity.model.signals.commands.exceptions.ConnectionTimeoutException; import org.eclipse.ditto.connectivity.model.signals.commands.query.RetrieveConnectionLogs; import org.eclipse.ditto.connectivity.model.signals.commands.query.RetrieveConnectionLogsResponse; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.ReceiveTimeout; -import akka.event.DiagnosticLoggingAdapter; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.ReceiveTimeout; +import org.apache.pekko.event.DiagnosticLoggingAdapter; /** * An aggregation actor which receives {@link org.eclipse.ditto.connectivity.model.signals.commands.query.RetrieveConnectionLogs} @@ -66,14 +66,14 @@ private RetrieveConnectionLogsAggregatorActor(final Connection connection, final } /** - * Creates Akka configuration object for this actor. + * Creates Pekko configuration object for this actor. * * @param connection the {@code Connection} for which to aggregate the logs for. * @param sender the ActorRef of the sender to which to answer the response to. * @param originalHeaders the DittoHeaders to use for the response message. * @param timeout the timeout to apply in order to receive the response. * @param maxLogSizeBytes the maximum length of all log entries JSON representation. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final Connection connection, final ActorRef sender, final DittoHeaders originalHeaders, final Duration timeout, final long maxLogSizeBytes) { diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/metrics/MetricAlertRegistry.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/metrics/MetricAlertRegistry.java index 25459f6395..a2c8077862 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/metrics/MetricAlertRegistry.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/metrics/MetricAlertRegistry.java @@ -31,7 +31,7 @@ import org.eclipse.ditto.internal.utils.metrics.instruments.gauge.Gauge; import org.eclipse.ditto.internal.utils.metrics.instruments.gauge.KamonGauge; -import akka.japi.Pair; +import org.apache.pekko.japi.Pair; /** * Registry to keep track and update existing {@code MetricsAlerts}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/metrics/RetrieveConnectionMetricsAggregatorActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/metrics/RetrieveConnectionMetricsAggregatorActor.java index 9eaf0692a8..b598fbe381 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/metrics/RetrieveConnectionMetricsAggregatorActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/metrics/RetrieveConnectionMetricsAggregatorActor.java @@ -19,13 +19,13 @@ import org.eclipse.ditto.connectivity.model.signals.commands.exceptions.ConnectionTimeoutException; import org.eclipse.ditto.connectivity.model.signals.commands.query.RetrieveConnectionMetrics; import org.eclipse.ditto.connectivity.model.signals.commands.query.RetrieveConnectionMetricsResponse; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.ReceiveTimeout; -import akka.event.DiagnosticLoggingAdapter; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.ReceiveTimeout; +import org.apache.pekko.event.DiagnosticLoggingAdapter; /** * An aggregation actor which receives {@link RetrieveConnectionMetricsResponse} messages and aggregates them into a @@ -56,13 +56,13 @@ private RetrieveConnectionMetricsAggregatorActor(final Connection connection, fi } /** - * Creates Akka configuration object for this actor. + * Creates Pekko configuration object for this actor. * * @param connection the {@code Connection} for which to aggregate the metrics for. * @param sender the ActorRef of the sender to which to answer the response to. * @param originalHeaders the DittoHeaders to use for the response message. * @param timeout the timeout to apply in order to receive the response. - * @return the Akka configuration Props object + * @return the Pekko configuration Props object */ public static Props props(final Connection connection, final ActorRef sender, final DittoHeaders originalHeaders, final Duration timeout) { diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/metrics/RetrieveConnectionStatusAggregatorActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/metrics/RetrieveConnectionStatusAggregatorActor.java index 98afd46e0c..35776c0c7e 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/metrics/RetrieveConnectionStatusAggregatorActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/metrics/RetrieveConnectionStatusAggregatorActor.java @@ -30,13 +30,13 @@ import org.eclipse.ditto.connectivity.model.ResourceStatus; import org.eclipse.ditto.connectivity.model.SshTunnel; import org.eclipse.ditto.connectivity.model.signals.commands.query.RetrieveConnectionStatusResponse; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.ReceiveTimeout; -import akka.event.DiagnosticLoggingAdapter; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.ReceiveTimeout; +import org.apache.pekko.event.DiagnosticLoggingAdapter; /** * An aggregation actor which receives {@link ResourceStatus} messages from all {@code clients, targets and sources} @@ -95,14 +95,14 @@ private RetrieveConnectionStatusAggregatorActor(final Connection connection, } /** - * Creates Akka configuration object for this actor. + * Creates Pekko configuration object for this actor. * * @param connection the {@code Connection} for which to aggregate the status for. * @param sender the ActorRef of the sender to which to answer the response to. * @param originalHeaders the DittoHeaders to use for the response message. * @param timeout the timeout to apply in order to receive the response. * @param availableConnectivityInstances the currently available connectivity service instances in the cluster. - * @return the Akka configuration Props object + * @return the Pekko configuration Props object */ public static Props props(final Connection connection, final ActorRef sender, final DittoHeaders originalHeaders, final Duration timeout, final long availableConnectivityInstances) { diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/Mqtt3Validator.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/Mqtt3Validator.java index e0674f7b34..4c55b93042 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/Mqtt3Validator.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/Mqtt3Validator.java @@ -32,7 +32,7 @@ import org.eclipse.ditto.placeholders.Placeholder; import org.eclipse.ditto.placeholders.PlaceholderFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Connection specification for Mqtt 3.1.1 protocol. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/Mqtt5Validator.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/Mqtt5Validator.java index 90996ea423..e1c7fc3877 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/Mqtt5Validator.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/Mqtt5Validator.java @@ -20,7 +20,7 @@ import org.eclipse.ditto.connectivity.service.config.ConnectivityConfig; import org.eclipse.ditto.connectivity.service.config.MqttConfig; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Connection specification for Mqtt 5 protocol. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/ConnectionTesterActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/ConnectionTesterActor.java index 33e1a25057..ba32289ecf 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/ConnectionTesterActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/ConnectionTesterActor.java @@ -56,20 +56,20 @@ import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.subscribing.SubscribeResult; import org.eclipse.ditto.connectivity.service.messaging.tunnel.SshTunnelState; import org.eclipse.ditto.connectivity.service.util.ConnectivityMdcEntryKey; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.health.RetrieveHealth; import org.eclipse.ditto.internal.utils.health.RetrieveHealthResponse; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.Status; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.AskTimeoutException; -import akka.pattern.Patterns; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Sink; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.AskTimeoutException; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Sink; /** * Tests whether an MQTT {@link org.eclipse.ditto.connectivity.model.Connection} can successfully be established diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/MqttClientActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/MqttClientActor.java index d399cea9ed..8f64ecbaf9 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/MqttClientActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/MqttClientActor.java @@ -60,16 +60,16 @@ import com.hivemq.client.mqtt.lifecycle.MqttDisconnectSource; import com.typesafe.config.Config; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.PoisonPill; -import akka.actor.Props; -import akka.actor.Status; -import akka.japi.pf.FSMStateFunctionBuilder; -import akka.pattern.Patterns; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.japi.pf.FSMStateFunctionBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; import scala.concurrent.ExecutionContextExecutor; /** diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/MqttClientConnected.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/MqttClientConnected.java index 33d05195e6..252abfcaf4 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/MqttClientConnected.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/MqttClientConnected.java @@ -17,7 +17,7 @@ import org.eclipse.ditto.connectivity.service.messaging.internal.AbstractWithOrigin; import org.eclipse.ditto.connectivity.service.messaging.internal.ClientConnected; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Message type to indicate that an MQTT client connected to a broker. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/client/DefaultGenericMqttClient.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/client/DefaultGenericMqttClient.java index 44fe70cf84..7e66a4550d 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/client/DefaultGenericMqttClient.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/client/DefaultGenericMqttClient.java @@ -23,8 +23,8 @@ import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.subscribe.GenericMqttSubAck; import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.subscribe.GenericMqttSubscribe; import org.eclipse.ditto.connectivity.service.util.ConnectivityMdcEntryKey; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import com.hivemq.client.mqtt.datatypes.MqttTopicFilter; diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/consuming/MqttConsumerActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/consuming/MqttConsumerActor.java index 2cafc1fbfa..6ba69e4872 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/consuming/MqttConsumerActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/consuming/MqttConsumerActor.java @@ -30,23 +30,23 @@ import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.publish.MqttPublishTransformationException; import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.publish.TransformationResult; import org.eclipse.ditto.connectivity.service.util.ConnectivityMdcEntryKey; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.health.RetrieveHealth; import org.eclipse.ditto.internal.utils.health.RetrieveHealthResponse; import org.eclipse.ditto.internal.utils.health.StatusInfo; import com.hivemq.client.internal.mqtt.datatypes.MqttTopicFilterImpl; -import akka.NotUsed; -import akka.actor.Props; -import akka.japi.function.Predicate; -import akka.stream.KillSwitch; -import akka.stream.KillSwitches; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.function.Predicate; +import org.apache.pekko.stream.KillSwitch; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** * Actor that receives a stream of subscribed MQTT Publish messages, transforms them to {@link ExternalMessage}s and diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/message/publish/GenericMqttPublish.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/message/publish/GenericMqttPublish.java index 65cdc67eb1..61cc821539 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/message/publish/GenericMqttPublish.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/message/publish/GenericMqttPublish.java @@ -38,8 +38,8 @@ import com.hivemq.client.mqtt.mqtt5.message.publish.Mqtt5PayloadFormatIndicator; import com.hivemq.client.mqtt.mqtt5.message.publish.Mqtt5Publish; -import akka.http.javadsl.model.ContentType; -import akka.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.ContentType; +import org.apache.pekko.http.javadsl.model.ContentTypes; /** * Unifies access to MQTT Publish messages of protocol versions 3 and 5. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/publishing/MqttPublishTarget.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/publishing/MqttPublishTarget.java index 71f677beec..b1057004a6 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/publishing/MqttPublishTarget.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/publishing/MqttPublishTarget.java @@ -34,7 +34,7 @@ final class MqttPublishTarget implements PublishTarget { /** - * For target the default is qos=0 because we have qos=0 all over the Akka cluster. + * For target the default is qos=0 because we have qos=0 all over the Pekko cluster. */ static final MqttQos DEFAULT_TARGET_QOS = MqttQos.AT_MOST_ONCE; @@ -51,7 +51,7 @@ private MqttPublishTarget(final MqttTopic topic, final MqttQos qos) { * * @param genericTarget provides the address which is used as string representation of the {@link MqttTopic} and * an optional MQTT QoS code. If {@code genericTarget} contains no QoS code, {@link #DEFAULT_TARGET_QOS} is used - * as fall-back because this matches the QoS that is used all over Akka cluster. + * as fall-back because this matches the QoS that is used all over Pekko cluster. * @return a {@code Success} that contains the {@code MqttPublishTarget} instance or a {@code Failure} if * {@code genericTarget} contains an invalid topic or QoS code. * @throws NullPointerException if {@code genericTarget} is {@code null}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/publishing/MqttPublisherActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/publishing/MqttPublisherActor.java index 96b252270d..d65f2336f6 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/publishing/MqttPublisherActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/publishing/MqttPublisherActor.java @@ -38,17 +38,17 @@ import org.eclipse.ditto.internal.utils.health.RetrieveHealthResponse; import org.eclipse.ditto.internal.utils.health.StatusInfo; -import akka.actor.Props; -import akka.japi.Pair; -import akka.japi.pf.ReceiveBuilder; -import akka.stream.BoundedSourceQueue; -import akka.stream.KillSwitch; -import akka.stream.KillSwitches; -import akka.stream.QueueOfferResult; -import akka.stream.UniqueKillSwitch; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.stream.BoundedSourceQueue; +import org.apache.pekko.stream.KillSwitch; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.QueueOfferResult; +import org.apache.pekko.stream.UniqueKillSwitch; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** * Actor responsible for converting outbound {@code Signal}s to a {@code GenericMqttPublish} and sending them to an diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/MqttSubscriber.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/MqttSubscriber.java index 0edc5f5976..b183fd19b6 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/MqttSubscriber.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/MqttSubscriber.java @@ -25,9 +25,9 @@ import com.hivemq.client.mqtt.datatypes.MqttTopicFilter; -import akka.NotUsed; -import akka.japi.Pair; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.javadsl.Source; import scala.util.Failure; import scala.util.Success; import scala.util.Try; @@ -62,9 +62,9 @@ public static MqttSubscriber newInstance(final GenericMqttSubscribingClient gene * For each connection source an MQTT Subscribe message is created and sent to the broker by the client. * The MQTT Subscribe message contains an MQTT Subscription for each address of the connection source where the * address is regarded as MQTT filter topic and the MQTT QoS is taken from the connection source as provided. - * The returned Akka stream contains the results of the client's subscribing for each connection source. + * The returned Pekko stream contains the results of the client's subscribing for each connection source. * If a connection source does not provide any addresses then no Subscribe message is created for that source – - * thus, there is no {@code SubscribeResult} in the returned Akka stream for that connection source. + * thus, there is no {@code SubscribeResult} in the returned Pekko stream for that connection source. * A connection source address might not be a valid MQTT filter topic. * In this case the SubscribeResult for the associated connection source is a failure. *

        @@ -72,7 +72,7 @@ public static MqttSubscriber newInstance(final GenericMqttSubscribingClient gene * succeeded. * * @param connectionSources the connection sources to subscribe for. - * @return an Akka stream containing the client subscribing results with their associated connection sources. + * @return an Pekko stream containing the client subscribing results with their associated connection sources. * @throws NullPointerException if any argument is {@code null}. */ public Source subscribeForConnectionSources( diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/SubscribeFailure.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/SubscribeFailure.java index 685a52739a..ed7d74ef67 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/SubscribeFailure.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/SubscribeFailure.java @@ -22,7 +22,7 @@ import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.publish.GenericMqttPublish; import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.subscribe.GenericMqttSubscribe; -import akka.NotUsed; +import org.apache.pekko.NotUsed; /** * Represents failed subscribing for at least one MQTT topic via one particular @@ -61,7 +61,7 @@ public boolean isSuccess() { * Throws always an IllegalStateException. */ @Override - public akka.stream.javadsl.Source getMqttPublishSourceOrThrow() { + public org.apache.pekko.stream.javadsl.Source getMqttPublishSourceOrThrow() { throw new IllegalStateException("Failure cannot provide a MQTT Publish Source."); } diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/SubscribeResult.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/SubscribeResult.java index 6414c46c46..3fc18fb080 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/SubscribeResult.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/SubscribeResult.java @@ -22,7 +22,7 @@ import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.subscribe.GenericMqttSubscribe; import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.publish.GenericMqttPublish; -import akka.NotUsed; +import org.apache.pekko.NotUsed; /** * Represents the result of subscribing a client with a Subscribe message ({@link GenericMqttSubscribe}). @@ -75,7 +75,7 @@ public Source getConnectionSource() { * @throws IllegalStateException if this result is a failure. * @see #isSuccess() */ - public abstract akka.stream.javadsl.Source getMqttPublishSourceOrThrow(); + public abstract org.apache.pekko.stream.javadsl.Source getMqttPublishSourceOrThrow(); /** * Returns the error that caused subscribing to fail if this result is a failure. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/SubscribeSuccess.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/SubscribeSuccess.java index 04326c0a64..eb129f64e2 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/SubscribeSuccess.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/SubscribeSuccess.java @@ -21,8 +21,8 @@ import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.publish.GenericMqttPublish; import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.subscribe.GenericMqttSubscribe; -import akka.NotUsed; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.stream.javadsl.Source; /** * Represents the successful subscription of an MQTT client to one or more @@ -30,7 +30,7 @@ */ final class SubscribeSuccess extends SubscribeResult { - private final akka.stream.javadsl.Source mqttPublishSource; + private final Source mqttPublishSource; private SubscribeSuccess(final org.eclipse.ditto.connectivity.model.Source connectionSource, final Source mqttPublishSource) { @@ -60,7 +60,7 @@ public boolean isSuccess() { } @Override - public akka.stream.javadsl.Source getMqttPublishSourceOrThrow() { + public org.apache.pekko.stream.javadsl.Source getMqttPublishSourceOrThrow() { return mqttPublishSource; } diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionMongoSnapshotAdapter.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionMongoSnapshotAdapter.java index c01bbd1550..407ab65163 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionMongoSnapshotAdapter.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionMongoSnapshotAdapter.java @@ -28,7 +28,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * SnapshotAdapter for {@link String}s persisted to/from MongoDB. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceActor.java index a55e3fb197..9e6d360eba 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceActor.java @@ -108,10 +108,10 @@ import org.eclipse.ditto.connectivity.service.messaging.validation.DittoConnectivityCommandValidator; import org.eclipse.ditto.connectivity.service.util.ConnectionPubSub; import org.eclipse.ditto.connectivity.service.util.ConnectivityMdcEntryKey; -import org.eclipse.ditto.internal.utils.akka.PingCommand; -import org.eclipse.ditto.internal.utils.akka.logging.CommonMdcEntryKey; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.PingCommand; +import org.eclipse.ditto.internal.utils.pekko.logging.CommonMdcEntryKey; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.internal.utils.config.InstanceIdentifierSupplier; import org.eclipse.ditto.internal.utils.config.ScopedConfig; @@ -129,21 +129,21 @@ import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.actor.Status; -import akka.actor.SupervisorStrategy; -import akka.cluster.Cluster; -import akka.cluster.routing.ClusterRouterPool; -import akka.cluster.routing.ClusterRouterPoolSettings; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; -import akka.persistence.RecoveryCompleted; -import akka.routing.Broadcast; -import akka.routing.ConsistentHashingPool; -import akka.routing.ConsistentHashingRouter; -import akka.routing.Pool; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.routing.ClusterRouterPool; +import org.apache.pekko.cluster.routing.ClusterRouterPoolSettings; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.persistence.RecoveryCompleted; +import org.apache.pekko.routing.Broadcast; +import org.apache.pekko.routing.ConsistentHashingPool; +import org.apache.pekko.routing.ConsistentHashingRouter; +import org.apache.pekko.routing.Pool; /** * Handles {@code *Connection} commands and manages the persistence of connection. The actual connection handling to the @@ -161,12 +161,12 @@ public final class ConnectionPersistenceActor /** * The ID of the journal plugin this persistence actor uses. */ - public static final String JOURNAL_PLUGIN_ID = "akka-contrib-mongodb-persistence-connection-journal"; + public static final String JOURNAL_PLUGIN_ID = "pekko-contrib-mongodb-persistence-connection-journal"; /** * The ID of the snapshot plugin this persistence actor uses. */ - public static final String SNAPSHOT_PLUGIN_ID = "akka-contrib-mongodb-persistence-connection-snapshots"; + public static final String SNAPSHOT_PLUGIN_ID = "pekko-contrib-mongodb-persistence-connection-snapshots"; private static final Duration DEFAULT_RETRIEVE_STATUS_TIMEOUT = Duration.ofMillis(500L); private static final Duration GRACE_PERIOD_NOT_RETRIEVING_CONNECTION_STATUS_AFTER_RECOVERY = Duration.ofSeconds(10); @@ -263,7 +263,7 @@ protected DittoDiagnosticLoggingAdapter createLogger() { } /** - * Creates Akka configuration object for this actor. + * Creates Pekko configuration object for this actor. * * @param connectionId the connection ID. * @param mongoReadJournal the ReadJournal used for gaining access to historical values of the connection. @@ -271,7 +271,7 @@ protected DittoDiagnosticLoggingAdapter createLogger() { * @param pubSubMediator pub-sub-mediator for the shutdown behavior. * @param pubSubMediator the pubSubMediator * @param connectivityConfigOverwrites the overwrites for the connectivity config for the given connection. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final ConnectionId connectionId, final MongoReadJournal mongoReadJournal, diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceOperationsActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceOperationsActor.java index 2ecf43e6f5..4ebd27a9be 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceOperationsActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceOperationsActor.java @@ -24,8 +24,8 @@ import com.mongodb.reactivestreams.client.MongoDatabase; import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; /** * Ops for the event-sourcing persistence of things. @@ -50,7 +50,7 @@ private ConnectionPersistenceOperationsActor(final ActorRef pubSubMediator, /** * Create Props of this actor. * - * @param pubSubMediator Akka pub-sub mediator. + * @param pubSubMediator Pekko pub-sub mediator. * @param mongoDbConfig the MongoDB configuration settings. * @param config configuration with info about event journal, snapshot store and database. * @param persistenceOperationsConfig the persistence operations configuration settings. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceStreamingActorCreator.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceStreamingActorCreator.java index 3c870adfbf..821d691485 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceStreamingActorCreator.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceStreamingActorCreator.java @@ -18,7 +18,7 @@ import org.eclipse.ditto.internal.utils.persistence.mongo.DefaultPersistenceStreamingActor; import org.eclipse.ditto.internal.utils.persistence.mongo.streaming.PidWithSeqNr; -import akka.actor.Props; +import org.apache.pekko.actor.Props; /** @@ -36,9 +36,9 @@ private ConnectionPersistenceStreamingActorCreator() { } /** - * Creates Akka configuration object Props for this PersistenceQueriesActor. + * Creates Pekko configuration object Props for this PersistenceQueriesActor. * - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props() { return DefaultPersistenceStreamingActor.props(ConnectionTag.class, diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPriorityProviderFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPriorityProviderFactory.java index b92c1800ef..5b52f421c3 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPriorityProviderFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPriorityProviderFactory.java @@ -14,15 +14,15 @@ import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; import org.eclipse.ditto.internal.utils.extension.DittoExtensionPoint; import org.eclipse.ditto.internal.utils.extension.DittoExtensionIds; import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; /** * Creates a connection priority provider based on the connection persistence actor and its logger. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionSupervisorActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionSupervisorActor.java index fc62e17cdc..0584bf7153 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionSupervisorActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionSupervisorActor.java @@ -48,16 +48,16 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorKilledException; -import akka.actor.ActorRef; -import akka.actor.OneForOneStrategy; -import akka.actor.Props; -import akka.actor.ReceiveTimeout; -import akka.actor.SupervisorStrategy; -import akka.japi.pf.DeciderBuilder; -import akka.japi.pf.FI; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ActorKilledException; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.OneForOneStrategy; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.ReceiveTimeout; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.japi.pf.DeciderBuilder; +import org.apache.pekko.japi.pf.FI; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; /** * Supervisor for {@link ConnectionPersistenceActor} which means it will create, start and watch it as child actor. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectivityMongoEventAdapter.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectivityMongoEventAdapter.java index 2d1f146529..d4e092fc6c 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectivityMongoEventAdapter.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectivityMongoEventAdapter.java @@ -15,7 +15,7 @@ import java.util.HashMap; import java.util.Map; -import akka.actor.ExtendedActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; import org.eclipse.ditto.base.model.signals.JsonParsable; import org.eclipse.ditto.base.model.signals.events.Event; import org.eclipse.ditto.base.model.signals.events.EventJsonDeserializer; @@ -39,7 +39,7 @@ /** * EventAdapter for {@link ConnectivityEvent}s persisted into - * akka-persistence event-journal. Converts Events to MongoDB BSON objects and vice versa. + * pekko-persistence event-journal. Converts Events to MongoDB BSON objects and vice versa. */ public final class ConnectivityMongoEventAdapter extends AbstractMongoEventAdapter> { diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/OneForOneEscalateStrategy.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/OneForOneEscalateStrategy.java index 68dede51bd..acc125e6ab 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/OneForOneEscalateStrategy.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/OneForOneEscalateStrategy.java @@ -17,15 +17,15 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.actor.ActorRef; -import akka.actor.ChildRestartStats; -import akka.actor.SupervisorStrategy; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ChildRestartStats; +import org.apache.pekko.actor.SupervisorStrategy; import scala.PartialFunction; import scala.collection.Iterable; /** * Implementation of {@link SupervisorStrategy}, which restarts supervised actors {@code maxRetries} times and - * afterwards escalates failures. This stands in contrast to the original {@link akka.actor.OneForOneStrategy} + * afterwards escalates failures. This stands in contrast to the original {@link org.apache.pekko.actor.OneForOneStrategy} * which stops instead of escalating. */ final class OneForOneEscalateStrategy extends SupervisorStrategy { @@ -62,7 +62,7 @@ static OneForOneEscalateStrategy escalateStrategy() { } @Override - public void handleChildTerminated(final akka.actor.ActorContext context, final ActorRef child, + public void handleChildTerminated(final org.apache.pekko.actor.ActorContext context, final ActorRef child, final Iterable children) { LOGGER.debug("Child <{}> terminated. Ignoring. Remaining children: {}", child, children); } @@ -82,7 +82,7 @@ public PartialFunction decider() { } @Override - public void processFailure(final akka.actor.ActorContext context, final boolean restart, + public void processFailure(final org.apache.pekko.actor.ActorContext context, final boolean restart, final ActorRef child, final Throwable cause, final ChildRestartStats stats, final Iterable children) { // ignoring the arguments, because #decider will either escalate and this code is never reached, or it diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/UsageBasedPriorityProvider.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/UsageBasedPriorityProvider.java index 8c82703c93..7d38892ea2 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/UsageBasedPriorityProvider.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/UsageBasedPriorityProvider.java @@ -20,10 +20,10 @@ import org.eclipse.ditto.connectivity.model.ConnectionMetrics; import org.eclipse.ditto.connectivity.model.signals.commands.query.RetrieveConnectionMetrics; import org.eclipse.ditto.connectivity.model.signals.commands.query.RetrieveConnectionMetricsResponse; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; -import akka.actor.ActorRef; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.pattern.Patterns; /** * Calculates the priority based on the sum of consumed and published messages of a connection. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/UsageBasedPriorityProviderFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/UsageBasedPriorityProviderFactory.java index 7e55b81959..da47a906c3 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/UsageBasedPriorityProviderFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/UsageBasedPriorityProviderFactory.java @@ -12,12 +12,12 @@ */ package org.eclipse.ditto.connectivity.service.messaging.persistence; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; public class UsageBasedPriorityProviderFactory implements ConnectionPriorityProviderFactory { diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/stages/StagedCommand.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/stages/StagedCommand.java index 140dbb0501..9fd91ad8c7 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/stages/StagedCommand.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/stages/StagedCommand.java @@ -34,7 +34,7 @@ import org.eclipse.ditto.json.JsonField; import org.eclipse.ditto.json.JsonObject; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Non-serializable local-only command for multi-stage processing by diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/strategies/commands/ConnectionCreatedStrategies.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/strategies/commands/ConnectionCreatedStrategies.java index a7fdc3bc84..cf2ce231bd 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/strategies/commands/ConnectionCreatedStrategies.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/strategies/commands/ConnectionCreatedStrategies.java @@ -25,7 +25,7 @@ import org.eclipse.ditto.internal.utils.persistentactors.results.Result; import org.eclipse.ditto.internal.utils.persistentactors.results.ResultFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Strategies to handle signals as an existing connection. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/strategies/commands/RetrieveResolvedHonoConnectionStrategy.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/strategies/commands/RetrieveResolvedHonoConnectionStrategy.java index aef990c5d4..e5f6fa1db5 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/strategies/commands/RetrieveResolvedHonoConnectionStrategy.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/strategies/commands/RetrieveResolvedHonoConnectionStrategy.java @@ -32,7 +32,7 @@ import org.eclipse.ditto.internal.utils.persistentactors.results.ResultFactory; import org.eclipse.ditto.json.JsonObject; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * This strategy handles the {@link RetrieveResolvedHonoConnection} command. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQClientActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQClientActor.java index 56af489443..efad7fdba6 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQClientActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQClientActor.java @@ -45,12 +45,12 @@ import org.eclipse.ditto.connectivity.service.messaging.internal.ClientDisconnected; import org.eclipse.ditto.connectivity.service.messaging.internal.ConnectionFailure; import org.eclipse.ditto.connectivity.service.util.ConnectivityMdcEntryKey; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.config.InstanceIdentifierSupplier; -import com.newmotion.akka.rabbitmq.ChannelActor; -import com.newmotion.akka.rabbitmq.ChannelCreated; -import com.newmotion.akka.rabbitmq.CreateChannel; +import com.github.pjfanning.pekko.rabbitmq.ChannelActor; +import com.github.pjfanning.pekko.rabbitmq.ChannelCreated; +import com.github.pjfanning.pekko.rabbitmq.CreateChannel; import com.rabbitmq.client.AMQP; import com.rabbitmq.client.AlreadyClosedException; import com.rabbitmq.client.Channel; @@ -63,12 +63,12 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.Status; -import akka.japi.pf.FI; -import akka.japi.pf.FSMStateFunctionBuilder; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.japi.pf.FI; +import org.apache.pekko.japi.pf.FSMStateFunctionBuilder; +import org.apache.pekko.pattern.Patterns; import scala.Option; import scala.concurrent.duration.FiniteDuration; @@ -128,14 +128,14 @@ private RabbitMQClientActor(final Connection connection, final ActorRef proxyAct } /** - * Creates Akka configuration object for this actor. + * Creates Pekko configuration object for this actor. * * @param connection the connection. * @param commandForwarderActor the actor used to send signals into the ditto cluster. * @param connectionActor the connectionPersistenceActor which created this client. * @param dittoHeaders headers of the command that caused this actor to be created. * @param connectivityOverwritesConfig the overwrites for the connectivity config for the given connection. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final Connection connection, final ActorRef commandForwarderActor, final ActorRef connectionActor, @@ -155,13 +155,13 @@ protected Set getExcludedAddressReportingChildNamePatterns() { } /** - * Creates Akka configuration object for this actor. + * Creates Pekko configuration object for this actor. * * @param connection the connection. * @param proxyActor the actor used to send signals into the ditto cluster. * @param connectionActor the connectionPersistenceActor which created this client. * @param rabbitConnectionFactoryFactory the ConnectionFactory Factory to use. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ static Props propsForTests(final Connection connection, @Nullable final ActorRef proxyActor, final ActorRef connectionActor, final RabbitConnectionFactoryFactory rabbitConnectionFactoryFactory) { @@ -312,7 +312,7 @@ private CompletionStage connect(final Connection connection, if (connectionFactoryOpt.isPresent()) { final ConnectionFactory connectionFactory = connectionFactoryOpt.get(); - final Props props = com.newmotion.akka.rabbitmq.ConnectionActor.props(connectionFactory, + final Props props = com.github.pjfanning.pekko.rabbitmq.ConnectionActor.props(connectionFactory, FiniteDuration.apply(internalReconnectTimeout.getSeconds(), TimeUnit.SECONDS), (rmqConnection, connectionActorRef) -> { l.info("Established RMQ connection: {}", rmqConnection); diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQConsumerActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQConsumerActor.java index 52767d183f..34f67defbc 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQConsumerActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQConsumerActor.java @@ -40,7 +40,7 @@ import org.eclipse.ditto.connectivity.service.messaging.ConnectivityStatusResolver; import org.eclipse.ditto.connectivity.service.messaging.LegacyBaseConsumerActor; import org.eclipse.ditto.connectivity.service.messaging.internal.RetrieveAddressStatus; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.tracing.DittoTracing; import org.eclipse.ditto.internal.utils.tracing.span.SpanOperationName; import org.eclipse.ditto.internal.utils.tracing.span.TracingSpans; @@ -51,11 +51,11 @@ import com.rabbitmq.client.Delivery; import com.rabbitmq.client.Envelope; -import akka.Done; -import akka.NotUsed; -import akka.actor.Props; -import akka.japi.pf.ReceiveBuilder; -import akka.stream.javadsl.Sink; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.stream.javadsl.Sink; /** @@ -93,7 +93,7 @@ protected ThreadSafeDittoLoggingAdapter log() { } /** - * Creates Akka configuration object {@link Props} for this {@code RabbitMQConsumerActor}. + * Creates Pekko configuration object {@link Props} for this {@code RabbitMQConsumerActor}. * * @param sourceAddress the source address. * @param inboundMappingSink the mapping sink where received messages are forwarded to @@ -103,7 +103,7 @@ protected ThreadSafeDittoLoggingAdapter log() { * @param connectivityStatusResolver connectivity status resolver to resolve occurred exceptions to a connectivity * status. * @param connectivityConfig the config of the connectivity service with potential overwrites. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ static Props props(final String sourceAddress, final Sink inboundMappingSink, diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQPublisherActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQPublisherActor.java index 5babf42790..85216a81f8 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQPublisherActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQPublisherActor.java @@ -62,16 +62,16 @@ import org.eclipse.ditto.json.JsonValue; import org.eclipse.ditto.placeholders.ExpressionResolver; -import com.newmotion.akka.rabbitmq.ChannelCreated; -import com.newmotion.akka.rabbitmq.ChannelMessage; +import com.github.pjfanning.pekko.rabbitmq.ChannelCreated; +import com.github.pjfanning.pekko.rabbitmq.ChannelMessage; import com.rabbitmq.client.AMQP; import com.rabbitmq.client.Channel; import com.rabbitmq.client.ConfirmListener; import com.rabbitmq.client.ReturnListener; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Responsible for publishing {@link ExternalMessage}s into RabbitMQ / AMQP 0.9.1. @@ -116,13 +116,13 @@ private RabbitMQPublisherActor(final Connection connection, } /** - * Creates Akka configuration object {@link Props} for this {@code RabbitMQPublisherActor}. + * Creates Pekko configuration object {@link Props} for this {@code RabbitMQPublisherActor}. * * @param connection the connection this publisher belongs to * @param connectivityStatusResolver connectivity status resolver to resolve occurred exceptions to a connectivity * status. * @param connectivityConfig the config of the connectivity service with potential overwrites. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ static Props props(final Connection connection, final ConnectivityStatusResolver connectivityStatusResolver, diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQValidator.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQValidator.java index 40fef1d637..1cd1a18a90 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQValidator.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQValidator.java @@ -33,7 +33,7 @@ import org.eclipse.ditto.connectivity.service.messaging.validation.AbstractProtocolValidator; import org.eclipse.ditto.placeholders.PlaceholderFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Connection specification for RabbitMQ protocol. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/signing/AzSaslSigning.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/signing/AzSaslSigning.java index 997da9a7b1..4b3e2a0936 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/signing/AzSaslSigning.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/signing/AzSaslSigning.java @@ -23,11 +23,11 @@ import org.eclipse.ditto.connectivity.service.messaging.amqp.AmqpConnectionSigning; import org.eclipse.ditto.connectivity.service.messaging.httppush.HttpRequestSigning; -import akka.NotUsed; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.headers.HttpCredentials; -import akka.stream.javadsl.Source; -import akka.util.ByteString; +import org.apache.pekko.NotUsed; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.headers.HttpCredentials; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.util.ByteString; /** * Signing of HTTP requests and AMQP connection strings with Azure SASL. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/signing/AzSaslSigningFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/signing/AzSaslSigningFactory.java index 70589d6cd3..4be473dad8 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/signing/AzSaslSigningFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/signing/AzSaslSigningFactory.java @@ -23,7 +23,7 @@ import org.eclipse.ditto.json.JsonFieldDefinition; import org.eclipse.ditto.json.JsonObject; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Creator of the signing process for Azure SASL. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/signing/NoOpSigning.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/signing/NoOpSigning.java index dd24a95c95..82a5485ae7 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/signing/NoOpSigning.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/signing/NoOpSigning.java @@ -19,9 +19,9 @@ import org.eclipse.ditto.connectivity.service.messaging.amqp.AmqpConnectionSigning; import org.eclipse.ditto.connectivity.service.messaging.httppush.HttpRequestSigning; -import akka.NotUsed; -import akka.http.javadsl.model.HttpRequest; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.stream.javadsl.Source; /** * No-op implementation of {@link Signing} for other authentication mechanisms. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/ClientSessionCredentialsVisitor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/ClientSessionCredentialsVisitor.java index a9505a56e2..67333c02ba 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/ClientSessionCredentialsVisitor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/ClientSessionCredentialsVisitor.java @@ -24,7 +24,7 @@ import org.eclipse.ditto.connectivity.model.UserPasswordCredentials; import org.eclipse.ditto.connectivity.service.messaging.internal.ssl.PublicKeyAuthenticationFactory; -import akka.event.LoggingAdapter; +import org.apache.pekko.event.LoggingAdapter; /** * Applies configured {@link org.eclipse.ditto.connectivity.model.Credentials} from a connection to the given diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/SshClientProvider.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/SshClientProvider.java index 4b314ca311..a68a756c9a 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/SshClientProvider.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/SshClientProvider.java @@ -23,16 +23,16 @@ import org.apache.sshd.server.forward.ForwardingFilter; import org.eclipse.ditto.connectivity.service.config.DittoConnectivityConfig; import org.eclipse.ditto.connectivity.service.config.TunnelConfig; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; -import akka.Done; -import akka.actor.AbstractExtensionId; -import akka.actor.ActorSystem; -import akka.actor.CoordinatedShutdown; -import akka.actor.ExtendedActorSystem; -import akka.actor.Extension; +import org.apache.pekko.Done; +import org.apache.pekko.actor.AbstractExtensionId; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.CoordinatedShutdown; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.actor.Extension; /** * Provider for {@link org.apache.sshd.client.SshClient SshClient} used to tunnel connections via SSH. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/SshTunnelActor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/SshTunnelActor.java index a155bfefcd..e6ac6cf2fd 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/SshTunnelActor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/SshTunnelActor.java @@ -48,13 +48,13 @@ import org.eclipse.ditto.connectivity.service.messaging.internal.RetrieveAddressStatus; import org.eclipse.ditto.connectivity.service.messaging.monitoring.logs.ConnectionLogger; import org.eclipse.ditto.connectivity.service.util.ConnectivityMdcEntryKey; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.config.InstanceIdentifierSupplier; -import akka.actor.AbstractActorWithTimers; -import akka.actor.Props; -import akka.event.LoggingAdapter; -import akka.pattern.Patterns; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.Props; +import org.apache.pekko.event.LoggingAdapter; +import org.apache.pekko.pattern.Patterns; /** * Establishes an SSH tunnel using to the data from the given connection. The tunnel can be started/stopped with the @@ -117,7 +117,7 @@ private SshTunnelActor(final Connection connection, } /** - * Create Akka actor configuration Props object for the SSH tunnel actor. + * Create Pekko actor configuration Props object for the SSH tunnel actor. * * @param connection the connection to create the SSH tunnel for. * @param connectivityStatusResolver connectivity status resolver to resolve the SSH tunnel status based on diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/TunnelChannelListener.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/TunnelChannelListener.java index 1272eaa81c..9a4f76ea9c 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/TunnelChannelListener.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/TunnelChannelListener.java @@ -19,8 +19,8 @@ import org.apache.sshd.common.channel.ChannelListener; import org.apache.sshd.common.forward.TcpipClientChannel; -import akka.actor.ActorRef; -import akka.event.LoggingAdapter; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.event.LoggingAdapter; /** * A channel listener that reports exceptions to the {@code SshTunnelActor}. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/TunnelSessionListener.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/TunnelSessionListener.java index 76ef693d06..c3def4ae2d 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/TunnelSessionListener.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/tunnel/TunnelSessionListener.java @@ -15,8 +15,8 @@ import org.apache.sshd.common.session.Session; import org.apache.sshd.common.session.SessionListener; -import akka.actor.ActorRef; -import akka.event.LoggingAdapter; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.event.LoggingAdapter; /** * A {@link org.apache.sshd.common.session.SessionListener} implementation that reports exceptions to the {@code diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/AbstractProtocolValidator.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/AbstractProtocolValidator.java index cff86275ff..a0dfeeaf3a 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/AbstractProtocolValidator.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/AbstractProtocolValidator.java @@ -41,7 +41,7 @@ import org.eclipse.ditto.placeholders.Placeholder; import org.eclipse.ditto.placeholders.PlaceholderFilter; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Protocol-specific specification for {@link org.eclipse.ditto.connectivity.model.Connection} objects. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/ConnectionValidator.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/ConnectionValidator.java index 6c9bf95f3e..1846693b5c 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/ConnectionValidator.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/ConnectionValidator.java @@ -60,8 +60,8 @@ import org.eclipse.ditto.rql.parser.RqlPredicateParser; import org.eclipse.ditto.rql.query.filter.QueryFilterCriteriaFactory; -import akka.actor.ActorSystem; -import akka.event.LoggingAdapter; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.event.LoggingAdapter; /** * Validate a connection according to its type. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/CredentialsValidationVisitor.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/CredentialsValidationVisitor.java index 638868c543..b99f5bb37a 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/CredentialsValidationVisitor.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/CredentialsValidationVisitor.java @@ -30,7 +30,7 @@ import org.eclipse.ditto.connectivity.model.UserPasswordCredentials; import org.eclipse.ditto.connectivity.service.config.ConnectivityConfig; -import akka.http.javadsl.model.Uri; +import org.apache.pekko.http.javadsl.model.Uri; /** * Validate credentials in a connection. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/CustomConnectivityCommandInterceptorProvider.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/CustomConnectivityCommandInterceptorProvider.java index 0de0b01307..3fa5318456 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/CustomConnectivityCommandInterceptorProvider.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/CustomConnectivityCommandInterceptorProvider.java @@ -21,7 +21,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; public interface CustomConnectivityCommandInterceptorProvider extends DittoExtensionPoint { diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/DefaultHostValidator.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/DefaultHostValidator.java index 870d4d57d5..ece63ea4d6 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/DefaultHostValidator.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/DefaultHostValidator.java @@ -21,7 +21,7 @@ import org.eclipse.ditto.connectivity.service.config.ConnectivityConfig; -import akka.event.LoggingAdapter; +import org.apache.pekko.event.LoggingAdapter; /** * Validates a given hostname against a set of fixed blocked addresses (e.g. loopback, multicast, ...), a set of diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/DittoConnectivityCommandValidator.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/DittoConnectivityCommandValidator.java index 7c5a5abb32..2bf0f760ed 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/DittoConnectivityCommandValidator.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/DittoConnectivityCommandValidator.java @@ -30,8 +30,8 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; /** * Checks if the given {@link ConnectivityCommand} is valid by trying to create the client actor props. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/NoOpConnectivityCommandInterceptorProvider.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/NoOpConnectivityCommandInterceptorProvider.java index 44b80ec7b7..ecb187d90b 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/NoOpConnectivityCommandInterceptorProvider.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/validation/NoOpConnectivityCommandInterceptorProvider.java @@ -20,7 +20,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; public class NoOpConnectivityCommandInterceptorProvider implements CustomConnectivityCommandInterceptorProvider{ diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/util/ConnectionPubSub.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/util/ConnectionPubSub.java index 55ab7a812b..858566ae2f 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/util/ConnectionPubSub.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/util/ConnectionPubSub.java @@ -25,11 +25,11 @@ import org.eclipse.ditto.internal.utils.pubsub.DistributedSub; import org.eclipse.ditto.internal.utils.pubsub.api.SubAck; -import akka.actor.AbstractExtensionId; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.actor.Extension; +import org.apache.pekko.actor.AbstractExtensionId; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.actor.Extension; /** * Pub-sub for messages between client actors of a connection. diff --git a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/util/ConnectionPubSubFactory.java b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/util/ConnectionPubSubFactory.java index 96ad5fffd1..10431a4fe6 100644 --- a/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/util/ConnectionPubSubFactory.java +++ b/connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/util/ConnectionPubSubFactory.java @@ -25,8 +25,8 @@ import org.eclipse.ditto.internal.utils.pubsub.extractors.AckExtractor; import org.eclipse.ditto.internal.utils.pubsub.extractors.PubSubTopicExtractor; -import akka.actor.ActorRefFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.ActorSystem; /** * Pub-sub factory for messages between client actors of a connection. diff --git a/connectivity/service/src/main/resources/connectivity-dev.conf b/connectivity/service/src/main/resources/connectivity-dev.conf index a7365171fc..53b4de3103 100644 --- a/connectivity/service/src/main/resources/connectivity-dev.conf +++ b/connectivity/service/src/main/resources/connectivity-dev.conf @@ -24,10 +24,10 @@ ditto { } } -akka { +pekko { management.http.port = 25610 - management.http.port = ${?AKKA_MANAGEMENT_PORT} + management.http.port = ${?PEKKO_MANAGEMENT_PORT} remote { # for debugging purpose @@ -59,8 +59,8 @@ akka { } seed-nodes = [ - "akka://ditto-cluster@127.0.0.1:2552", # port of the policies service to join in cluster - "akka://ditto-cluster@"${akka.remote.artery.canonical.hostname}":"${akka.remote.artery.canonical.port} + "pekko://ditto-cluster@127.0.0.1:2552", # port of the policies service to join in cluster + "pekko://ditto-cluster@"${pekko.remote.artery.canonical.hostname}":"${pekko.remote.artery.canonical.port} ] } } diff --git a/connectivity/service/src/main/resources/connectivity.conf b/connectivity/service/src/main/resources/connectivity.conf index 5191d6e098..0f624e66d5 100644 --- a/connectivity/service/src/main/resources/connectivity.conf +++ b/connectivity/service/src/main/resources/connectivity.conf @@ -134,8 +134,8 @@ ditto { {exceptionName: "org.apache.qpid.jms.JmsOperationTimedOutException", messagePattern: ".*"} # HTTP {exceptionName: "org.eclipse.ditto.jwt.model.JwtInvalidException", messagePattern: ".*"} - {exceptionName: "akka.http.impl.engine.client.OutgoingConnectionBlueprint.UnexpectedConnectionClosureException", messagePattern: ".*"} - {exceptionName: "akka.stream.StreamTcpException", messagePattern: ".*Connection reset by peer.*"} + {exceptionName: "org.apache.pekko.http.impl.engine.client.OutgoingConnectionBlueprint.UnexpectedConnectionClosureException", messagePattern: ".*"} + {exceptionName: "org.apache.pekko.stream.StreamTcpException", messagePattern: ".*Connection reset by peer.*"} # Common cert exceptions {exceptionName: "java.security.cert.CertificateException", messagePattern: ".*"} {exceptionName: "java.security.cert.CertPathValidatorException", messagePattern: ".*"} @@ -555,8 +555,8 @@ ditto { } } - alpakka = ${akka.kafka.consumer} # resolve defaults from reference.conf - alpakka = { + pekko-connectors = ${pekko.kafka.consumer} # resolve defaults from reference.conf + pekko-connectors = { use-dispatcher = "kafka-consumer-dispatcher" poll-interval = 50ms stop-timeout = 0s @@ -613,8 +613,8 @@ ditto { } committer { - alpakka = ${akka.kafka.committer} # resolve defaults from reference.conf - alpakka = { + pekko-connectors = ${pekko.kafka.committer} # resolve defaults from reference.conf + pekko-connectors = { # Maximum number of messages in a single commit batch max-batch = 1000 max-batch = ${?KAFKA_COMMITTER_MAX_BATCH} @@ -656,8 +656,8 @@ ditto { init-timeout-seconds = 3 init-timeout-seconds = ${?KAFKA_PRODUCER_INIT_TIMEOUT_SECONDS} - alpakka = ${akka.kafka.producer} # resolve defaults from reference.conf - alpakka { + pekko-connectors = ${pekko.kafka.producer} # resolve defaults from reference.conf + pekko-connectors { use-dispatcher = "kafka-producer-dispatcher" # Properties defined by org.apache.kafka.clients.producer.ProducerConfig @@ -1036,14 +1036,14 @@ ditto { } } -akka { +pekko { http { client { user-agent-header = eclipse-ditto/${ditto.version} # Setting this to less than Inf may generate occasional failures for not very active HTTP-PUSH connections. idle-timeout = Inf - idle-timeout = ${?AKKA_HTTP_CLIENT_IDLE_TIMEOUT} + idle-timeout = ${?PEKKO_HTTP_CLIENT_IDLE_TIMEOUT} parsing { max-uri-length = 8k # default: 2k @@ -1055,7 +1055,7 @@ akka { # This timeout configures a maximum amount of time, while the connection can be kept open. # Helps the process of rebalancing between service instances when reaching the target through a load-balancer max-connection-lifetime = Inf - max-connection-lifetime = ${?AKKA_HTTP_HOSTPOOL_MAX_CONNECTION_LIFETIME} + max-connection-lifetime = ${?PEKKO_HTTP_HOSTPOOL_MAX_CONNECTION_LIFETIME} } } cluster { @@ -1066,21 +1066,21 @@ akka { # upon Shard restart. i.e. if the Shard is started on a different ShardRegion # due to rebalance or crash. remember-entities = on - remember-entities = ${?AKKA_CLUSTER_SHARDING_REMEMBER_ENTITIES} + remember-entities = ${?PEKKO_CLUSTER_SHARDING_REMEMBER_ENTITIES} # When 'remember-entities' is enabled and the state store mode is ddata this controls # how the remembered entities and shards are stored. Possible values are "eventsourced" and "ddata" # Default is ddata for backwards compatibility. remember-entities-store = "eventsourced" - remember-entities-store = ${?AKKA_CLUSTER_SHARDING_REMEMBER_ENTITIES_STORE} + remember-entities-store = ${?PEKKO_CLUSTER_SHARDING_REMEMBER_ENTITIES_STORE} # The shard saves persistent snapshots after this number of persistent events. # Snapshots are used to reduce recovery times. snapshot-after = 200 # default: 1000 - snapshot-after = ${?AKKA_CLUSTER_SHARDING_SNAPSHOT_AFTER} + snapshot-after = ${?PEKKO_CLUSTER_SHARDING_SNAPSHOT_AFTER} - journal-plugin-id = "akka-contrib-mongodb-persistence-connection-remember-journal" - snapshot-plugin-id = "akka-contrib-mongodb-persistence-connection-remember-snapshots" + journal-plugin-id = "pekko-contrib-mongodb-persistence-connection-remember-journal" + snapshot-plugin-id = "pekko-contrib-mongodb-persistence-connection-remember-snapshots" # increase default timeout because otherwise shards are beeing stopped and restarted if the ShardCoordinator # could not load initial entity ids from the "remember entities store" within this timeout. This is required @@ -1122,16 +1122,16 @@ akka { # default timeout is 5s for the phase - give a longer timeout in order # to be able to send disconnect announcements of connections: timeout = 10s - timeout = ${?AKKA_COORDINATED_SHUTDOWN_PHASES_BEFORE_SERVICE_UNBIND_TIMEOUT} + timeout = ${?PEKKO_COORDINATED_SHUTDOWN_PHASES_BEFORE_SERVICE_UNBIND_TIMEOUT} } } } persistence { journal.auto-start-journals = [ - "akka-contrib-mongodb-persistence-connection-journal" + "pekko-contrib-mongodb-persistence-connection-journal" ] snapshot-store.auto-start-snapshot-stores = [ - "akka-contrib-mongodb-persistence-connection-snapshots" + "pekko-contrib-mongodb-persistence-connection-snapshots" ] } } @@ -1139,8 +1139,8 @@ akka { include "ditto-protocol-subscriber.conf" include "ditto-edge-service.conf" -akka-contrib-mongodb-persistence-connection-journal { - class = "akka.contrib.persistence.mongodb.MongoJournal" +pekko-contrib-mongodb-persistence-connection-journal { + class = "pekko.contrib.persistence.mongodb.MongoJournal" plugin-dispatcher = "connection-persistence-dispatcher" circuit-breaker { @@ -1158,6 +1158,7 @@ akka-contrib-mongodb-persistence-connection-journal { realtime-collection = "connection_realtime" metadata-collection = "connection_metadata" + metadata-index = "connection_metadata_index" } event-adapters { @@ -1170,8 +1171,8 @@ akka-contrib-mongodb-persistence-connection-journal { } } -akka-contrib-mongodb-persistence-connection-journal-read { - class = "akka.contrib.persistence.mongodb.MongoReadJournal" +pekko-contrib-mongodb-persistence-connection-journal-read { + class = "pekko.contrib.persistence.mongodb.MongoReadJournal" plugin-dispatcher = "connection-persistence-dispatcher" overrides { @@ -1179,11 +1180,12 @@ akka-contrib-mongodb-persistence-connection-journal-read { journal-index = "connection_journal_index" realtime-collection = "connection_realtime" metadata-collection = "connection_metadata" + metadata-index = "connection_metadata_index" } } -akka-contrib-mongodb-persistence-connection-snapshots { - class = "akka.contrib.persistence.mongodb.MongoSnapshots" +pekko-contrib-mongodb-persistence-connection-snapshots { + class = "pekko.contrib.persistence.mongodb.MongoSnapshots" plugin-dispatcher = "connection-persistence-dispatcher" circuit-breaker { @@ -1201,8 +1203,8 @@ akka-contrib-mongodb-persistence-connection-snapshots { } } -akka-contrib-mongodb-persistence-connection-remember-journal { - class = "akka.contrib.persistence.mongodb.MongoJournal" +pekko-contrib-mongodb-persistence-connection-remember-journal { + class = "pekko.contrib.persistence.mongodb.MongoJournal" circuit-breaker { max-failures = 5 # if an exception during persisting an event/snapshot occurs this often -- a successful write resets the counter @@ -1218,11 +1220,12 @@ akka-contrib-mongodb-persistence-connection-remember-journal { journal-index = "connection_remember_journal_index" realtime-collection = "connection_remember_realtime" metadata-collection = "connection_remember_metadata" + metadata-index = "connection_remember_metadata_index" } } -akka-contrib-mongodb-persistence-connection-remember-snapshots { - class = "akka.contrib.persistence.mongodb.MongoSnapshots" +pekko-contrib-mongodb-persistence-connection-remember-snapshots { + class = "pekko.contrib.persistence.mongodb.MongoSnapshots" overrides { snaps-collection = "connection_remember_snaps" snaps-index = "connection_remember_snaps_index" @@ -1245,7 +1248,7 @@ connection-persistence-dispatcher { } rabbit-stats-bounded-mailbox { - mailbox-type = "akka.dispatch.BoundedMailbox" + mailbox-type = "org.apache.pekko.dispatch.BoundedMailbox" mailbox-capacity = 10 mailbox-push-timeout-time = 0s } diff --git a/connectivity/service/src/main/resources/logback.xml b/connectivity/service/src/main/resources/logback.xml index 0c53bfc38a..46ae52471b 100644 --- a/connectivity/service/src/main/resources/logback.xml +++ b/connectivity/service/src/main/resources/logback.xml @@ -16,14 +16,14 @@ - %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{akkaSource} - %msg%n + %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{pekkoSource} - %msg%n System.err - %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{akkaSource} - %msg%n + %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{pekkoSource} - %msg%n ERROR @@ -70,9 +70,9 @@ - - - + + + diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/ConnectivityRootActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/ConnectivityRootActorTest.java index 296e6af561..d789067ba1 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/ConnectivityRootActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/ConnectivityRootActorTest.java @@ -17,8 +17,8 @@ import org.eclipse.ditto.connectivity.service.config.DittoConnectivityConfig; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; -import akka.actor.ActorSystem; -import akka.actor.Props; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; /** * Tests {@link ConnectivityRootActor}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/config/DefaultHonoConfigTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/config/DefaultHonoConfigTest.java index 374a1b1fca..579c39c6b4 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/config/DefaultHonoConfigTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/config/DefaultHonoConfigTest.java @@ -39,8 +39,8 @@ import com.typesafe.config.ConfigException; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.javadsl.TestKit; import nl.jqno.equalsverifier.EqualsVerifier; import scala.concurrent.duration.FiniteDuration; diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/config/DefaultKafkaConfigTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/config/DefaultKafkaConfigTest.java index 0c74ff978b..097cf03045 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/config/DefaultKafkaConfigTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/config/DefaultKafkaConfigTest.java @@ -65,16 +65,16 @@ public void underTestReturnsValuesOfConfigFile() { assertThat(underTest.getConsumerConfig().getThrottlingConfig().getInterval()).isEqualTo(Duration.ofSeconds(1)); assertThat(underTest.getConsumerConfig() - .getAlpakkaConfig() - .getDuration("poll-interval")) // from akka.kafka.consumer + .getPekkoConnectorsConfig() + .getDuration("poll-interval")) // from pekko.kafka.consumer .isEqualTo(DEFAULT_POLL_INTERVAL); - assertThat(underTest.getConsumerConfig().getAlpakkaConfig().getDuration("poll-timeout")) // from kafka-test.conf + assertThat(underTest.getConsumerConfig().getPekkoConnectorsConfig().getDuration("poll-timeout")) // from kafka-test.conf .isEqualTo(DEFAULT_POLL_TIMEOUT); - assertThat(underTest.getProducerConfig().getParallelism()) // from akka.kafka.producer + assertThat(underTest.getProducerConfig().getParallelism()) // from pekko.kafka.producer .isEqualTo(DEFAULT_PARALLELISM); assertThat( - underTest.getProducerConfig().getAlpakkaConfig().getDuration("close-timeout")) // from kafka-test.conf + underTest.getProducerConfig().getPekkoConnectorsConfig().getDuration("close-timeout")) // from kafka-test.conf .isEqualTo(DEFAULT_CLOSE_TIMEOUT); assertThat(underTest.getProducerConfig().getQueueSize()).isEqualTo(39); diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/CloudEventsMapperTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/CloudEventsMapperTest.java index 090341419f..0453d1cd83 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/CloudEventsMapperTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/CloudEventsMapperTest.java @@ -37,7 +37,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; public final class CloudEventsMapperTest { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/ConnectionStatusMessageMapperTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/ConnectionStatusMessageMapperTest.java index bcda6af027..751f83924d 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/ConnectionStatusMessageMapperTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/ConnectionStatusMessageMapperTest.java @@ -47,7 +47,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Tests {@link ConnectionStatusMessageMapper}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/DefaultConnectivitySignalEnrichmentProviderTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/DefaultConnectivitySignalEnrichmentProviderTest.java index 0e3925cd6f..b375f6728b 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/DefaultConnectivitySignalEnrichmentProviderTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/DefaultConnectivitySignalEnrichmentProviderTest.java @@ -30,8 +30,8 @@ import com.typesafe.config.ConfigFactory; import com.typesafe.config.ConfigValueFactory; -import akka.actor.ActorSystem; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link DefaultConnectivitySignalEnrichmentProvider}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/DefaultMessageMapperFactoryTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/DefaultMessageMapperFactoryTest.java index 3933587b67..a87c27b734 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/DefaultMessageMapperFactoryTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/DefaultMessageMapperFactoryTest.java @@ -36,9 +36,9 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; -import akka.event.DiagnosticLoggingAdapter; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Unit test for {@link DefaultMessageMapperFactory}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/DittoMessageMapperTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/DittoMessageMapperTest.java index 2c756f8a6d..bec7995a25 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/DittoMessageMapperTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/DittoMessageMapperTest.java @@ -42,7 +42,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Unit test for {@link DittoMessageMapper}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/ImplicitThingCreationMessageMapperTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/ImplicitThingCreationMessageMapperTest.java index 5088992f3f..a250590179 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/ImplicitThingCreationMessageMapperTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/ImplicitThingCreationMessageMapperTest.java @@ -55,7 +55,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Unit test for {@link ImplicitThingCreationMessageMapper}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/NormalizedMessageMapperTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/NormalizedMessageMapperTest.java index a2eab825f2..e2c2a79e47 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/NormalizedMessageMapperTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/NormalizedMessageMapperTest.java @@ -67,7 +67,7 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Tests {@link NormalizedMessageMapper}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/RawMessageMapperTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/RawMessageMapperTest.java index 04ef28ee6b..0f32c856af 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/RawMessageMapperTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/RawMessageMapperTest.java @@ -50,7 +50,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Tests {@link RawMessageMapper}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/UpdateTwinWithLiveResponseMessageMapperTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/UpdateTwinWithLiveResponseMessageMapperTest.java index f81280c84c..845b20347a 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/UpdateTwinWithLiveResponseMessageMapperTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/UpdateTwinWithLiveResponseMessageMapperTest.java @@ -57,7 +57,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Unit test for {@link UpdateTwinWithLiveResponseMessageMapper}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/WrappingMessageMapperTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/WrappingMessageMapperTest.java index a7450a670f..7502d3390f 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/WrappingMessageMapperTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/WrappingMessageMapperTest.java @@ -43,7 +43,7 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Tests for {@link WrappingMessageMapper}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/JavaScriptMessageMapperFactory.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/JavaScriptMessageMapperFactory.java index 2feb5a98d2..c438229b19 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/JavaScriptMessageMapperFactory.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/JavaScriptMessageMapperFactory.java @@ -24,7 +24,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Factory for creating instances of {@link JavaScriptMessageMapperRhino} and configurations of it. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/JavaScriptMessageMapperRhinoSandboxingTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/JavaScriptMessageMapperRhinoSandboxingTest.java index 12050aa118..1342c9a626 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/JavaScriptMessageMapperRhinoSandboxingTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/JavaScriptMessageMapperRhinoSandboxingTest.java @@ -35,7 +35,7 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Tests the {@link JavaScriptMessageMapperRhino} sandboxing capabilities by trying to exploit CPU time, exiting, etc. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/JavaScriptMessageMapperRhinoTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/JavaScriptMessageMapperRhinoTest.java index ed7aa99ed2..a6dc4062b7 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/JavaScriptMessageMapperRhinoTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/JavaScriptMessageMapperRhinoTest.java @@ -74,7 +74,7 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Tests the {@link JavaScriptMessageMapperRhino} by initializing different mapping templates and ensuring that they diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/SimpleMapTextPayloadToDitto.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/SimpleMapTextPayloadToDitto.java index adac3e772d..2e50fa0aae 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/SimpleMapTextPayloadToDitto.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/SimpleMapTextPayloadToDitto.java @@ -24,7 +24,7 @@ import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.State; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; @State(Scope.Benchmark) public class SimpleMapTextPayloadToDitto implements MapToDittoProtocolScenario { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test1DecodeBinaryPayloadToDitto.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test1DecodeBinaryPayloadToDitto.java index feb8a32fbb..44f17cc91c 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test1DecodeBinaryPayloadToDitto.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test1DecodeBinaryPayloadToDitto.java @@ -25,7 +25,7 @@ import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.State; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; @State(Scope.Benchmark) public class Test1DecodeBinaryPayloadToDitto implements MapToDittoProtocolScenario { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test2ParseJsonPayloadToDitto.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test2ParseJsonPayloadToDitto.java index aac951b61e..fc0c47ce18 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test2ParseJsonPayloadToDitto.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test2ParseJsonPayloadToDitto.java @@ -24,7 +24,7 @@ import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.State; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; @State(Scope.Benchmark) public class Test2ParseJsonPayloadToDitto implements MapToDittoProtocolScenario { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test3FormatJsonPayloadToDitto.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test3FormatJsonPayloadToDitto.java index 8267ce3692..007559e5fa 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test3FormatJsonPayloadToDitto.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test3FormatJsonPayloadToDitto.java @@ -24,7 +24,7 @@ import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.State; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; @State(Scope.Benchmark) public class Test3FormatJsonPayloadToDitto implements MapToDittoProtocolScenario { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test4ConstructJsonPayloadToDitto.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test4ConstructJsonPayloadToDitto.java index d1bd73a22d..a36a8bd7f7 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test4ConstructJsonPayloadToDitto.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test4ConstructJsonPayloadToDitto.java @@ -24,7 +24,7 @@ import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.State; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; @State(Scope.Benchmark) public class Test4ConstructJsonPayloadToDitto implements MapToDittoProtocolScenario { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test5DecodeBinaryToDitto.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test5DecodeBinaryToDitto.java index 082723a8b6..5a2c5f0485 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test5DecodeBinaryToDitto.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/javascript/benchmark/Test5DecodeBinaryToDitto.java @@ -25,7 +25,7 @@ import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.State; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; @State(Scope.Benchmark) public class Test5DecodeBinaryToDitto implements MapToDittoProtocolScenario { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/test/MockMapper.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/test/MockMapper.java index 2c5714ffd4..01c695fe3c 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/test/MockMapper.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/mapping/test/MockMapper.java @@ -33,7 +33,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; @AllParametersAndReturnValuesAreNonnullByDefault public final class MockMapper implements MessageMapper { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractBaseClientActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractBaseClientActorTest.java index 03515fe902..c2bf8d8307 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractBaseClientActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractBaseClientActorTest.java @@ -52,18 +52,18 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.actor.Status; -import akka.http.javadsl.Http; -import akka.http.javadsl.HttpsConnectionContext; -import akka.http.javadsl.ServerBinding; -import akka.http.javadsl.model.Uri; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.http.javadsl.Http; +import org.apache.pekko.http.javadsl.HttpsConnectionContext; +import org.apache.pekko.http.javadsl.ServerBinding; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Abstract unit test for classes that extend {@link BaseClientActor}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractConsumerActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractConsumerActorTest.java index 064f3bbbe5..65ce9c76b7 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractConsumerActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractConsumerActorTest.java @@ -36,7 +36,7 @@ import org.eclipse.ditto.connectivity.service.config.ConnectivityConfig; import org.eclipse.ditto.connectivity.service.mapping.DittoMessageMapper; import org.eclipse.ditto.edge.service.headers.DittoHeadersValidator; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.config.ScopedConfig; import org.eclipse.ditto.internal.utils.protocol.ProtocolAdapterProvider; import org.eclipse.ditto.internal.utils.tracing.DittoTracingInitResource; @@ -54,14 +54,14 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.stream.javadsl.Sink; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.concurrent.duration.FiniteDuration; public abstract class AbstractConsumerActorTest { @@ -88,7 +88,7 @@ public abstract class AbstractConsumerActorTest { @Before public void init() { - actorSystem = ActorSystem.create("AkkaTestSystem", CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", CONFIG); protocolAdapterProvider = ProtocolAdapterProvider.load(TestConstants.PROTOCOL_CONFIG, actorSystem); connectionActorProbe = TestProbe.apply("connectionActor", actorSystem); } diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractConsumerActorWithAcknowledgementsTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractConsumerActorWithAcknowledgementsTest.java index 75d0f9bcf6..a6dd16a373 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractConsumerActorWithAcknowledgementsTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractConsumerActorWithAcknowledgementsTest.java @@ -37,12 +37,12 @@ import org.eclipse.ditto.things.model.signals.commands.modify.ModifyThingResponse; import org.junit.Test; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.stream.javadsl.Sink; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Extends {@code AbstractConsumerActorTest} with acknowledgement tests. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractMessageMappingProcessorActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractMessageMappingProcessorActorTest.java index a008bb74e0..551cabd1ec 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractMessageMappingProcessorActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractMessageMappingProcessorActorTest.java @@ -56,7 +56,7 @@ import org.eclipse.ditto.connectivity.service.config.ConnectivityConfig; import org.eclipse.ditto.connectivity.service.mapping.DefaultConnectivitySignalEnrichmentProvider; import org.eclipse.ditto.edge.service.headers.DittoHeadersValidator; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.config.ScopedConfig; import org.eclipse.ditto.internal.utils.protocol.ProtocolAdapterProvider; import org.eclipse.ditto.internal.utils.tracing.DittoTracingInitResource; @@ -81,16 +81,16 @@ import com.typesafe.config.ConfigValueFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.pattern.Patterns; -import akka.stream.Materializer; -import akka.stream.OverflowStrategy; -import akka.stream.scaladsl.Source; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.OverflowStrategy; +import org.apache.pekko.stream.scaladsl.Source; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Abstract class to setup the infrastructure to test MessageMappingProcessorActor. @@ -137,7 +137,7 @@ public abstract class AbstractMessageMappingProcessorActorTest { @Before public void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem", TestConstants.CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", TestConstants.CONFIG); protocolAdapterProvider = ProtocolAdapterProvider.load(TestConstants.PROTOCOL_CONFIG, actorSystem); connectionActorProbe = TestProbe.apply("connectionActor", actorSystem); MockCommandForwarder.create(actorSystem, connectionActorProbe.ref()); @@ -173,7 +173,7 @@ static void expectPublishedMappedMessage(final BaseClientActor.PublishMappedMess void resetActorSystemWithCachingSignalEnrichmentProvider() { TestKit.shutdownActorSystem(actorSystem); - actorSystem = ActorSystem.create("AkkaTestSystemWithCachingSignalEnrichmentProvider", + actorSystem = ActorSystem.create("PekkoTestSystemWithCachingSignalEnrichmentProvider", TestConstants.CONFIG .withValue("ditto.extensions.signal-enrichment-provider.extension-class", ConfigValueFactory.fromAnyRef(DefaultConnectivitySignalEnrichmentProvider.class.getCanonicalName())) diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractPublisherActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractPublisherActorTest.java index e9c02489ab..64f79876a8 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractPublisherActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AbstractPublisherActorTest.java @@ -33,7 +33,7 @@ import org.eclipse.ditto.connectivity.model.HeaderMapping; import org.eclipse.ditto.connectivity.model.Target; import org.eclipse.ditto.connectivity.model.Topic; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.internal.utils.tracing.DittoTracingInitResource; import org.eclipse.ditto.json.JsonArray; import org.eclipse.ditto.json.JsonValue; @@ -51,11 +51,11 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; public abstract class AbstractPublisherActorTest { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AddHeaderMessageMapper.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AddHeaderMessageMapper.java index fa48264779..e924abf209 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AddHeaderMessageMapper.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AddHeaderMessageMapper.java @@ -31,7 +31,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Implementation of {@link org.eclipse.ditto.connectivity.service.mapping.MessageMapper} that delegates to diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AzSaslSigningTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AzSaslSigningTest.java index 104d894361..95c2c198c4 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AzSaslSigningTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/AzSaslSigningTest.java @@ -26,12 +26,12 @@ import org.junit.After; import org.junit.Test; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpEntities; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.headers.HttpCredentials; -import akka.stream.javadsl.Sink; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpEntities; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.headers.HttpCredentials; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link AzSaslSigning}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/BaseClientActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/BaseClientActorTest.java index c7f7751030..08f71bde07 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/BaseClientActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/BaseClientActorTest.java @@ -80,16 +80,16 @@ import com.typesafe.config.ConfigFactory; import com.typesafe.config.ConfigValueFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.CoordinatedShutdown; -import akka.actor.FSM; -import akka.actor.Props; -import akka.actor.Status; -import akka.http.javadsl.model.Uri; -import akka.http.scaladsl.model.IllegalUriException; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.CoordinatedShutdown; +import org.apache.pekko.actor.FSM; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.http.scaladsl.model.IllegalUriException; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Unit test for basic {@link BaseClientActor} functionality. @@ -113,7 +113,7 @@ public final class BaseClientActorTest { @BeforeClass public static void beforeClass() { - actorSystem = ActorSystem.create("AkkaTestSystem", TestConstants.CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", TestConstants.CONFIG); connectivityConfig = DittoConnectivityConfig.of(DefaultScopedConfig.dittoScoped(actorSystem.settings().config())); DISCONNECT_TIMEOUT = connectivityConfig.getClientConfig().getDisconnectAnnouncementTimeout() @@ -614,7 +614,7 @@ public void sendsConnectionClosedAnnouncementWhenConnectionGetsClosed() { @Test public void sendsConnectionClosedAnnouncementBeforeSystemShutdown() { final ActorSystem closableActorSystem = - ActorSystem.create("AkkaTestSystem-closableActorSystem", TestConstants.CONFIG); + ActorSystem.create("PekkoTestSystem-closableActorSystem", TestConstants.CONFIG); new TestKit(closableActorSystem) {{ final ConnectionId randomConnectionId = TestConstants.createRandomConnectionId(); final Connection connection = createConnectionWithConnectivityAnnouncementTarget(randomConnectionId); @@ -773,13 +773,13 @@ public DummyClientActor(final Connection connection, } /** - * Creates Akka configuration object for this actor. + * Creates Pekko configuration object for this actor. * * @param connection the connection. * @param connectionActor the connectionPersistenceActor which created this client. * @param proxyActor the actor used to send signals into the ditto cluster. * @param publisherActor the actor that publishes to external system - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final Connection connection, final ActorRef connectionActor, final ActorRef proxyActor, @@ -790,14 +790,14 @@ public static Props props(final Connection connection, final ActorRef connection } /** - * Creates Akka configuration object for this actor. + * Creates Pekko configuration object for this actor. * * @param connection the connection. * @param connectionActor the connectionPersistenceActor which created this client. * @param proxyActor the actor used to send signals into the ditto cluster. * @param publisherActor the actor that publishes to external system * @param config the config to pass the BaseClientActor, e.g. containing test specific overrides. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final Connection connection, final ActorRef connectionActor, final ActorRef proxyActor, diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ChildActorNannyTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ChildActorNannyTest.java index 34c26de308..05bf844fce 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ChildActorNannyTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ChildActorNannyTest.java @@ -26,10 +26,10 @@ import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; -import akka.actor.ActorRef; -import akka.actor.ActorRefFactory; -import akka.actor.Props; -import akka.event.LoggingAdapter; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.Props; +import org.apache.pekko.event.LoggingAdapter; /** * Unit test for {@link ChildActorNanny}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ConnectionIdsRetrievalActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ConnectionIdsRetrievalActorTest.java index 5f401324a6..0a0805a172 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ConnectionIdsRetrievalActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ConnectionIdsRetrievalActorTest.java @@ -40,11 +40,11 @@ import org.junit.BeforeClass; import org.junit.Test; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.stream.javadsl.Source; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link ConnectionIdsRetrievalActor}. @@ -71,7 +71,7 @@ public final class ConnectionIdsRetrievalActorTest { @BeforeClass public static void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem", TestConstants.CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", TestConstants.CONFIG); } @AfterClass diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ConnectionPersistenceActorRecoveryTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ConnectionPersistenceActorRecoveryTest.java index b363eac8eb..d12a02062a 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ConnectionPersistenceActorRecoveryTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ConnectionPersistenceActorRecoveryTest.java @@ -36,7 +36,7 @@ import org.eclipse.ditto.connectivity.model.signals.events.ConnectivityEvent; import org.eclipse.ditto.connectivity.service.config.DefaultFieldsEncryptionConfig; import org.eclipse.ditto.connectivity.service.messaging.persistence.ConnectionMongoSnapshotAdapter; -import org.eclipse.ditto.internal.utils.akka.PingCommand; +import org.eclipse.ditto.internal.utils.pekko.PingCommand; import org.eclipse.ditto.internal.utils.tracing.DittoTracingInitResource; import org.eclipse.ditto.json.JsonValue; import org.junit.AfterClass; @@ -47,16 +47,16 @@ import com.typesafe.config.ConfigValueFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.cluster.pubsub.DistributedPubSub; -import akka.japi.Creator; -import akka.persistence.AbstractPersistentActor; -import akka.persistence.RecoveryCompleted; -import akka.persistence.SnapshotMetadata; -import akka.persistence.SnapshotOffer; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.pubsub.DistributedPubSub; +import org.apache.pekko.japi.Creator; +import org.apache.pekko.persistence.AbstractPersistentActor; +import org.apache.pekko.persistence.RecoveryCompleted; +import org.apache.pekko.persistence.SnapshotMetadata; +import org.apache.pekko.persistence.SnapshotOffer; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Unit test for {@link org.eclipse.ditto.connectivity.service.messaging.persistence.ConnectionPersistenceActor}. @@ -68,8 +68,8 @@ public final class ConnectionPersistenceActorRecoveryTest extends WithMockServer DittoTracingInitResource.disableDittoTracing(); private static final String PERSISTENCE_ID_PREFIX = "connection:"; - private static final String JOURNAL_PLUGIN_ID = "akka-contrib-mongodb-persistence-connection-journal"; - private static final String SNAPSHOT_PLUGIN_ID = "akka-contrib-mongodb-persistence-connection-snapshots"; + private static final String JOURNAL_PLUGIN_ID = "pekko-contrib-mongodb-persistence-connection-journal"; + private static final String SNAPSHOT_PLUGIN_ID = "pekko-contrib-mongodb-persistence-connection-snapshots"; private static ActorSystem actorSystem; private static ActorRef pubSubMediator; @@ -84,7 +84,7 @@ public final class ConnectionPersistenceActorRecoveryTest extends WithMockServer @BeforeClass public static void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem", TestConstants.CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", TestConstants.CONFIG); pubSubMediator = DistributedPubSub.get(actorSystem).mediator(); proxyActor = actorSystem.actorOf(TestConstants.ProxyActorMock.props()); } @@ -136,21 +136,21 @@ public void testRecoveryOfDeletedConnectionsWithoutSnapshot() { @Test public void testRecoveryOfConnectionWithBlockedHost() { - final ActorSystem akkaTestSystem = - ActorSystem.create("AkkaTestSystem", TestConstants.CONFIG.withValue("ditto.connectivity.connection" + + final ActorSystem pekkoTestSystem = + ActorSystem.create("PekkoTestSystem", TestConstants.CONFIG.withValue("ditto.connectivity.connection" + ".blocked-hostnames", ConfigValueFactory.fromAnyRef("127.0.0.1"))); - final ActorRef mediator = DistributedPubSub.get(akkaTestSystem).mediator(); + final ActorRef mediator = DistributedPubSub.get(pekkoTestSystem).mediator(); final ActorRef proxyActor = actorSystem.actorOf(TestConstants.ProxyActorMock.props()); try { - new TestKit(akkaTestSystem) {{ + new TestKit(pekkoTestSystem) {{ final Queue> existingEvents = new LinkedList<>(List.of(connectionCreated)); final Props fakeProps = FakePersistenceActor.props(connectionId, getRef(), existingEvents); - akkaTestSystem.actorOf(fakeProps); + pekkoTestSystem.actorOf(fakeProps); expectMsgEquals("persisted"); - final ActorRef underTest = TestConstants.createConnectionSupervisorActor(connectionId, akkaTestSystem, + final ActorRef underTest = TestConstants.createConnectionSupervisorActor(connectionId, pekkoTestSystem, mediator, proxyActor); underTest.tell(OpenConnection.of(connectionId, DittoHeaders.empty()), getRef()); @@ -161,7 +161,7 @@ public void testRecoveryOfConnectionWithBlockedHost() { .hasMessageContaining("The configured host '127.0.0.1' may not be used for the connection"); }}; } finally { - TestKit.shutdownActorSystem(akkaTestSystem); + TestKit.shutdownActorSystem(pekkoTestSystem); } } diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ConnectivityStatusResolverTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ConnectivityStatusResolverTest.java index 075ff6dbf5..9ac71a8e67 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ConnectivityStatusResolverTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ConnectivityStatusResolverTest.java @@ -23,7 +23,7 @@ import org.junit.Before; import org.junit.Test; -import akka.actor.Status; +import org.apache.pekko.actor.Status; /** * Unit tests for {@link ConnectivityStatusResolver}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/DefaultClientActorPropsFactoryTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/DefaultClientActorPropsFactoryTest.java index 3bcd82976f..d5e4f13eb1 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/DefaultClientActorPropsFactoryTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/DefaultClientActorPropsFactoryTest.java @@ -24,7 +24,7 @@ import org.eclipse.ditto.connectivity.model.Connection; import org.eclipse.ditto.connectivity.model.ConnectionType; import org.eclipse.ditto.connectivity.model.ConnectivityModelFactory; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.internal.utils.config.ScopedConfig; import org.eclipse.ditto.internal.utils.tracing.DittoTracingInitResource; import org.junit.Before; @@ -34,11 +34,11 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.remote.DaemonMsgCreate; -import akka.serialization.Serialization; -import akka.serialization.SerializationExtension; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.remote.DaemonMsgCreate; +import org.apache.pekko.serialization.Serialization; +import org.apache.pekko.serialization.SerializationExtension; /** * Unit tests for {@link DefaultClientActorPropsFactory}. @@ -144,9 +144,9 @@ private Object serializeAndDeserialize(final Object objectToSerialize) { } /** - * Wrap Props in an object with a reasonable Akka serializer, namely one that applies our configured - * serializer on each argument of Props. For Akka 2.5.13, that object belongs to the Akka-internal class - * DaemonMsgCreate. The class may change in future versions of Akka. + * Wrap Props in an object with a reasonable Pekko serializer, namely one that applies our configured + * serializer on each argument of Props. For Pekko 2.5.13, that object belongs to the Pekko-internal class + * DaemonMsgCreate. The class may change in future versions of Pekko. */ private Object wrapForSerialization(final Props props) { final String actorClassNameAsPath = props.actorClass().getSimpleName(); diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/DroppingMessageMapper.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/DroppingMessageMapper.java index 86e914a6e7..db8df735f9 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/DroppingMessageMapper.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/DroppingMessageMapper.java @@ -28,7 +28,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Implementation of {@link org.eclipse.ditto.connectivity.service.mapping.MessageMapper} that always drops. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/DuplicatingMessageMapper.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/DuplicatingMessageMapper.java index 062ec47672..47bc439348 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/DuplicatingMessageMapper.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/DuplicatingMessageMapper.java @@ -31,7 +31,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Implementation of {@link org.eclipse.ditto.connectivity.service.mapping.MessageMapper} that always duplicates the incoming message. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ErrorHandlingActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ErrorHandlingActorTest.java index d40dd99cad..610b1d39cf 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ErrorHandlingActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ErrorHandlingActorTest.java @@ -36,10 +36,10 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.cluster.pubsub.DistributedPubSub; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.cluster.pubsub.DistributedPubSub; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests error handling behaviour of {@link org.eclipse.ditto.connectivity.service.messaging.persistence.ConnectionPersistenceActor}. @@ -57,7 +57,7 @@ public class ErrorHandlingActorTest extends WithMockServers { private static Duration DISCONNECT_TIMEOUT; public void setUp(final boolean allowFirstCreateCommand, final boolean allowCloseCommands) { - actorSystem = ActorSystem.create("AkkaTestSystem", ConfigFactory.parseMap( + actorSystem = ActorSystem.create("PekkoTestSystem", ConfigFactory.parseMap( Map.of("ditto.extensions.client-actor-props-factory", "org.eclipse.ditto.connectivity.service.messaging.FaultyClientActorPropsFactory", "allowFirstCreateCommand", allowFirstCreateCommand, "allowCloseCommands", diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/FaultyClientActor.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/FaultyClientActor.java index 458cfa4246..abf84525b4 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/FaultyClientActor.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/FaultyClientActor.java @@ -16,12 +16,12 @@ import org.eclipse.ditto.connectivity.model.signals.commands.modify.CreateConnection; import org.eclipse.ditto.connectivity.model.signals.commands.modify.DeleteConnection; import org.eclipse.ditto.connectivity.model.signals.commands.modify.OpenConnection; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; -import akka.actor.AbstractActor; -import akka.actor.Props; -import akka.actor.Status; -import akka.event.DiagnosticLoggingAdapter; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.event.DiagnosticLoggingAdapter; /** * A ClientActor implementation that fails for every command received and answers with an exception. If {@code diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/FaultyClientActorPropsFactory.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/FaultyClientActorPropsFactory.java index 9b13fb1f96..c970706b04 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/FaultyClientActorPropsFactory.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/FaultyClientActorPropsFactory.java @@ -17,9 +17,9 @@ import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; @SuppressWarnings("unused") public final class FaultyClientActorPropsFactory implements ClientActorPropsFactory { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/FaultyMessageMapper.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/FaultyMessageMapper.java index 716af9adba..ebf50a33c9 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/FaultyMessageMapper.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/FaultyMessageMapper.java @@ -28,7 +28,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Implementation of {@link org.eclipse.ditto.connectivity.service.mapping.MessageMapper} that always throws an exception. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingProcessorActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingProcessorActorTest.java index a6ce9dd275..6f1390faf0 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingProcessorActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingProcessorActorTest.java @@ -31,8 +31,8 @@ import org.eclipse.ditto.connectivity.service.mapping.MessageMapperRegistry; import org.eclipse.ditto.connectivity.service.messaging.mappingoutcome.MappingOutcome; import org.eclipse.ditto.edge.service.headers.DittoHeadersValidator; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.tracing.DittoTracingInitResource; import org.eclipse.ditto.protocol.TopicPath; import org.eclipse.ditto.protocol.adapter.ProtocolAdapter; @@ -43,15 +43,15 @@ import com.typesafe.config.Config; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.dispatch.MessageDispatcher; -import akka.stream.OverflowStrategy; -import akka.stream.javadsl.Sink; -import akka.stream.scaladsl.Source; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.dispatch.MessageDispatcher; +import org.apache.pekko.stream.OverflowStrategy; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.scaladsl.Source; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; public final class InboundMappingProcessorActorTest { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingProcessorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingProcessorTest.java index 16dd806910..40b9285a44 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingProcessorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/InboundMappingProcessorTest.java @@ -34,8 +34,8 @@ import org.eclipse.ditto.connectivity.service.mapping.DittoMessageMapper; import org.eclipse.ditto.connectivity.service.mapping.MessageMapperConfiguration; import org.eclipse.ditto.connectivity.service.messaging.mappingoutcome.MappingOutcome; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.protocol.DittoProtocolAdapterProvider; import org.eclipse.ditto.internal.utils.protocol.ProtocolAdapterProvider; import org.eclipse.ditto.internal.utils.protocol.config.ProtocolConfig; @@ -49,7 +49,7 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mockito; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link InboundMappingProcessor}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MappingSinksTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MappingSinksTest.java index 9497cc45df..57fe4cc5f8 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MappingSinksTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MappingSinksTest.java @@ -33,7 +33,7 @@ import org.eclipse.ditto.connectivity.service.config.mapping.DefaultMappingConfig; import org.eclipse.ditto.connectivity.service.config.mapping.MappingConfig; import org.eclipse.ditto.connectivity.service.messaging.mappingoutcome.MappingOutcome; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.internal.utils.protocol.DittoProtocolAdapterProvider; import org.eclipse.ditto.internal.utils.protocol.config.DefaultProtocolConfig; import org.eclipse.ditto.internal.utils.tracing.DittoTracingInitResource; @@ -50,12 +50,12 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.dispatch.MessageDispatcher; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.testkit.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.dispatch.MessageDispatcher; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.TestKit; import scala.concurrent.duration.FiniteDuration; /** diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MessageMappingProcessorActorHeaderInteractionTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MessageMappingProcessorActorHeaderInteractionTest.java index 36fac59512..389d88437c 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MessageMappingProcessorActorHeaderInteractionTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MessageMappingProcessorActorHeaderInteractionTest.java @@ -34,9 +34,9 @@ import org.junit.runner.RunWith; import org.junit.runners.Parameterized; -import akka.actor.ActorRef; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.concurrent.duration.FiniteDuration; /** diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MessageMappingProcessorActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MessageMappingProcessorActorTest.java index 8d434ca9c3..f5d47d6281 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MessageMappingProcessorActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MessageMappingProcessorActorTest.java @@ -80,9 +80,9 @@ import org.eclipse.ditto.thingsearch.model.signals.commands.subscription.CreateSubscription; import org.junit.Test; -import akka.actor.ActorRef; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link InboundMappingSink} and {@link OutboundMappingProcessorActor}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MockActor.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MockActor.java index 2a06aaee56..d7d8fd6362 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MockActor.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MockActor.java @@ -14,14 +14,14 @@ import java.time.Duration; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; - -import akka.actor.AbstractActor; -import akka.actor.ActorRefFactory; -import akka.actor.Props; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; + +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; /** * Mock actor that live for an instant to deliver information available only to actors. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MockClientActorPropsFactory.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MockClientActorPropsFactory.java index 356c9feb02..71f0c02d8b 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MockClientActorPropsFactory.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MockClientActorPropsFactory.java @@ -19,16 +19,16 @@ import org.eclipse.ditto.base.model.headers.WithDittoHeaders; import org.eclipse.ditto.connectivity.model.Connection; import org.eclipse.ditto.connectivity.model.ConnectionConfigurationInvalidException; -import org.eclipse.ditto.internal.utils.akka.controlflow.WithSender; +import org.eclipse.ditto.internal.utils.pekko.controlflow.WithSender; import com.typesafe.config.Config; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.japi.pf.ReceiveBuilder; -import akka.testkit.TestProbe; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.testkit.TestProbe; public final class MockClientActorPropsFactory implements ClientActorPropsFactory { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MockCommandForwarder.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MockCommandForwarder.java index e86792ff60..07f19a1601 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MockCommandForwarder.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MockCommandForwarder.java @@ -14,11 +14,11 @@ import org.eclipse.ditto.edge.service.dispatching.EdgeCommandForwarderActor; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Mock actor that forwards all messages to the final ActorRef message. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MockCommandValidator.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MockCommandValidator.java index 428dca8b21..182b2be09f 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MockCommandValidator.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/MockCommandValidator.java @@ -23,7 +23,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; public class MockCommandValidator implements CustomConnectivityCommandInterceptorProvider { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/OutboundDispatchingActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/OutboundDispatchingActorTest.java index fa3d13ab2f..4c16858cdf 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/OutboundDispatchingActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/OutboundDispatchingActorTest.java @@ -44,11 +44,11 @@ import org.junit.Before; import org.junit.Test; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link OutboundDispatchingActor}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingProcessorActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingProcessorActorTest.java index 3ec16166e1..f083002c09 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingProcessorActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingProcessorActorTest.java @@ -39,7 +39,7 @@ import org.eclipse.ditto.connectivity.model.Source; import org.eclipse.ditto.connectivity.model.Target; import org.eclipse.ditto.connectivity.model.Topic; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.internal.utils.protocol.ProtocolAdapterProvider; import org.eclipse.ditto.internal.utils.tracing.DittoTracingInitResource; import org.eclipse.ditto.json.JsonObject; @@ -58,10 +58,10 @@ import org.junit.Test; import org.junit.runners.MethodSorters; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests in addition to {@link MessageMappingProcessorActorTest} diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingProcessorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingProcessorTest.java index 5042dea125..e8bc29ffc5 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingProcessorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/OutboundMappingProcessorTest.java @@ -49,8 +49,8 @@ import org.eclipse.ditto.connectivity.service.mapping.DittoMessageMapper; import org.eclipse.ditto.connectivity.service.mapping.MessageMapperConfiguration; import org.eclipse.ditto.connectivity.service.messaging.mappingoutcome.MappingOutcome; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.protocol.DittoProtocolAdapterProvider; import org.eclipse.ditto.internal.utils.protocol.ProtocolAdapterProvider; import org.eclipse.ditto.internal.utils.protocol.config.ProtocolConfig; @@ -74,7 +74,7 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mockito; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link OutboundMappingProcessor}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ResponseCollectorActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ResponseCollectorActorTest.java index ea854d5f3d..7fc4938625 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ResponseCollectorActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ResponseCollectorActorTest.java @@ -29,10 +29,10 @@ import org.junit.Before; import org.junit.Test; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.ReceiveTimeout; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ReceiveTimeout; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link ResponseCollectorActor}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/SendingTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/SendingTest.java index b8b7e7f6e7..290e94652f 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/SendingTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/SendingTest.java @@ -38,7 +38,7 @@ import org.eclipse.ditto.connectivity.model.MessageSendingFailedException; import org.eclipse.ditto.connectivity.model.Target; import org.eclipse.ditto.connectivity.service.messaging.monitoring.ConnectionMonitor; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.json.JsonObject; import org.eclipse.ditto.placeholders.ExpressionResolver; import org.eclipse.ditto.things.model.ThingId; diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/TestConstants.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/TestConstants.java index da6dcfb5ea..7d54c8ef84 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/TestConstants.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/TestConstants.java @@ -105,8 +105,8 @@ import org.eclipse.ditto.connectivity.service.messaging.monitoring.ConnectionMonitorRegistry; import org.eclipse.ditto.connectivity.service.messaging.monitoring.metrics.ConnectivityCounterRegistry; import org.eclipse.ditto.connectivity.service.messaging.persistence.ConnectionSupervisorActor; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; import org.eclipse.ditto.internal.utils.config.ScopedConfig; @@ -141,16 +141,16 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.InvalidActorNameException; -import akka.actor.PoisonPill; -import akka.actor.Props; -import akka.cluster.sharding.ShardRegion; -import akka.event.DiagnosticLoggingAdapter; -import akka.pattern.Patterns; -import akka.testkit.TestProbe; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.InvalidActorNameException; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.sharding.ShardRegion; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.testkit.TestProbe; public final class TestConstants { @@ -203,7 +203,7 @@ public final class TestConstants { * Disable logging for 1 test to hide stacktrace or other logs on level ERROR. Comment out to debug the test. */ public static void disableLogging(final ActorSystem system) { - system.eventStream().setLogLevel(akka.stream.Attributes.logLevelOff()); + system.eventStream().setLogLevel(org.apache.pekko.stream.Attributes.logLevelOff()); } public static final HeaderMapping HEADER_MAPPING; diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ThrowingMapper.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ThrowingMapper.java index 3b949ea82d..4fc59660e5 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ThrowingMapper.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/ThrowingMapper.java @@ -25,7 +25,7 @@ import org.eclipse.ditto.connectivity.service.mapping.MessageMapperConfiguration; import org.eclipse.ditto.protocol.Adaptable; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; final class ThrowingMapper implements MessageMapper { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpClientActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpClientActorTest.java index 6ec2a05b16..1c1144a051 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpClientActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpClientActorTest.java @@ -122,15 +122,15 @@ import org.mockito.junit.MockitoJUnitRunner; import org.mockito.stubbing.Answer; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.FSM; -import akka.actor.Props; -import akka.actor.Status; -import akka.pattern.AskTimeoutException; -import akka.testkit.TestActorRef; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.FSM; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.pattern.AskTimeoutException; +import org.apache.pekko.testkit.TestActorRef; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; // Silencing "unnecessary stubbing" - it happens only on Travis? @RunWith(MockitoJUnitRunner.Silent.class) @@ -162,7 +162,7 @@ public final class AmqpClientActorTest extends AbstractBaseClientActorTest { @Before public void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem", TestConstants.CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", TestConstants.CONFIG); connection = TestConstants.createConnection(CONNECTION_ID) .toBuilder() .connectionStatus(ConnectivityStatus.CLOSED) diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpConsumerActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpConsumerActorTest.java index 22331b78b7..71788ff9f7 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpConsumerActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpConsumerActorTest.java @@ -80,7 +80,7 @@ import org.eclipse.ditto.connectivity.service.messaging.internal.ConnectionFailure; import org.eclipse.ditto.connectivity.service.messaging.internal.RetrieveAddressStatus; import org.eclipse.ditto.edge.service.headers.DittoHeadersValidator; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.config.ScopedConfig; import org.eclipse.ditto.json.JsonPointer; import org.eclipse.ditto.json.JsonValue; @@ -92,15 +92,15 @@ import org.junit.Test; import org.mockito.Mockito; -import akka.Done; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.stream.javadsl.Sink; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests the AMQP {@link AmqpConsumerActor}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpPublisherActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpPublisherActorTest.java index ce981ddaf3..b124d6dfb6 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpPublisherActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpPublisherActorTest.java @@ -82,11 +82,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.Status; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; public final class AmqpPublisherActorTest extends AbstractPublisherActorTest { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/JmsConnectionHandlingActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/JmsConnectionHandlingActorTest.java index 6d1ee46ef3..8b6d57a64e 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/JmsConnectionHandlingActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/JmsConnectionHandlingActorTest.java @@ -46,11 +46,11 @@ import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests the {@link JMSConnectionHandlingActor}. @@ -70,7 +70,7 @@ public class JmsConnectionHandlingActorTest extends WithMockServers { @BeforeClass public static void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem", TestConstants.CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", TestConstants.CONFIG); connection = TestConstants.createConnection(connectionId); } diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/SaslPlainCredentialsSupplierTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/SaslPlainCredentialsSupplierTest.java index 3723e0b932..9ec7ff6180 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/SaslPlainCredentialsSupplierTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/amqp/SaslPlainCredentialsSupplierTest.java @@ -36,7 +36,7 @@ import org.junit.BeforeClass; import org.junit.Test; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Unit test for {@link SaslPlainCredentialsSupplier}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/backoff/BackOffActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/backoff/BackOffActorTest.java index 58dc4bdd97..1d7fcea55b 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/backoff/BackOffActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/backoff/BackOffActorTest.java @@ -26,9 +26,9 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Unit test for {@link BackOffActor}. @@ -44,7 +44,7 @@ public final class BackOffActorTest { @BeforeClass public static void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem", CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", CONFIG); } @AfterClass diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/hono/DefaultHonoConnectionFactoryTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/hono/DefaultHonoConnectionFactoryTest.java index d2b7344b44..ad875b8b87 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/hono/DefaultHonoConnectionFactoryTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/hono/DefaultHonoConnectionFactoryTest.java @@ -37,7 +37,7 @@ import org.eclipse.ditto.connectivity.model.Source; import org.eclipse.ditto.connectivity.service.config.DefaultHonoConfig; import org.eclipse.ditto.connectivity.service.config.HonoConfig; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.json.JsonFactory; import org.junit.Before; import org.junit.Rule; diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/hono/HonoValidatorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/hono/HonoValidatorTest.java index 185f590395..7d76ccae04 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/hono/HonoValidatorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/hono/HonoValidatorTest.java @@ -35,7 +35,7 @@ import org.eclipse.ditto.connectivity.model.Topic; import org.eclipse.ditto.connectivity.service.config.ConnectivityConfig; import org.eclipse.ditto.connectivity.service.messaging.TestConstants; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.placeholders.UnresolvedPlaceholderException; import org.junit.Before; import org.junit.ClassRule; diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AsyncJwtLoaderTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AsyncJwtLoaderTest.java index 4a03f5d1ff..9211e06449 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AsyncJwtLoaderTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AsyncJwtLoaderTest.java @@ -33,10 +33,10 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpEntities; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpEntities; +import org.apache.pekko.testkit.javadsl.TestKit; public class AsyncJwtLoaderTest { @@ -49,7 +49,7 @@ public class AsyncJwtLoaderTest { @BeforeClass public static void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem"); + actorSystem = ActorSystem.create("PekkoTestSystem"); } @AfterClass diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AwsRequestSigningTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AwsRequestSigningTest.java index 2b85f07a69..0868c8a206 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AwsRequestSigningTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AwsRequestSigningTest.java @@ -23,18 +23,18 @@ import org.junit.After; import org.junit.Test; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.ContentType; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpEntities; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.RequestEntity; -import akka.http.javadsl.model.Uri; -import akka.http.javadsl.model.headers.HttpCredentials; -import akka.stream.javadsl.Sink; -import akka.testkit.javadsl.TestKit; -import akka.util.ByteString; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.ContentType; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpEntities; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.RequestEntity; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.http.javadsl.model.headers.HttpCredentials; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.testkit.javadsl.TestKit; +import org.apache.pekko.util.ByteString; /** * Test cases for AWS request signing. @@ -143,7 +143,7 @@ public void testCanonicalQueryWithParameterWithoutValue() { @Test public void testCanonicalHeaders() { - // lower-case charset does not work; Akka HTTP always sends the charset in upper case. + // lower-case charset does not work; Pekko HTTP always sends the charset in upper case. final ContentType contentType = ContentTypes.parse("application/x-www-form-urlencoded; charset=UTF-8"); final RequestEntity body = HttpEntities.create(contentType, new byte[0]); final List headersInSequence = List.of( diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AzMonitorRequestSigningTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AzMonitorRequestSigningTest.java index 8bc4277cdd..073a5248f1 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AzMonitorRequestSigningTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AzMonitorRequestSigningTest.java @@ -20,14 +20,14 @@ import org.junit.After; import org.junit.Test; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpEntities; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.headers.HttpCredentials; -import akka.stream.javadsl.Sink; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpEntities; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.headers.HttpCredentials; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link org.eclipse.ditto.connectivity.service.messaging.httppush.AzMonitorRequestSigning}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AzSaslSigningFactoryTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AzSaslSigningFactoryTest.java index d64e600315..79a49068ae 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AzSaslSigningFactoryTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/AzSaslSigningFactoryTest.java @@ -21,8 +21,8 @@ import org.junit.Before; import org.junit.Test; -import akka.actor.ActorSystem; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link AzSaslSigningFactory}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/ClientCredentialsFlowTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/ClientCredentialsFlowTest.java index f9dde73fec..57df76a173 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/ClientCredentialsFlowTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/ClientCredentialsFlowTest.java @@ -44,17 +44,17 @@ import com.github.benmanes.caffeine.cache.AsyncCacheLoader; import com.typesafe.config.ConfigFactory; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpMethods; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.japi.Pair; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpMethods; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.util.Try; /** @@ -74,7 +74,7 @@ public final class ClientCredentialsFlowTest { @BeforeClass public static void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem"); + actorSystem = ActorSystem.create("PekkoTestSystem"); } @Before diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPublisherActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPublisherActorTest.java index 4040777d42..a68a7c3fdf 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPublisherActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPublisherActorTest.java @@ -72,26 +72,26 @@ import org.eclipse.ditto.things.model.signals.commands.query.RetrieveThingResponse; import org.junit.Test; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.event.LoggingAdapter; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpEntity; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpMethod; -import akka.http.javadsl.model.HttpMethods; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.Uri; -import akka.japi.Pair; -import akka.stream.Attributes; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Sink; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; -import akka.util.ByteString; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.event.LoggingAdapter; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpEntity; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpMethod; +import org.apache.pekko.http.javadsl.model.HttpMethods; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; +import org.apache.pekko.util.ByteString; import scala.util.Try; /** @@ -1040,8 +1040,8 @@ private HttpPushFactory mockHttpPushFactory(final String contentType, final Http return HttpResponse.create() .withStatus(httpStatus.getCode()) .addHeader(HttpHeader.parse(CUSTOM_HEADER_NAME, CUSTOM_HEADER_VALUE)) - .withEntity(new akka.http.scaladsl.model.HttpEntity.Strict( - (akka.http.scaladsl.model.ContentType) ContentTypes.parse(contentType), + .withEntity(new org.apache.pekko.http.scaladsl.model.HttpEntity.Strict( + (org.apache.pekko.http.scaladsl.model.ContentType) ContentTypes.parse(contentType), ByteString.fromString(body) )); }); diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPublisherErrorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPublisherErrorTest.java index 9a88bf5bdd..dc0b6d338a 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPublisherErrorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPublisherErrorTest.java @@ -60,17 +60,17 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.http.javadsl.Http; -import akka.http.javadsl.ServerBinding; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.stream.KillSwitches; -import akka.stream.javadsl.Flow; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.http.javadsl.Http; +import org.apache.pekko.http.javadsl.ServerBinding; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests error handling of {@link HttpPublisherActor} against {@link HttpPushFactory}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushClientActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushClientActorTest.java index 1b68b7ca61..08d52eafee 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushClientActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushClientActorTest.java @@ -39,7 +39,7 @@ import org.eclipse.ditto.connectivity.service.messaging.TestConstants; import org.eclipse.ditto.connectivity.service.messaging.internal.ssl.SSLContextCreator; import org.eclipse.ditto.connectivity.service.messaging.monitoring.logs.ConnectionLogger; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.json.JsonObject; import org.eclipse.ditto.protocol.ProtocolFactory; import org.eclipse.ditto.protocol.adapter.DittoProtocolAdapter; @@ -56,25 +56,25 @@ import com.typesafe.config.ConfigFactory; import com.typesafe.config.ConfigValueFactory; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.actor.Status; -import akka.http.javadsl.ConnectionContext; -import akka.http.javadsl.Http; -import akka.http.javadsl.HttpsConnectionContext; -import akka.http.javadsl.ServerBinding; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpMethods; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.StatusCodes; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Flow; -import akka.testkit.javadsl.TestKit; -import akka.util.ByteString; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.http.javadsl.ConnectionContext; +import org.apache.pekko.http.javadsl.Http; +import org.apache.pekko.http.javadsl.HttpsConnectionContext; +import org.apache.pekko.http.javadsl.ServerBinding; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpMethods; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.testkit.javadsl.TestKit; +import org.apache.pekko.util.ByteString; /** * Tests {@link HttpPushClientActor}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushFactoryTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushFactoryTest.java index 38d3e8e937..7517bda751 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushFactoryTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushFactoryTest.java @@ -54,26 +54,26 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.http.impl.engine.client.ProxyConnectionFailedException; -import akka.http.javadsl.Http; -import akka.http.javadsl.ServerBinding; -import akka.http.javadsl.model.HttpMethods; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.model.headers.Authorization; -import akka.japi.Pair; -import akka.stream.KillSwitches; -import akka.stream.OverflowStrategy; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.SinkQueueWithCancel; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.SourceQueueWithComplete; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.impl.engine.client.ProxyConnectionFailedException; +import org.apache.pekko.http.javadsl.Http; +import org.apache.pekko.http.javadsl.ServerBinding; +import org.apache.pekko.http.javadsl.model.HttpMethods; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.model.headers.Authorization; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.OverflowStrategy; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.SinkQueueWithCancel; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.SourceQueueWithComplete; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.util.Failure; import scala.util.Try; @@ -197,8 +197,8 @@ public List getOmitRequestBodyMethods() { // WHEN: request is made sourceQueue.offer(request); - // THEN: CONNECT request is made to the Akka HTTP test server. - // THEN: Akka HTTP server rejects CONNECT request, creating a failed response + // THEN: CONNECT request is made to the Pekko HTTP test server. + // THEN: Pekko HTTP server rejects CONNECT request, creating a failed response final Optional> optionalTryResponse = sinkQueue.pull().toCompletableFuture().join(); assertThat(optionalTryResponse).isNotEmpty(); final Try tryResponse = optionalTryResponse.get(); @@ -234,7 +234,7 @@ public void handleFailure() throws Exception { assertThat(responseOrError1.get().status()).isEqualTo(response1.status()); // WHEN: In-flight request is killed - // THEN: Akka HTTP responds with status 500 + // THEN: Pekko HTTP responds with status 500 responseQueue.offer(new CompletableFuture<>()); sourceQueue.offer(request2); assertThat(requestQueue.take().getUri()).isEqualTo(request2.getUri()); diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushValidatorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushValidatorTest.java index a998e0b7be..b6df9da293 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushValidatorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushValidatorTest.java @@ -43,8 +43,8 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Unit test for {@link HttpPushValidator}. @@ -62,7 +62,7 @@ public final class HttpPushValidatorTest { public static void initTestFixture() { defaultSpecificConfig = new HashMap<>(); defaultSpecificConfig.put("parallelism", "1"); - actorSystem = ActorSystem.create("AkkaTestSystem", TestConstants.CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", TestConstants.CONFIG); connectivityConfig = TestConstants.CONNECTIVITY_CONFIG; } diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpTestDittoProtocolHelper.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpTestDittoProtocolHelper.java index 9692caa0c6..aabd10deb3 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpTestDittoProtocolHelper.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpTestDittoProtocolHelper.java @@ -26,7 +26,7 @@ import org.eclipse.ditto.protocol.ProtocolFactory; import org.eclipse.ditto.protocol.adapter.DittoProtocolAdapter; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; final class HttpTestDittoProtocolHelper { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/TokenFlowFactory.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/TokenFlowFactory.java index 9d95948a0e..7ff321a71d 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/TokenFlowFactory.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/TokenFlowFactory.java @@ -20,13 +20,13 @@ import org.eclipse.ditto.base.model.common.HttpStatus; import org.eclipse.ditto.connectivity.model.OAuthClientCredentials; -import akka.NotUsed; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpEntities; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.RequestEntity; -import akka.stream.javadsl.Flow; +import org.apache.pekko.NotUsed; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpEntities; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.RequestEntity; +import org.apache.pekko.stream.javadsl.Flow; import scala.util.Try; /** diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtLeastOnceConsumerStreamTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtLeastOnceConsumerStreamTest.java index 5d15a72c3f..dd85104eff 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtLeastOnceConsumerStreamTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtLeastOnceConsumerStreamTest.java @@ -40,20 +40,20 @@ import org.junit.Test; import org.mockito.ArgumentMatchers; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.japi.Pair; -import akka.kafka.CommitterSettings; -import akka.kafka.ConsumerMessage; -import akka.kafka.javadsl.Consumer; -import akka.stream.BoundedSourceQueue; -import akka.stream.Materializer; -import akka.stream.QueueOfferResult; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.stream.testkit.TestSubscriber; -import akka.stream.testkit.javadsl.TestSink; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.kafka.CommitterSettings; +import org.apache.pekko.kafka.ConsumerMessage; +import org.apache.pekko.kafka.javadsl.Consumer; +import org.apache.pekko.stream.BoundedSourceQueue; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.QueueOfferResult; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.testkit.TestSubscriber; +import org.apache.pekko.stream.testkit.javadsl.TestSink; +import org.apache.pekko.testkit.javadsl.TestKit; public final class AtLeastOnceConsumerStreamTest { @@ -66,7 +66,7 @@ public final class AtLeastOnceConsumerStreamTest { @Before public void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem"); + actorSystem = ActorSystem.create("PekkoTestSystem"); final Consumer.Control control = mock(Consumer.Control.class); source = Source.>queue(1) .mapMaterializedValue(queue -> { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtMostOnceConsumerStreamTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtMostOnceConsumerStreamTest.java index 8b6a3127a1..536ddd89cc 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtMostOnceConsumerStreamTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/AtMostOnceConsumerStreamTest.java @@ -40,18 +40,18 @@ import org.junit.Test; import org.mockito.ArgumentMatchers; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.japi.Pair; -import akka.kafka.javadsl.Consumer; -import akka.stream.BoundedSourceQueue; -import akka.stream.Materializer; -import akka.stream.QueueOfferResult; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.stream.testkit.TestSubscriber; -import akka.stream.testkit.javadsl.TestSink; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.kafka.javadsl.Consumer; +import org.apache.pekko.stream.BoundedSourceQueue; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.QueueOfferResult; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.testkit.TestSubscriber; +import org.apache.pekko.stream.testkit.javadsl.TestSink; +import org.apache.pekko.testkit.javadsl.TestKit; public final class AtMostOnceConsumerStreamTest { @@ -64,7 +64,7 @@ public final class AtMostOnceConsumerStreamTest { @Before public void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem"); + actorSystem = ActorSystem.create("PekkoTestSystem"); final Consumer.Control control = mock(Consumer.Control.class); source = Source.>queue(1) .mapMaterializedValue(queue -> { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/CommittableTransformationResultTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/CommittableTransformationResultTest.java index 300be398a6..2b899d4f41 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/CommittableTransformationResultTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/CommittableTransformationResultTest.java @@ -20,7 +20,7 @@ import org.junit.Test; -import akka.kafka.ConsumerMessage; +import org.apache.pekko.kafka.ConsumerMessage; import nl.jqno.equalsverifier.EqualsVerifier; diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaClientActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaClientActorTest.java index 62aad3510d..ea36b9aff1 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaClientActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaClientActorTest.java @@ -53,14 +53,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.Done; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.actor.Status; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.Done; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.concurrent.duration.FiniteDuration; /** @@ -91,7 +91,7 @@ public final class KafkaClientActorTest extends AbstractBaseClientActorTest { @BeforeClass public static void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem", TestConstants.CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", TestConstants.CONFIG); startMockServer(); } diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerActorTest.java index f6f04af2ef..fb2caafa72 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaConsumerActorTest.java @@ -46,18 +46,18 @@ import org.junit.Before; import org.junit.Test; -import akka.Done; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.japi.Pair; -import akka.kafka.javadsl.Consumer; -import akka.stream.BoundedSourceQueue; -import akka.stream.Materializer; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.kafka.javadsl.Consumer; +import org.apache.pekko.stream.BoundedSourceQueue; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@code KafkaConsumerActor}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaPublisherActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaPublisherActorTest.java index e755cf2658..a41ff3266a 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaPublisherActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaPublisherActorTest.java @@ -68,11 +68,11 @@ import org.eclipse.ditto.things.model.signals.events.ThingEvent; import org.junit.Test; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.Status; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.concurrent.duration.FiniteDuration; /** diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaValidatorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaValidatorTest.java index 5855b324b6..93e0af2e66 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaValidatorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/KafkaValidatorTest.java @@ -38,8 +38,8 @@ import org.junit.BeforeClass; import org.junit.Test; -import akka.actor.ActorSystem; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Unit test for {@link KafkaValidator}. @@ -57,7 +57,7 @@ public final class KafkaValidatorTest { public static void initTestFixture() { defaultSpecificConfig = new HashMap<>(); defaultSpecificConfig.put("bootstrapServers", "localhost:1883"); - actorSystem = ActorSystem.create("AkkaTestSystem", TestConstants.CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", TestConstants.CONFIG); connectivityConfig = TestConstants.CONNECTIVITY_CONFIG; } diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/MockSendProducerFactory.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/MockSendProducerFactory.java index 949b8db27c..efaa560f43 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/MockSendProducerFactory.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/MockSendProducerFactory.java @@ -28,9 +28,9 @@ import org.apache.kafka.clients.producer.RecordMetadata; import org.apache.kafka.common.TopicPartition; -import akka.kafka.ProducerMessage; -import akka.kafka.javadsl.SendProducer; -import akka.kafka.testkit.ProducerResultFactory; +import org.apache.pekko.kafka.ProducerMessage; +import org.apache.pekko.kafka.javadsl.SendProducer; +import org.apache.pekko.kafka.testkit.ProducerResultFactory; /** * Creates mock {@code SendProducer}s. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/PropertiesFactoryTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/PropertiesFactoryTest.java index d7316c4ba7..5ff580c7fe 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/PropertiesFactoryTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/PropertiesFactoryTest.java @@ -37,8 +37,8 @@ import org.junit.BeforeClass; import org.junit.Test; -import akka.kafka.ConsumerSettings; -import akka.kafka.ProducerSettings; +import org.apache.pekko.kafka.ConsumerSettings; +import org.apache.pekko.kafka.ProducerSettings; /** * Unit test for {@link PropertiesFactory}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/RestartableKafkaConsumerStreamTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/RestartableKafkaConsumerStreamTest.java index f89a1c1136..a2499d9653 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/RestartableKafkaConsumerStreamTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/kafka/RestartableKafkaConsumerStreamTest.java @@ -29,7 +29,7 @@ import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; -import akka.Done; +import org.apache.pekko.Done; @RunWith(MockitoJUnitRunner.class) public final class RestartableKafkaConsumerStreamTest { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/RetrieveConnectionLogsAggregatorActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/RetrieveConnectionLogsAggregatorActorTest.java index 2e428a4d5f..f356db427c 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/RetrieveConnectionLogsAggregatorActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/monitoring/logs/RetrieveConnectionLogsAggregatorActorTest.java @@ -44,10 +44,10 @@ import org.junit.BeforeClass; import org.junit.Test; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.concurrent.duration.FiniteDuration; /** @@ -63,7 +63,7 @@ public final class RetrieveConnectionLogsAggregatorActorTest { @BeforeClass public static void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem", TestConstants.CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", TestConstants.CONFIG); } @AfterClass diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/AbstractMqttValidatorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/AbstractMqttValidatorTest.java index 8e237455b7..611cc1a663 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/AbstractMqttValidatorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/AbstractMqttValidatorTest.java @@ -34,8 +34,8 @@ import org.junit.AfterClass; import org.junit.BeforeClass; -import akka.actor.ActorSystem; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Base class for MqttValidator tests. @@ -49,7 +49,7 @@ abstract class AbstractMqttValidatorTest { @BeforeClass public static void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem", TestConstants.CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", TestConstants.CONFIG); connectivityConfig = TestConstants.CONNECTIVITY_CONFIG; } diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/ConnectionTesterActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/ConnectionTesterActorTest.java index c74059c282..3b7a82006b 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/ConnectionTesterActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/ConnectionTesterActorTest.java @@ -50,7 +50,7 @@ import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.subscribing.MqttSubscriber; import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.subscribing.SubscribeResult; import org.eclipse.ditto.connectivity.service.messaging.tunnel.SshTunnelState; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.internal.utils.health.RetrieveHealth; import org.eclipse.ditto.internal.utils.health.RetrieveHealthResponse; import org.eclipse.ditto.internal.utils.health.StatusInfo; @@ -66,10 +66,10 @@ import com.hivemq.client.mqtt.mqtt3.message.subscribe.suback.Mqtt3SubAckReturnCode; import com.hivemq.client.mqtt.mqtt5.message.subscribe.suback.Mqtt5SubAckReasonCode; -import akka.actor.Props; -import akka.actor.Status; -import akka.pattern.AskTimeoutException; -import akka.testkit.TestActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.pattern.AskTimeoutException; +import org.apache.pekko.testkit.TestActorRef; /** * Unit test for {@link ConnectionTesterActor}. @@ -178,7 +178,7 @@ public void testConnectionWorksAsExpectedIfSuccessful() { final var childActorNanny = Mockito.mock(ChildActorNanny.class); final var mqttSubscriber = Mockito.mock(MqttSubscriber.class); Mockito.when(mqttSubscriber.subscribeForConnectionSources(Mockito.any())) - .thenReturn(akka.stream.javadsl.Source.fromJavaStream(() -> Stream.of( + .thenReturn(org.apache.pekko.stream.javadsl.Source.fromJavaStream(() -> Stream.of( getSourceSubscribeSuccess(connectionSource1), getSourceSubscribeSuccess(connectionSource2) ))); @@ -228,7 +228,7 @@ public void testConnectionWorksAsExpectedIfSuccessful() { private static SubscribeResult getSourceSubscribeSuccess(final Source connectionSource) { final var result = Mockito.mock(SubscribeResult.class); Mockito.when(result.isSuccess()).thenReturn(true); - Mockito.when(result.getMqttPublishSourceOrThrow()).thenReturn(akka.stream.javadsl.Source.empty()); + Mockito.when(result.getMqttPublishSourceOrThrow()).thenReturn(org.apache.pekko.stream.javadsl.Source.empty()); Mockito.when(result.getConnectionSource()).thenReturn(connectionSource); return result; } @@ -247,7 +247,7 @@ public void testConnectionWorksAsExpectedIfSomeFailuresBecauseOfUnspecificExcept final var mqttSubscriber = Mockito.mock(MqttSubscriber.class); final var mqttSubscribeException = new MqttSubscribeException("Subscribing failed", null); Mockito.when(mqttSubscriber.subscribeForConnectionSources(Mockito.any())) - .thenReturn(akka.stream.javadsl.Source.fromJavaStream(() -> Stream.of( + .thenReturn(org.apache.pekko.stream.javadsl.Source.fromJavaStream(() -> Stream.of( getSourceSubscribeFailure(connectionSource1, mqttSubscribeException), getSourceSubscribeSuccess(connectionSource2) ))); @@ -311,7 +311,7 @@ public void testConnectionWorksAsExpectedIfSomeFailuresBecauseOfAllSubscriptions null ); Mockito.when(mqttSubscriber.subscribeForConnectionSources(Mockito.any())) - .thenReturn(akka.stream.javadsl.Source.fromJavaStream(() -> Stream.of( + .thenReturn(org.apache.pekko.stream.javadsl.Source.fromJavaStream(() -> Stream.of( getSourceSubscribeFailure(connectionSource1, allSubscriptionsFailedException), getSourceSubscribeSuccess(connectionSource2) ))); @@ -354,7 +354,7 @@ public void testConnectionFailsIfPublisherActorDoesNotRespond() { final var childActorNanny = Mockito.mock(ChildActorNanny.class); final var mqttSubscriber = Mockito.mock(MqttSubscriber.class); Mockito.when(mqttSubscriber.subscribeForConnectionSources(Mockito.any())) - .thenReturn(akka.stream.javadsl.Source.fromJavaStream(() -> Stream.of( + .thenReturn(org.apache.pekko.stream.javadsl.Source.fromJavaStream(() -> Stream.of( getSourceSubscribeSuccess(connectionSource1), getSourceSubscribeSuccess(connectionSource2) ))); @@ -412,7 +412,7 @@ public void testConnectionFailsIfPublisherActorSendsUnexpectedResponseAndOneSubs final var childActorNanny = Mockito.mock(ChildActorNanny.class); final var mqttSubscriber = Mockito.mock(MqttSubscriber.class); Mockito.when(mqttSubscriber.subscribeForConnectionSources(Mockito.any())) - .thenReturn(akka.stream.javadsl.Source.fromJavaStream(() -> Stream.of( + .thenReturn(org.apache.pekko.stream.javadsl.Source.fromJavaStream(() -> Stream.of( getSourceSubscribeSuccess(connectionSource1), getSourceSubscribeSuccess(connectionSource2) ))); diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/MqttClientActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/MqttClientActorTest.java index bfe5e9af90..c07eae4cd2 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/MqttClientActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/MqttClientActorTest.java @@ -72,7 +72,7 @@ import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.subscribe.GenericMqttSubAck; import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.subscribe.GenericMqttSubscribe; import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.subscribe.GenericMqttSubscription; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.things.model.ThingId; import org.eclipse.ditto.things.model.signals.commands.modify.DeleteThingResponse; import org.eclipse.ditto.things.model.signals.commands.modify.ModifyThing; @@ -90,14 +90,14 @@ import com.hivemq.client.mqtt.datatypes.MqttTopic; import com.typesafe.config.ConfigFactory; -import akka.Done; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.actor.Status; -import akka.http.javadsl.model.Uri; -import akka.testkit.TestActorRef; -import akka.testkit.TestProbe; +import org.apache.pekko.Done; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.testkit.TestActorRef; +import org.apache.pekko.testkit.TestProbe; import io.reactivex.Flowable; import io.reactivex.Single; diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/MqttClientConnectedTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/MqttClientConnectedTest.java index 07fd9531c5..a59204c968 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/MqttClientConnectedTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/MqttClientConnectedTest.java @@ -16,11 +16,11 @@ import static org.mutabilitydetector.unittesting.MutabilityAssert.assertInstancesOf; import static org.mutabilitydetector.unittesting.MutabilityMatchers.areImmutable; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.junit.ClassRule; import org.junit.Test; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; import nl.jqno.equalsverifier.EqualsVerifier; /** diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/client/Mqtt3RxSubscribingClientTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/client/Mqtt3RxSubscribingClientTest.java index 89e77b64a0..775732318e 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/client/Mqtt3RxSubscribingClientTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/client/Mqtt3RxSubscribingClientTest.java @@ -31,7 +31,7 @@ import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.subscribe.GenericMqttSubAckStatus; import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.subscribe.GenericMqttSubscribe; import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.subscribe.GenericMqttSubscription; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.junit.Before; import org.junit.BeforeClass; import org.junit.ClassRule; @@ -57,10 +57,10 @@ import com.hivemq.client.mqtt.mqtt3.message.subscribe.suback.Mqtt3SubAck; import com.hivemq.client.mqtt.mqtt3.message.subscribe.suback.Mqtt3SubAckReturnCode; -import akka.actor.ActorSystem; -import akka.actor.Status; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Status; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; import io.reactivex.Flowable; import io.reactivex.Single; diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/client/Mqtt5RxSubscribingClientTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/client/Mqtt5RxSubscribingClientTest.java index 96df4031e6..48a665b8e8 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/client/Mqtt5RxSubscribingClientTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/client/Mqtt5RxSubscribingClientTest.java @@ -31,7 +31,7 @@ import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.subscribe.GenericMqttSubAckStatus; import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.subscribe.GenericMqttSubscribe; import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.subscribe.GenericMqttSubscription; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.junit.Before; import org.junit.BeforeClass; import org.junit.ClassRule; @@ -57,10 +57,10 @@ import com.hivemq.client.mqtt.mqtt5.message.subscribe.suback.Mqtt5SubAck; import com.hivemq.client.mqtt.mqtt5.message.subscribe.suback.Mqtt5SubAckReasonCode; -import akka.actor.ActorSystem; -import akka.actor.Status; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Status; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; import io.reactivex.Flowable; import io.reactivex.Single; diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/consuming/MqttConsumerActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/consuming/MqttConsumerActorTest.java index 02dcd38d89..0b01bbffd8 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/consuming/MqttConsumerActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/consuming/MqttConsumerActorTest.java @@ -47,7 +47,7 @@ import org.eclipse.ditto.connectivity.service.messaging.TestConstants; import org.eclipse.ditto.connectivity.service.messaging.internal.RetrieveAddressStatus; import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.publish.GenericMqttPublish; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.internal.utils.tracing.DittoTracingInitResource; import org.eclipse.ditto.things.model.ThingId; import org.eclipse.ditto.things.model.signals.commands.exceptions.ThingNotAccessibleException; @@ -65,10 +65,10 @@ import com.hivemq.client.mqtt.datatypes.MqttTopic; import com.hivemq.client.mqtt.mqtt5.message.publish.Mqtt5Publish; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** * Unit test for {@link MqttConsumerActor}. @@ -131,7 +131,7 @@ public void propsProcessingWithNullConnectionThrowsException() { connectionSource, connectivityStatusResolver, TestConstants.CONNECTIVITY_CONFIG, - Mockito.mock(akka.stream.javadsl.Source.class))) + Mockito.mock(org.apache.pekko.stream.javadsl.Source.class))) .withMessage("The connection must not be null!") .withNoCause(); } @@ -144,7 +144,7 @@ public void propsProcessingWithNullInboundMappingSinkThrowsException() { connectionSource, connectivityStatusResolver, TestConstants.CONNECTIVITY_CONFIG, - Mockito.mock(akka.stream.javadsl.Source.class))) + Mockito.mock(org.apache.pekko.stream.javadsl.Source.class))) .withMessage("The inboundMappingSink must not be null!") .withNoCause(); } @@ -157,7 +157,7 @@ public void propsProcessingWithNullConnectionSourceThrowsException() { null, connectivityStatusResolver, TestConstants.CONNECTIVITY_CONFIG, - Mockito.mock(akka.stream.javadsl.Source.class))) + Mockito.mock(org.apache.pekko.stream.javadsl.Source.class))) .withMessage("The connectionSource must not be null!") .withNoCause(); } @@ -170,7 +170,7 @@ public void propsProcessingWithNullConnectivityStatusResolverThrowsException() { connectionSource, null, TestConstants.CONNECTIVITY_CONFIG, - Mockito.mock(akka.stream.javadsl.Source.class))) + Mockito.mock(org.apache.pekko.stream.javadsl.Source.class))) .withMessage("The connectivityStatusResolver must not be null!") .withNoCause(); } @@ -183,7 +183,7 @@ public void propsProcessingWithNullConnectivityConfigThrowsException() { connectionSource, connectivityStatusResolver, null, - Mockito.mock(akka.stream.javadsl.Source.class))) + Mockito.mock(org.apache.pekko.stream.javadsl.Source.class))) .withMessage("The connectivityConfig must not be null!") .withNoCause(); } diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/publishing/MqttPublisherActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/publishing/MqttPublisherActorTest.java index bb2c86c5d4..61347bafdc 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/publishing/MqttPublisherActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/publishing/MqttPublisherActorTest.java @@ -56,10 +56,10 @@ import com.hivemq.client.mqtt.datatypes.MqttQos; import com.hivemq.client.mqtt.datatypes.MqttTopic; -import akka.actor.Props; -import akka.actor.Status; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Unit test for {@link MqttPublisherActor}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/MqttSubscriberTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/MqttSubscriberTest.java index 76752dd47c..55677f8b78 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/MqttSubscriberTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/MqttSubscriberTest.java @@ -33,7 +33,7 @@ import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.subscribe.GenericMqttSubAck; import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.subscribe.GenericMqttSubAckStatus; import org.eclipse.ditto.connectivity.service.messaging.mqtt.hivemq.message.subscribe.GenericMqttSubscribe; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -45,9 +45,9 @@ import com.hivemq.client.mqtt.datatypes.MqttQos; import com.hivemq.client.mqtt.datatypes.MqttTopicFilter; -import akka.actor.ActorSystem; -import akka.stream.javadsl.Sink; -import akka.stream.testkit.javadsl.TestSink; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.testkit.javadsl.TestSink; import io.reactivex.Flowable; import io.reactivex.Single; diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/SubscribeSuccessTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/SubscribeSuccessTest.java index 1fdd5ff5fe..fea8530afe 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/SubscribeSuccessTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/subscribing/SubscribeSuccessTest.java @@ -27,7 +27,7 @@ import com.hivemq.client.mqtt.datatypes.MqttQos; import com.hivemq.client.mqtt.datatypes.MqttTopic; -import akka.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.Source; import nl.jqno.equalsverifier.EqualsVerifier; /** diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceActorTest.java index 5fc675a4de..3a6234d662 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceActorTest.java @@ -82,9 +82,9 @@ import org.eclipse.ditto.connectivity.service.messaging.WithMockServers; import org.eclipse.ditto.connectivity.service.messaging.hono.DefaultHonoConnectionFactoryTest; import org.eclipse.ditto.connectivity.service.util.ConnectionPubSub; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; -import org.eclipse.ditto.internal.utils.akka.PingCommand; -import org.eclipse.ditto.internal.utils.akka.controlflow.WithSender; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.PingCommand; +import org.eclipse.ditto.internal.utils.pekko.controlflow.WithSender; import org.eclipse.ditto.internal.utils.persistence.mongo.streaming.MongoReadJournal; import org.eclipse.ditto.internal.utils.persistentactors.AbstractPersistenceSupervisor; import org.eclipse.ditto.internal.utils.test.Retry; @@ -102,14 +102,14 @@ import com.typesafe.config.ConfigFactory; import com.typesafe.config.ConfigValueFactory; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.Status; -import akka.cluster.Cluster; -import akka.cluster.pubsub.DistributedPubSub; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.testkit.TestActor; -import akka.testkit.TestProbe; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.pubsub.DistributedPubSub; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.testkit.TestActor; +import org.apache.pekko.testkit.TestProbe; import scala.PartialFunction; import scala.concurrent.duration.FiniteDuration; diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceOperationsActorIT.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceOperationsActorIT.java index af6b7f9171..3cd9ea56e6 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceOperationsActorIT.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceOperationsActorIT.java @@ -43,10 +43,10 @@ import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.testkit.TestProbe; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.testkit.TestProbe; /** * Tests {@link ConnectionPersistenceOperationsActor}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/persistence/OneForOneEscalateStrategyTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/persistence/OneForOneEscalateStrategyTest.java index 2616c1cb1c..52788efcf8 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/persistence/OneForOneEscalateStrategyTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/persistence/OneForOneEscalateStrategyTest.java @@ -24,11 +24,11 @@ import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; -import akka.actor.ActorContext; -import akka.actor.ActorInitializationException; -import akka.actor.ActorPath; -import akka.actor.ChildRestartStats; -import akka.actor.InternalActorRef; +import org.apache.pekko.actor.ActorContext; +import org.apache.pekko.actor.ActorInitializationException; +import org.apache.pekko.actor.ActorPath; +import org.apache.pekko.actor.ChildRestartStats; +import org.apache.pekko.actor.InternalActorRef; import scala.collection.Iterable; import scala.collection.immutable.List; diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/persistence/UsageBasedPriorityProviderTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/persistence/UsageBasedPriorityProviderTest.java index 12c38cdd94..29ac77fc0a 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/persistence/UsageBasedPriorityProviderTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/persistence/UsageBasedPriorityProviderTest.java @@ -37,7 +37,7 @@ import org.eclipse.ditto.connectivity.model.ConnectivityModelFactory; import org.eclipse.ditto.connectivity.model.Measurement; import org.eclipse.ditto.connectivity.model.MetricType; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; import org.eclipse.ditto.connectivity.model.signals.commands.query.RetrieveConnectionMetrics; import org.eclipse.ditto.connectivity.model.signals.commands.query.RetrieveConnectionMetricsResponse; import org.junit.AfterClass; @@ -45,9 +45,9 @@ import org.junit.BeforeClass; import org.junit.Test; -import akka.actor.ActorSystem; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; import junit.framework.AssertionFailedError; /** diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQClientActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQClientActorTest.java index 092e1e8ded..d9715b14ec 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQClientActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQClientActorTest.java @@ -53,7 +53,7 @@ import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; -import com.newmotion.akka.rabbitmq.AmqpShutdownSignal; +import com.github.pjfanning.pekko.rabbitmq.AmqpShutdownSignal; import com.rabbitmq.client.AMQP; import com.rabbitmq.client.Channel; import com.rabbitmq.client.ConnectionFactory; @@ -61,14 +61,14 @@ import com.rabbitmq.client.Envelope; import com.rabbitmq.client.ShutdownSignalException; -import akka.actor.Actor; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.actor.Status; -import akka.testkit.CallingThreadDispatcher; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.Actor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.testkit.CallingThreadDispatcher; +import org.apache.pekko.testkit.javadsl.TestKit; @RunWith(MockitoJUnitRunner.class) public final class RabbitMQClientActorTest extends AbstractBaseClientActorTest { @@ -96,7 +96,7 @@ public final class RabbitMQClientActorTest extends AbstractBaseClientActorTest { @Before public void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem", TestConstants.CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", TestConstants.CONFIG); connection = TestConstants.createConnection(CONNECTION_ID) .toBuilder() .connectionStatus(ConnectivityStatus.CLOSED) diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQConsumerActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQConsumerActorTest.java index 7d41049c2e..1530589249 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQConsumerActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQConsumerActorTest.java @@ -45,13 +45,13 @@ import com.rabbitmq.client.Delivery; import com.rabbitmq.client.Envelope; -import akka.Done; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.stream.javadsl.Sink; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Unit test for {@link RabbitMQConsumerActor}. diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQPublisherActorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQPublisherActorTest.java index b9cbaf8c49..fc8b0b60f7 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQPublisherActorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQPublisherActorTest.java @@ -42,17 +42,17 @@ import org.junit.Test; import org.mockito.ArgumentCaptor; -import com.newmotion.akka.rabbitmq.ChannelCreated; -import com.newmotion.akka.rabbitmq.ChannelMessage; +import com.github.pjfanning.pekko.rabbitmq.ChannelCreated; +import com.github.pjfanning.pekko.rabbitmq.ChannelMessage; import com.rabbitmq.client.AMQP; import com.rabbitmq.client.Channel; import com.rabbitmq.client.ConfirmListener; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.japi.Pair; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; public class RabbitMQPublisherActorTest extends AbstractPublisherActorTest { diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQValidatorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQValidatorTest.java index 89b453a793..aa61d019f6 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQValidatorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQValidatorTest.java @@ -38,8 +38,8 @@ import org.junit.BeforeClass; import org.junit.Test; -import akka.actor.ActorSystem; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link RabbitMQValidator}. @@ -52,7 +52,7 @@ public final class RabbitMQValidatorTest { @BeforeClass public static void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem", TestConstants.CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", TestConstants.CONFIG); connectivityConfig = TestConstants.CONNECTIVITY_CONFIG; } diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/validation/ConnectionValidatorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/validation/ConnectionValidatorTest.java index 7f781b8424..a2e0887e5a 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/validation/ConnectionValidatorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/validation/ConnectionValidatorTest.java @@ -75,10 +75,10 @@ import com.typesafe.config.ConfigFactory; import com.typesafe.config.ConfigValueFactory; -import akka.actor.ActorSystem; -import akka.event.LoggingAdapter; -import akka.http.javadsl.model.Uri; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.event.LoggingAdapter; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link ConnectionValidator}. @@ -93,7 +93,7 @@ public class ConnectionValidatorTest { @BeforeClass public static void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem", CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", CONFIG); } @AfterClass diff --git a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/validation/HostValidatorTest.java b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/validation/HostValidatorTest.java index c5bdc940a5..f679b76cb1 100644 --- a/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/validation/HostValidatorTest.java +++ b/connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/validation/HostValidatorTest.java @@ -30,7 +30,7 @@ import org.junit.Before; import org.junit.Test; -import akka.event.LoggingAdapter; +import org.apache.pekko.event.LoggingAdapter; /** * Tests {@link DefaultHostValidator}. diff --git a/connectivity/service/src/test/resources/kafka-test.conf b/connectivity/service/src/test/resources/kafka-test.conf index effb6e09b8..3b41006227 100644 --- a/connectivity/service/src/test/resources/kafka-test.conf +++ b/connectivity/service/src/test/resources/kafka-test.conf @@ -5,8 +5,8 @@ kafka { interval = 1s limit = 100 } - alpakka = ${akka.kafka.consumer} - alpakka { + pekko-connectors = ${pekko.kafka.consumer} + pekko-connectors { poll-timeout = 100ms # overwrites default from reference.conf kafka-clients { default.key.serde = "org.apache.kafka.common.serialization.Serdes$StringSerde" # default: org.apache.kafka.common.serialization.Serdes$ByteArraySerde @@ -24,8 +24,8 @@ kafka { random-factor = 0.2 init-timeout-seconds = 3 - alpakka = ${akka.kafka.producer} - alpakka { + pekko-connectors = ${pekko.kafka.producer} + pekko-connectors { close-timeout = 10s # overwrites default from reference.conf kafka-clients { connections.max.idle.ms = 540000 # default: 540000 (9min) diff --git a/connectivity/service/src/test/resources/test-timeout.conf b/connectivity/service/src/test/resources/test-timeout.conf index 7b7c4fceb8..37b70de45d 100644 --- a/connectivity/service/src/test/resources/test-timeout.conf +++ b/connectivity/service/src/test/resources/test-timeout.conf @@ -1,6 +1,6 @@ include "test.conf" -akka { +pekko { http { client.idle-timeout = Inf host-connection-pool.idle-timeout = 1ms diff --git a/connectivity/service/src/test/resources/test.conf b/connectivity/service/src/test/resources/test.conf index a4676ce04f..7a41974007 100644 --- a/connectivity/service/src/test/resources/test.conf +++ b/connectivity/service/src/test/resources/test.conf @@ -1,7 +1,7 @@ -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" # for log messages during the actor system is starting up and shutting down: stdout-loglevel = "WARNING" @@ -14,9 +14,9 @@ akka { } // dead letters log disabled because actors are being killed all the time -akka.log-dead-letters = 0 -akka.cluster.jmx.multi-mbeans-in-same-jvm = on -akka.cluster.roles = ["thing-event-aware", "live-signal-aware", "acks-aware", "policy-announcement-aware", +pekko.log-dead-letters = 0 +pekko.cluster.jmx.multi-mbeans-in-same-jvm = on +pekko.cluster.roles = ["thing-event-aware", "live-signal-aware", "acks-aware", "policy-announcement-aware", "blocked-namespaces-aware", "connectivity"] ditto { @@ -146,8 +146,8 @@ ditto { throttling.enabled = true - alpakka = ${akka.kafka.consumer} - alpakka = { + pekko-connectors = ${pekko.kafka.consumer} + pekko-connectors = { default.key.serde = "org.apache.kafka.common.serialization.Serdes$StringSerde" # default: org.apache.kafka.common.serialization.Serdes$ByteArraySerde default.value.serde = "org.apache.kafka.common.serialization.Serdes$StringSerde" # default: org.apache.kafka.common.serialization.Serdes$ByteArraySerde kafka-clients { @@ -170,8 +170,8 @@ ditto { random-factor = 0.2 init-timeout-seconds = 3 - alpakka = ${akka.kafka.producer} - alpakka { + pekko-connectors = ${pekko.kafka.producer} + pekko-connectors { kafka-clients { connections.max.idle.ms = 543210 reconnect.backoff { @@ -310,10 +310,10 @@ ditto { } } -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" # for log messages during the actor system is starting up and shutting down: stdout-loglevel = "WARNING" @@ -346,7 +346,7 @@ akka { json = "org.eclipse.ditto.internal.utils.cluster.JsonJsonifiableSerializer" cbor = "org.eclipse.ditto.internal.utils.cluster.CborJsonifiableSerializer" cbor-json-value = "org.eclipse.ditto.internal.utils.cluster.CborJsonValueSerializer" - jackson-cbor = "akka.serialization.jackson.JacksonCborSerializer" + jackson-cbor = "org.apache.pekko.serialization.jackson.JacksonCborSerializer" } serialization-bindings { @@ -356,12 +356,12 @@ akka { "org.eclipse.ditto.base.model.exceptions.DittoRuntimeException" = cbor "org.eclipse.ditto.base.api.devops.signals.commands.DevOpsCommandResponse" = json # to ensure readability "org.eclipse.ditto.json.JsonValue" = cbor-json-value - "org.eclipse.ditto.internal.utils.cluster.AkkaJacksonCborSerializable" = jackson-cbor + "org.eclipse.ditto.internal.utils.cluster.PekkoJacksonCborSerializable" = jackson-cbor } } extensions = [ - "akka.cluster.pubsub.DistributedPubSub" + "org.apache.pekko.cluster.pubsub.DistributedPubSub" ] remote { @@ -384,13 +384,13 @@ akka { } cluster { - # Disable legacy metrics in akka-cluster. + # Disable legacy metrics in pekko-cluster. metrics.enabled = off # enable weakly up feature to allow members to join even if some members are unreachable allow-weakly-up-members = on - # required for akka-management-cluster-bootstrap (to be more robust): + # required for pekko-management-cluster-bootstrap (to be more robust): shutdown-after-unsuccessful-join-seed-nodes = 40s sharding { @@ -409,7 +409,7 @@ akka { http { server { - server-header = "" # default: akka-http/${akka.http.version} + server-header = "" # default: pekko-http/${pekko.http.version} max-connections = 4096 # default: 1024 backlog = 100 # default: 100 @@ -454,22 +454,22 @@ akka { default-timeout = 5s calling-thread-dispatcher { - type = akka.testkit.CallingThreadDispatcherConfigurator + type = org.apache.pekko.testkit.CallingThreadDispatcherConfigurator } } } -akka.persistence { +pekko.persistence { journal.auto-start-journals = [ - "akka-contrib-mongodb-persistence-connection-journal" + "pekko-contrib-mongodb-persistence-connection-journal" ] snapshot-store.auto-start-snapshot-stores = [ - "akka-contrib-mongodb-persistence-connection-snapshots" + "pekko-contrib-mongodb-persistence-connection-snapshots" ] } -akka-contrib-mongodb-persistence-connection-journal { - class = "akka.persistence.inmemory.journal.InMemoryAsyncWriteJournal" +pekko-contrib-mongodb-persistence-connection-journal { + class = "org.apache.pekko.persistence.inmemory.journal.InMemoryAsyncWriteJournal" plugin-dispatcher = "connection-persistence-dispatcher" ask-timeout = 10s @@ -484,15 +484,15 @@ akka-contrib-mongodb-persistence-connection-journal { } } -akka-contrib-mongodb-persistence-connection-snapshots { - class = "akka.persistence.inmemory.snapshot.InMemorySnapshotStore" +pekko-contrib-mongodb-persistence-connection-snapshots { + class = "org.apache.pekko.persistence.inmemory.snapshot.InMemorySnapshotStore" plugin-dispatcher = "connection-persistence-dispatcher" ask-timeout = 10s } -akka-contrib-mongodb-persistence-reconnect-journal { - class = "akka.persistence.inmemory.journal.InMemoryAsyncWriteJournal" +pekko-contrib-mongodb-persistence-reconnect-journal { + class = "org.apache.pekko.persistence.inmemory.journal.InMemoryAsyncWriteJournal" plugin-dispatcher = "reconnect-persistence-dispatcher" ask-timeout = 10s @@ -507,8 +507,8 @@ akka-contrib-mongodb-persistence-reconnect-journal { } } -akka-contrib-mongodb-persistence-reconnect-snapshots { - class = "akka.persistence.inmemory.snapshot.InMemorySnapshotStore" +pekko-contrib-mongodb-persistence-reconnect-snapshots { + class = "org.apache.pekko.persistence.inmemory.snapshot.InMemorySnapshotStore" plugin-dispatcher = "reconnect-persistence-dispatcher" ask-timeout = 10s diff --git a/deployment/docker/docker-compose.yml b/deployment/docker/docker-compose.yml index 0842ec5081..3107df7b03 100755 --- a/deployment/docker/docker-compose.yml +++ b/deployment/docker/docker-compose.yml @@ -38,7 +38,7 @@ services: - TZ=Europe/Berlin - BIND_HOSTNAME=0.0.0.0 # Set additional configuration options here appending JAVA_TOOL_OPTIONS: -Dditto.policies... - - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class= + - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dpekko.cluster.downing-provider-class= - MONGO_DB_HOSTNAME=mongodb # in order to write logs into a file you can enable this by setting the following env variable # the log file(s) can be found in /var/log/ditto directory on the host machine @@ -47,7 +47,7 @@ services: # volumes: # - ditto_log_files:/var/log/ditto healthcheck: - test: curl --fail `hostname`:8558/alive || exit 1 + test: curl --fail `hostname`:7626/alive || exit 1 interval: 30s timeout: 15s retries: 4 @@ -67,7 +67,7 @@ services: - TZ=Europe/Berlin - BIND_HOSTNAME=0.0.0.0 # Set additional configuration options here appending JAVA_TOOL_OPTIONS: -Dditto.things... - - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class= + - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dpekko.cluster.downing-provider-class= - MONGO_DB_HOSTNAME=mongodb # in order to write logs into a file you can enable this by setting the following env variable # the log file(s) can be found in /var/log/ditto directory on the host machine @@ -76,7 +76,7 @@ services: # volumes: # - ditto_log_files:/var/log/ditto healthcheck: - test: curl --fail `hostname`:8558/alive || exit 1 + test: curl --fail `hostname`:7626/alive || exit 1 interval: 30s timeout: 15s retries: 4 @@ -96,7 +96,7 @@ services: - TZ=Europe/Berlin - BIND_HOSTNAME=0.0.0.0 # Set additional configuration options here appending JAVA_TOOL_OPTIONS: -Dditto.search... - - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class= + - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dpekko.cluster.downing-provider-class= - MONGO_DB_HOSTNAME=mongodb # in order to write logs into a file you can enable this by setting the following env variable # the log file(s) can be found in /var/log/ditto directory on the host machine @@ -105,7 +105,7 @@ services: # volumes: # - ditto_log_files:/var/log/ditto healthcheck: - test: curl --fail `hostname`:8558/alive || exit 1 + test: curl --fail `hostname`:7626/alive || exit 1 interval: 30s timeout: 15s retries: 4 @@ -126,7 +126,7 @@ services: - BIND_HOSTNAME=0.0.0.0 # if connections to rabbitmq broker are used, you might want to disable ExitOnOutOfMemoryError, because the amqp-client has a bug throwing OOM exceptions and causing a restart loop # Set additional configuration options here appending JAVA_TOOL_OPTIONS: -Dditto.connectivity... - - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class= + - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dpekko.cluster.downing-provider-class= - MONGO_DB_HOSTNAME=mongodb # in order to write logs into a file you can enable this by setting the following env variable # the log file(s) can be found in /var/log/ditto directory on the host machine @@ -135,7 +135,7 @@ services: #volumes: # - ditto_log_files:/var/log/ditto healthcheck: - test: curl --fail `hostname`:8558/alive || exit 1 + test: curl --fail `hostname`:7626/alive || exit 1 interval: 30s timeout: 15s retries: 4 @@ -158,7 +158,7 @@ services: - BIND_HOSTNAME=0.0.0.0 - ENABLE_PRE_AUTHENTICATION=true # Set additional configuration options here appending JAVA_TOOL_OPTIONS: -Dditto.gateway.authentication.devops.password=foobar -Dditto.gateway... - - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class= + - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dpekko.cluster.downing-provider-class= # in order to write logs into a file you can enable this by setting the following env variable # the log file(s) can be found in /var/log/ditto directory on the host machine # - DITTO_LOGGING_FILE_APPENDER=true @@ -168,7 +168,7 @@ services: # volumes: # - ditto_log_files:/var/log/ditto healthcheck: - test: curl --fail `hostname`:8558/alive || exit 1 + test: curl --fail `hostname`:7626/alive || exit 1 interval: 30s timeout: 15s retries: 4 diff --git a/deployment/docker/sandbox/docker-compose.yml b/deployment/docker/sandbox/docker-compose.yml index 8a8a2320a0..7aade67bd5 100644 --- a/deployment/docker/sandbox/docker-compose.yml +++ b/deployment/docker/sandbox/docker-compose.yml @@ -38,10 +38,10 @@ services: environment: - TZ=Europe/Berlin - BIND_HOSTNAME=0.0.0.0 - - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=1 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=280s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class="" + - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=1 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=280s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dpekko.cluster.downing-provider-class="" - MONGO_DB_HOSTNAME=mongodb healthcheck: - test: curl --fail `hostname`:8558/alive || exit 1 + test: curl --fail `hostname`:7626/alive || exit 1 interval: 30s timeout: 15s retries: 4 @@ -63,10 +63,10 @@ services: - BIND_HOSTNAME=0.0.0.0 - DITTO_DEVOPS_FEATURE_WOT_INTEGRATION_ENABLED=true - THINGS_WOT_TO_THING_DESCRIPTION_BASE_PREFIX=https://ditto.eclipseprojects.io - - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=1 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=280s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class="" + - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=1 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=280s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dpekko.cluster.downing-provider-class="" - MONGO_DB_HOSTNAME=mongodb healthcheck: - test: curl --fail `hostname`:8558/alive || exit 1 + test: curl --fail `hostname`:7626/alive || exit 1 interval: 30s timeout: 15s retries: 4 @@ -86,10 +86,10 @@ services: environment: - TZ=Europe/Berlin - BIND_HOSTNAME=0.0.0.0 - - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=1 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=280s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class="" + - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=1 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=280s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dpekko.cluster.downing-provider-class="" - MONGO_DB_HOSTNAME=mongodb healthcheck: - test: curl --fail `hostname`:8558/alive || exit 1 + test: curl --fail `hostname`:7626/alive || exit 1 interval: 30s timeout: 15s retries: 4 @@ -111,10 +111,10 @@ services: # - BIND_HOSTNAME=0.0.0.0 # - DITTO_DEVOPS_FEATURE_WOT_INTEGRATION_ENABLED=true # # if connections to rabbitmq broker are used, you might want to disable ExitOnOutOfMemoryError, because the amqp-client has a bug throwing OOM exceptions and causing a restart loop -# - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=1 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=280s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class="" +# - JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=1 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=280s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dpekko.cluster.downing-provider-class="" # - MONGO_DB_HOSTNAME=mongodb # healthcheck: -# test: curl --fail `hostname`:8558/alive || exit 1 +# test: curl --fail `hostname`:7626/alive || exit 1 # interval: 30s # timeout: 15s # retries: 4 @@ -140,13 +140,13 @@ services: - | JAVA_TOOL_OPTIONS= -XX:ActiveProcessorCount=1 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=500 - -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=280s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dakka.cluster.downing-provider-class="" + -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=280s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dpekko.cluster.downing-provider-class="" -Dditto.gateway.health-check.cluster-roles.expected.0=policies -Dditto.gateway.health-check.cluster-roles.expected.1=things -Dditto.gateway.health-check.cluster-roles.expected.2=search -Dditto.gateway.health-check.cluster-roles.expected.3=gateway healthcheck: - test: curl --fail `hostname`:8558/alive || exit 1 + test: curl --fail `hostname`:7626/alive || exit 1 interval: 30s timeout: 15s retries: 4 diff --git a/deployment/helm/ditto/README.md b/deployment/helm/ditto/README.md index 631852cb0b..411d6d69fe 100644 --- a/deployment/helm/ditto/README.md +++ b/deployment/helm/ditto/README.md @@ -106,7 +106,7 @@ things: ### Configuration via system properties -Not all Ditto/Akka configuration options have an environment variable overwrite defined in the configuration. +Not all Ditto/Pekko configuration options have an environment variable overwrite defined in the configuration. For configurations without such an environment variable overwrite, the option can be configured via Java system property. The documentation on how this works can be found in the [HOCON documentation](https://github.com/lightbend/config/blob/main/HOCON.md#conventional-override-by-system-properties), @@ -121,7 +121,7 @@ simply configure: things: # ... systemProps: - - "-Dakka-contrib-mongodb-persistence-things-journal.overrides.journal-collection=another_fancy_name" + - "-Dpekko-contrib-mongodb-persistence-things-journal.overrides.journal-collection=another_fancy_name" ``` diff --git a/deployment/helm/ditto/logback-config/connectivity.xml b/deployment/helm/ditto/logback-config/connectivity.xml index 0d22766ad5..1e4b4a36b4 100644 --- a/deployment/helm/ditto/logback-config/connectivity.xml +++ b/deployment/helm/ditto/logback-config/connectivity.xml @@ -15,8 +15,8 @@ sourceActorSystem - akkaUid - akkaTimestamp + pekkoUid + pekkoTimestamp x-correlation-id=correlation-id connection-id=ditto-connection-id connection-type=ditto-connection-type @@ -26,9 +26,9 @@ - - - + + + diff --git a/deployment/helm/ditto/logback-config/gateway.xml b/deployment/helm/ditto/logback-config/gateway.xml index 348e3a6387..ee68534ff1 100755 --- a/deployment/helm/ditto/logback-config/gateway.xml +++ b/deployment/helm/ditto/logback-config/gateway.xml @@ -15,8 +15,8 @@ sourceActorSystem - akkaUid - akkaTimestamp + pekkoUid + pekkoTimestamp x-correlation-id=correlation-id @@ -24,9 +24,9 @@ - - - + + + diff --git a/deployment/helm/ditto/logback-config/policies.xml b/deployment/helm/ditto/logback-config/policies.xml index 348e3a6387..ee68534ff1 100755 --- a/deployment/helm/ditto/logback-config/policies.xml +++ b/deployment/helm/ditto/logback-config/policies.xml @@ -15,8 +15,8 @@ sourceActorSystem - akkaUid - akkaTimestamp + pekkoUid + pekkoTimestamp x-correlation-id=correlation-id @@ -24,9 +24,9 @@ - - - + + + diff --git a/deployment/helm/ditto/logback-config/things.xml b/deployment/helm/ditto/logback-config/things.xml index 348e3a6387..ee68534ff1 100755 --- a/deployment/helm/ditto/logback-config/things.xml +++ b/deployment/helm/ditto/logback-config/things.xml @@ -15,8 +15,8 @@ sourceActorSystem - akkaUid - akkaTimestamp + pekkoUid + pekkoTimestamp x-correlation-id=correlation-id @@ -24,9 +24,9 @@ - - - + + + diff --git a/deployment/helm/ditto/logback-config/thingssearch.xml b/deployment/helm/ditto/logback-config/thingssearch.xml index 348e3a6387..ee68534ff1 100755 --- a/deployment/helm/ditto/logback-config/thingssearch.xml +++ b/deployment/helm/ditto/logback-config/thingssearch.xml @@ -15,8 +15,8 @@ sourceActorSystem - akkaUid - akkaTimestamp + pekkoUid + pekkoTimestamp x-correlation-id=correlation-id @@ -24,9 +24,9 @@ - - - + + + diff --git a/deployment/helm/ditto/templates/connectivity-deployment.yaml b/deployment/helm/ditto/templates/connectivity-deployment.yaml index b998efe765..0ca152ad84 100644 --- a/deployment/helm/ditto/templates/connectivity-deployment.yaml +++ b/deployment/helm/ditto/templates/connectivity-deployment.yaml @@ -33,7 +33,7 @@ spec: labels: app.kubernetes.io/name: {{ include "ditto.name" . }}-connectivity app.kubernetes.io/instance: {{ .Release.Name }} - actorSystemName: {{ .Values.akka.actorSystemName }} + actorSystemName: {{ .Values.pekko.actorSystemName }} {{- with .Values.connectivity.additionalLabels }} {{- toYaml . | nindent 8 }} {{- end }} @@ -126,7 +126,7 @@ spec: -XX:InitialRAMPercentage={{ .Values.connectivity.jvm.heapRamPercentage }} -XX:MaxGCPauseMillis={{ .Values.connectivity.jvm.maxGcPauseMillis }} {{ .Values.connectivity.additionalJvmOptions }} - {{- .Values.global.akkaOptions }} + {{- .Values.global.pekkoOptions }} {{- if .Values.global.logging.customConfigFile.enabled }} -Dlogback.configurationFile=/opt/ditto/{{ .Values.global.logging.customConfigFile.fileName }} {{- end }} @@ -177,9 +177,9 @@ spec: value: "{{ .Values.global.limits.maxHeadersSize }}" - name: LIMITS_MESSAGES_AUTH_SUBJECTS_COUNT value: "{{ .Values.global.limits.maxAuthSubjectsCount }}" - - name: AKKA_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN + - name: PEKKO_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN value: "{{ .Values.connectivity.config.mongodb.journalWriteConcern }}" - - name: AKKA_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN + - name: PEKKO_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN value: "{{ .Values.connectivity.config.mongodb.snapsWriteConcern }}" - name: BREAKER_MAXTRIES value: "{{ .Values.connectivity.config.mongodb.journalCircuitBreaker.maxTries }}" @@ -258,10 +258,10 @@ spec: {{- end }} ports: - name: remoting - containerPort: {{ .Values.akka.remoting.port }} + containerPort: {{ .Values.pekko.remoting.port }} protocol: TCP - name: management - containerPort: {{ .Values.akka.mgmthttp.port }} + containerPort: {{ .Values.pekko.mgmthttp.port }} protocol: TCP {{- if .Values.global.prometheus.enabled }} - name: prometheus @@ -302,7 +302,7 @@ spec: memory: {{ .Values.connectivity.resources.memoryMi }}Mi limits: # ## no cpu limit to avoid CFS scheduler limits - # ref: https://doc.akka.io/docs/akka/snapshot/additional/deploy.html#in-kubernetes + # ref: https://pekko.apache.org/docs/pekko/current/additional/deploying.html#deploying-to-kubernetes # cpu: "" memory: {{ .Values.connectivity.resources.memoryMi }}Mi {{- if .Values.openshift.enabled }} diff --git a/deployment/helm/ditto/templates/gateway-deployment.yaml b/deployment/helm/ditto/templates/gateway-deployment.yaml index 9a22c411e3..a028f093e9 100644 --- a/deployment/helm/ditto/templates/gateway-deployment.yaml +++ b/deployment/helm/ditto/templates/gateway-deployment.yaml @@ -33,7 +33,7 @@ spec: labels: app.kubernetes.io/name: {{ include "ditto.name" . }}-gateway app.kubernetes.io/instance: {{ .Release.Name }} - actorSystemName: {{ .Values.akka.actorSystemName }} + actorSystemName: {{ .Values.pekko.actorSystemName }} {{- with .Values.gateway.additionalLabels }} {{- toYaml . | nindent 8 }} {{- end }} @@ -127,7 +127,7 @@ spec: -XX:InitialRAMPercentage={{ .Values.gateway.jvm.heapRamPercentage }} -XX:MaxGCPauseMillis={{ .Values.gateway.jvm.maxGcPauseMillis }} {{ .Values.gateway.additionalJvmOptions }} - {{- .Values.global.akkaOptions }} + {{- .Values.global.pekkoOptions }} {{- if .Values.global.logging.customConfigFile.enabled }} -Dlogback.configurationFile=/opt/ditto/{{ .Values.global.logging.customConfigFile.fileName }} {{- end }} @@ -228,10 +228,10 @@ spec: containerPort: {{ .Values.gateway.service.port }} protocol: TCP - name: remoting - containerPort: {{ .Values.akka.remoting.port }} + containerPort: {{ .Values.pekko.remoting.port }} protocol: TCP - name: management - containerPort: {{ .Values.akka.mgmthttp.port }} + containerPort: {{ .Values.pekko.mgmthttp.port }} protocol: TCP {{- if .Values.global.prometheus.enabled }} - name: prometheus @@ -272,7 +272,7 @@ spec: memory: {{ .Values.gateway.resources.memoryMi }}Mi limits: # ## no cpu limit to avoid CFS scheduler limits - # ref: https://doc.akka.io/docs/akka/snapshot/additional/deploy.html#in-kubernetes + # ref: https://pekko.apache.org/docs/pekko/current/additional/deploying.html#deploying-to-kubernetes # cpu: "" memory: {{ .Values.gateway.resources.memoryMi }}Mi {{- if .Values.openshift.enabled }} diff --git a/deployment/helm/ditto/templates/policies-deployment.yaml b/deployment/helm/ditto/templates/policies-deployment.yaml index 4e94902c18..6724257026 100644 --- a/deployment/helm/ditto/templates/policies-deployment.yaml +++ b/deployment/helm/ditto/templates/policies-deployment.yaml @@ -33,7 +33,7 @@ spec: labels: app.kubernetes.io/name: {{ include "ditto.name" . }}-policies app.kubernetes.io/instance: {{ .Release.Name }} - actorSystemName: {{ .Values.akka.actorSystemName }} + actorSystemName: {{ .Values.pekko.actorSystemName }} {{- with .Values.policies.additionalLabels }} {{- toYaml . | nindent 8 }} {{- end }} @@ -126,7 +126,7 @@ spec: -XX:InitialRAMPercentage={{ .Values.policies.jvm.heapRamPercentage }} -XX:MaxGCPauseMillis={{ .Values.policies.jvm.maxGcPauseMillis }} {{ .Values.policies.additionalJvmOptions }} - {{- .Values.global.akkaOptions }} + {{- .Values.global.pekkoOptions }} {{- if .Values.global.logging.customConfigFile.enabled }} -Dlogback.configurationFile=/opt/ditto/{{ .Values.global.logging.customConfigFile.fileName }} {{- end }} @@ -195,9 +195,9 @@ spec: value: "{{ .Values.global.limits.maxHeadersSize }}" - name: LIMITS_MESSAGES_AUTH_SUBJECTS_COUNT value: "{{ .Values.global.limits.maxAuthSubjectsCount }}" - - name: AKKA_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN + - name: PEKKO_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN value: "{{ .Values.policies.config.mongodb.journalWriteConcern }}" - - name: AKKA_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN + - name: PEKKO_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN value: "{{ .Values.policies.config.mongodb.snapsWriteConcern }}" - name: BREAKER_MAXTRIES value: "{{ .Values.policies.config.mongodb.journalCircuitBreaker.maxTries }}" @@ -247,10 +247,10 @@ spec: containerPort: 8080 protocol: TCP - name: remoting - containerPort: {{ .Values.akka.remoting.port }} + containerPort: {{ .Values.pekko.remoting.port }} protocol: TCP - name: management - containerPort: {{ .Values.akka.mgmthttp.port }} + containerPort: {{ .Values.pekko.mgmthttp.port }} protocol: TCP {{- if .Values.global.prometheus.enabled }} - name: prometheus @@ -291,7 +291,7 @@ spec: memory: {{ .Values.policies.resources.memoryMi }}Mi limits: # ## no cpu limit to avoid CFS scheduler limits - # ref: https://doc.akka.io/docs/akka/snapshot/additional/deploy.html#in-kubernetes + # ref: https://pekko.apache.org/docs/pekko/current/additional/deploying.html#deploying-to-kubernetes # cpu: "" memory: {{ .Values.policies.resources.memoryMi }}Mi {{- if .Values.openshift.enabled }} diff --git a/deployment/helm/ditto/templates/things-deployment.yaml b/deployment/helm/ditto/templates/things-deployment.yaml index 4655f491b9..ada25eb86d 100644 --- a/deployment/helm/ditto/templates/things-deployment.yaml +++ b/deployment/helm/ditto/templates/things-deployment.yaml @@ -33,7 +33,7 @@ spec: labels: app.kubernetes.io/name: {{ include "ditto.name" . }}-things app.kubernetes.io/instance: {{ .Release.Name }} - actorSystemName: {{ .Values.akka.actorSystemName }} + actorSystemName: {{ .Values.pekko.actorSystemName }} {{- with .Values.things.additionalLabels }} {{- toYaml . | nindent 8 }} {{- end }} @@ -126,7 +126,7 @@ spec: -XX:InitialRAMPercentage={{ .Values.things.jvm.heapRamPercentage }} -XX:MaxGCPauseMillis={{ .Values.things.jvm.maxGcPauseMillis }} {{ .Values.things.additionalJvmOptions }} - {{- .Values.global.akkaOptions }} + {{- .Values.global.pekkoOptions }} {{- if .Values.global.logging.customConfigFile.enabled }} -Dlogback.configurationFile=/opt/ditto/{{ .Values.global.logging.customConfigFile.fileName }} {{- end }} @@ -196,9 +196,9 @@ spec: value: "{{ .Values.global.limits.maxHeadersSize }}" - name: LIMITS_MESSAGES_AUTH_SUBJECTS_COUNT value: "{{ .Values.global.limits.maxAuthSubjectsCount }}" - - name: AKKA_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN + - name: PEKKO_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN value: "{{ .Values.things.config.mongodb.journalWriteConcern }}" - - name: AKKA_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN + - name: PEKKO_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN value: "{{ .Values.things.config.mongodb.snapsWriteConcern }}" - name: BREAKER_MAXTRIES value: "{{ .Values.things.config.mongodb.journalCircuitBreaker.maxTries }}" @@ -251,10 +251,10 @@ spec: {{- end }} ports: - name: remoting - containerPort: {{ .Values.akka.remoting.port }} + containerPort: {{ .Values.pekko.remoting.port }} protocol: TCP - name: management - containerPort: {{ .Values.akka.mgmthttp.port }} + containerPort: {{ .Values.pekko.mgmthttp.port }} protocol: TCP {{- if .Values.global.prometheus.enabled }} - name: prometheus @@ -295,7 +295,7 @@ spec: memory: {{ .Values.things.resources.memoryMi }}Mi limits: # ## no cpu limit to avoid CFS scheduler limits - # ref: https://doc.akka.io/docs/akka/snapshot/additional/deploy.html#in-kubernetes + # ref: https://pekko.apache.org/docs/pekko/current/additional/deploying.html#deploying-to-kubernetes # cpu: "" memory: {{ .Values.things.resources.memoryMi }}Mi {{- if .Values.openshift.enabled }} diff --git a/deployment/helm/ditto/templates/thingssearch-deployment.yaml b/deployment/helm/ditto/templates/thingssearch-deployment.yaml index eee5cee272..3d2cdceffe 100644 --- a/deployment/helm/ditto/templates/thingssearch-deployment.yaml +++ b/deployment/helm/ditto/templates/thingssearch-deployment.yaml @@ -33,7 +33,7 @@ spec: labels: app.kubernetes.io/name: {{ include "ditto.name" . }}-thingssearch app.kubernetes.io/instance: {{ .Release.Name }} - actorSystemName: {{ .Values.akka.actorSystemName }} + actorSystemName: {{ .Values.pekko.actorSystemName }} {{- with .Values.thingsSearch.additionalLabels }} {{- toYaml . | nindent 8 }} {{- end }} @@ -126,7 +126,7 @@ spec: -XX:InitialRAMPercentage={{ .Values.thingsSearch.jvm.heapRamPercentage }} -XX:MaxGCPauseMillis={{ .Values.thingsSearch.jvm.maxGcPauseMillis }} {{ .Values.thingsSearch.additionalJvmOptions }} - {{- .Values.global.akkaOptions }} + {{- .Values.global.pekkoOptions }} {{- if .Values.global.logging.customConfigFile.enabled }} -Dlogback.configurationFile=/opt/ditto/{{ .Values.global.logging.customConfigFile.fileName }} {{- end }} @@ -229,10 +229,10 @@ spec: {{- end }} ports: - name: remoting - containerPort: {{ .Values.akka.remoting.port }} + containerPort: {{ .Values.pekko.remoting.port }} protocol: TCP - name: management - containerPort: {{ .Values.akka.mgmthttp.port }} + containerPort: {{ .Values.pekko.mgmthttp.port }} protocol: TCP {{- if .Values.global.prometheus.enabled }} - name: prometheus @@ -273,7 +273,7 @@ spec: memory: {{ .Values.thingsSearch.resources.memoryMi }}Mi limits: # ## no cpu limit to avoid CFS scheduler limits - # ref: https://doc.akka.io/docs/akka/snapshot/additional/deploy.html#in-kubernetes + # ref: https://pekko.apache.org/docs/pekko/current/additional/deploying.html#deploying-to-kubernetes # cpu: "" memory: {{ .Values.thingsSearch.resources.memoryMi }}Mi {{- if .Values.openshift.enabled }} diff --git a/deployment/helm/ditto/values.yaml b/deployment/helm/ditto/values.yaml index 948fe560ed..3ec0d08e64 100644 --- a/deployment/helm/ditto/values.yaml +++ b/deployment/helm/ditto/values.yaml @@ -30,7 +30,7 @@ fullnameOverride: "" ## ---------------------------------------------------------------------------- ## global configuration shared by all components global: - # cluster holds the configuration for the Ditto/Akka cluster + # cluster holds the configuration for the Ditto/Pekko cluster cluster: # requiredContactPoints defines the total amount of replicas in the Ditto cluster # only if this amount is "seen" during cluster formation, the cluster can form itself @@ -47,10 +47,10 @@ global: # numberOfShards configures the sharding applied for things/policies/connections based on their ID # as a rule of thumb: should be factor ten of the amount of cluster replicas for an entity numberOfShards: 50 - # downingStableAfter is a configuration of the Akka SBR (split brain resolver) - # how to find the right value: https://doc.akka.io/docs/akka/current/split-brain-resolver.html + # downingStableAfter is a configuration of the Pekko SBR (split brain resolver) + # how to find the right value: https://pekko.apache.org/docs/pekko/current/split-brain-resolver.html downingStableAfter: 15s - # downAllWhenUnstable is a configuration of the Akka SBR (split brain resolver) + # downAllWhenUnstable is a configuration of the Pekko SBR (split brain resolver) downAllWhenUnstable: "on" # limits contains information about limit configuration, e.g. towards max. entity and payload sizes limits: @@ -88,15 +88,15 @@ global: -XX:MaxMetaspaceSize=256m -XX:+UseG1GC -Djava.net.preferIPv4Stack=true - akkaOptions: > - -Dakka.management.cluster.bootstrap.contact-point-discovery.port-name=management - -Dakka.cluster.failure-detector.threshold=15.0 - -Dakka.cluster.failure-detector.expected-response-after=3s - -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=7s - -Dakka.persistence.journal-plugin-fallback.recovery-event-timeout=30s - -Dakka.persistence.max-concurrent-recoveries=100 - -Dakka.cluster.sharding.updating-state-timeout=20s - -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=120s + pekkoOptions: > + -Dpekko.management.cluster.bootstrap.contact-point-discovery.port-name=management + -Dpekko.cluster.failure-detector.threshold=15.0 + -Dpekko.cluster.failure-detector.expected-response-after=3s + -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=7s + -Dpekko.persistence.journal-plugin-fallback.recovery-event-timeout=30s + -Dpekko.persistence.max-concurrent-recoveries=100 + -Dpekko.cluster.sharding.updating-state-timeout=20s + -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=120s # timezone defines the timezone to configure the JVM with timezone: Europe/Berlin # imagePullSecrets will be added to every deployment @@ -404,19 +404,19 @@ openshift: securityContext: {} ## ---------------------------------------------------------------------------- -## akka holds the Akka actor configuration -## ref: https://doc.akka.io/docs/akka/current/typed/index.html -akka: +## pekko holds the Pekko actor configuration +## ref: https://pekko.apache.org/docs/pekko/current/typed/index.html +pekko: # actorSystemName defines the actor/cluster name of the Ditto cluster actorSystemName: ditto-cluster - # remoting holds configuration for the Akka cluster remoting + # remoting holds configuration for the Pekko cluster remoting remoting: # port defines the Port to use for remoting port: 2551 - # mgmthttp holds configuration for the Akka cluster management + # mgmthttp holds configuration for the Pekko cluster management mgmthttp: - # port defines the Port to use for akka http management - port: 8558 + # port defines the Port to use for pekko http management + port: 7626 # Set "dittoTag" in order to specify another Ditto version to use for all Ditto services: # you may also use "1" (for latest Ditto 1.x.x) or "1.5" (for latest Ditto 1.5.x) @@ -590,7 +590,7 @@ policies: # a revision number 1 higher than the previously deleted entity. If the final snapshot is deleted as well, # recreation of an entity with the same ID will lead to revisionNumber=1 after its recreation. deleteFinalDeletedSnapshot: true - # persistence holds configuration regarding (akka) persistence of policies (event journal and snapshots) + # persistence holds configuration regarding (pekko) persistence of policies (event journal and snapshots) persistence: # activityCheckInterval configures to keep policies for that amount of time in memory when no other use did happen: activityCheckInterval: 2d @@ -799,7 +799,7 @@ things: # a revision number 1 higher than the previously deleted entity. If the final snapshot is deleted as well, # recreation of an entity with the same ID will lead to revisionNumber=1 after its recreation. deleteFinalDeletedSnapshot: true - # persistence holds configuration regarding (akka) persistence of things (event journal and snapshots) + # persistence holds configuration regarding (pekko) persistence of things (event journal and snapshots) persistence: # activityCheckInterval configures to keep things for that amount of time in memory when no other use did happen activityCheckInterval: 2d @@ -1221,7 +1221,7 @@ connectivity: timerThreshold: 100ms # creditsPerBatch configures how many "cleanup credits" should be generated per "interval" as long as the creditsPerBatch: 5 - # persistence holds configuration regarding (akka) persistence of connections (event journal and snapshots) + # persistence holds configuration regarding (pekko) persistence of connections (event journal and snapshots) persistence: # keep closed, inactive connections for that amount of time in memory when no other use did happen: activityCheckInterval: 45m diff --git a/deployment/kubernetes/deploymentFiles/ditto/ditto-cluster.yaml b/deployment/kubernetes/deploymentFiles/ditto/ditto-cluster.yaml index a9f30f4c03..7d630f1d7d 100644 --- a/deployment/kubernetes/deploymentFiles/ditto/ditto-cluster.yaml +++ b/deployment/kubernetes/deploymentFiles/ditto/ditto-cluster.yaml @@ -36,7 +36,7 @@ spec: # cpu: "1" # memory: "1Gi" # limits: - # # cpu: "" no cpu limit to avoid CFS scheduler limits see https://doc.akka.io/docs/akka/snapshot/additional/deploy.html#in-kubernetes + # # cpu: "" no cpu limit to avoid CFS scheduler limits see https://pekko.apache.org/docs/pekko/current/additional/deploy.html#in-kubernetes # memory: "4Gi" volumeMounts: - name: ditto-log-files-directory @@ -46,7 +46,7 @@ spec: containerPort: 2551 protocol: TCP - name: management - containerPort: 8558 + containerPort: 7626 protocol: TCP readinessProbe: httpGet: @@ -78,7 +78,7 @@ spec: - name: TZ value: "Europe/Berlin" - name: JAVA_TOOL_OPTIONS - value: "-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=30s" + value: "-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=30s" - name: MONGO_DB_HOSTNAME value: "mongodb" # in order to read the MONGO_DB_URI from a kubernetes secret replace the above lines for MONGO_DB_HOSTNAME with the following ones @@ -137,7 +137,7 @@ spec: # cpu: "1" # memory: "1Gi" # limits: - # # cpu: "" no cpu limit to avoid CFS scheduler limits see https://doc.akka.io/docs/akka/snapshot/additional/deploy.html#in-kubernetes + # # cpu: "" no cpu limit to avoid CFS scheduler limits see https://pekko.apache.org/docs/pekko/current/additional/deploy.html#in-kubernetes # memory: "4Gi" volumeMounts: - name: ditto-log-files-directory @@ -147,7 +147,7 @@ spec: containerPort: 2551 protocol: TCP - name: management - containerPort: 8558 + containerPort: 7626 protocol: TCP readinessProbe: httpGet: @@ -179,7 +179,7 @@ spec: - name: TZ value: "Europe/Berlin" - name: JAVA_TOOL_OPTIONS - value: "-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=30s" + value: "-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=30s" - name: MONGO_DB_HOSTNAME value: "mongodb" # in order to read the MONGO_DB_URI from a kubernetes secret replace the above lines for MONGO_DB_HOSTNAME with the following ones @@ -238,7 +238,7 @@ spec: # cpu: "1" # memory: "512Mi" # limits: - # # cpu: "" no cpu limit to avoid CFS scheduler limits see https://doc.akka.io/docs/akka/snapshot/additional/deploy.html#in-kubernetes + # # cpu: "" no cpu limit to avoid CFS scheduler limits see https://pekko.apache.org/docs/pekko/current/additional/deploy.html#in-kubernetes # memory: "2Gi" volumeMounts: - name: ditto-log-files-directory @@ -248,7 +248,7 @@ spec: containerPort: 2551 protocol: TCP - name: management - containerPort: 8558 + containerPort: 7626 protocol: TCP readinessProbe: httpGet: @@ -280,7 +280,7 @@ spec: - name: TZ value: "Europe/Berlin" - name: JAVA_TOOL_OPTIONS - value: "-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=30s" + value: "-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=30s" - name: MONGO_DB_HOSTNAME value: "mongodb" # in order to read the MONGO_DB_URI from a kubernetes secret replace the above lines for MONGO_DB_HOSTNAME with the following ones @@ -339,7 +339,7 @@ spec: # cpu: "1" # memory: "1Gi" # limits: - # # cpu: "" no cpu limit to avoid CFS scheduler limits see https://doc.akka.io/docs/akka/snapshot/additional/deploy.html#in-kubernetes + # # cpu: "" no cpu limit to avoid CFS scheduler limits see https://pekko.apache.org/docs/pekko/current/additional/deploying.html#deploying-to-kubernetes # memory: "2Gi" volumeMounts: - name: ditto-log-files-directory @@ -349,7 +349,7 @@ spec: containerPort: 2551 protocol: TCP - name: management - containerPort: 8558 + containerPort: 7626 protocol: TCP readinessProbe: httpGet: @@ -381,7 +381,7 @@ spec: - name: TZ value: "Europe/Berlin" - name: JAVA_TOOL_OPTIONS - value: "-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=30s" + value: "-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=30s" - name: MONGO_DB_HOSTNAME value: "mongodb" # in order to read the MONGO_DB_URI from a kubernetes secret replace the above lines for MONGO_DB_HOSTNAME with the following ones @@ -439,7 +439,7 @@ spec: # cpu: "1" # memory: "512Mi" # limits: - # # cpu: "{{ item.cpus }}" no cpu limit to avoid CFS scheduler limits see https://doc.akka.io/docs/akka/snapshot/additional/deploy.html#in-kubernetes + # # cpu: "{{ item.cpus }}" no cpu limit to avoid CFS scheduler limits see https://pekko.apache.org/docs/pekko/current/additional/deploying.html#deploying-to-kubernetes # memory: "2Gi" volumeMounts: - name: ditto-log-files-directory @@ -449,7 +449,7 @@ spec: containerPort: 2551 protocol: TCP - name: management - containerPort: 8558 + containerPort: 7626 protocol: TCP readinessProbe: httpGet: @@ -483,7 +483,7 @@ spec: - name: TZ value: "Europe/Berlin" - name: JAVA_TOOL_OPTIONS - value: "-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=10s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=30s" + value: "-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=30s" # in order to write logs into a file you can enable this by setting the following env variable # the log file(s) can be found in /var/log/ditto directory on the host machine #- name: DITTO_LOGGING_FILE_APPENDER diff --git a/deployment/openshift/README.md b/deployment/openshift/README.md index feabccf678..e910d6ef6f 100644 --- a/deployment/openshift/README.md +++ b/deployment/openshift/README.md @@ -28,7 +28,7 @@ Running OpenShift cluster with at least developer access. ## Start Eclipse Ditto ### Apply the pod reader role -This is necessary for the pods to access the Kubernetes API and then build the akka cluster. +This is necessary for the pods to access the Kubernetes API and then build the pekko cluster. ```bash cd oc apply -f pod-reader-role.yaml diff --git a/deployment/openshift/ditto/ditto-cluster.yaml b/deployment/openshift/ditto/ditto-cluster.yaml index 0665caeca4..b9cb22e3bc 100644 --- a/deployment/openshift/ditto/ditto-cluster.yaml +++ b/deployment/openshift/ditto/ditto-cluster.yaml @@ -29,7 +29,7 @@ spec: containerPort: 2551 protocol: TCP - name: management - containerPort: 8558 + containerPort: 7626 protocol: TCP readinessProbe: httpGet: @@ -49,7 +49,7 @@ spec: requests: memory: "512Mi" limits: - # cpu: "" no cpu limit to avoid CFS scheduler limits see https://doc.akka.io/docs/akka/snapshot/additional/deploy.html#in-kubernetes + # cpu: "" no cpu limit to avoid CFS scheduler limits see https://pekko.apache.org/docs/pekko/current/additional/deploying.html#in-kubernetes memory: "512Mi" env: - name: INSTANCE_INDEX @@ -68,7 +68,7 @@ spec: - name: TZ value: "Europe/Berlin" - name: JAVA_TOOL_OPTIONS - value: "-XX:+ExitOnOutOfMemoryError -Xtune:virtualized -Xss512k -XX:MaxRAMPercentage=80 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=120s -Dakka.cluster.distributed-data.durable.lmdb.dir=/var/tmp/ddata" + value: "-XX:+ExitOnOutOfMemoryError -Xtune:virtualized -Xss512k -XX:MaxRAMPercentage=80 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=120s -Dpekko.cluster.distributed-data.durable.lmdb.dir=/var/tmp/ddata" - name: MONGO_DB_URI valueFrom: secretKeyRef: @@ -102,7 +102,7 @@ spec: containerPort: 2551 protocol: TCP - name: management - containerPort: 8558 + containerPort: 7626 protocol: TCP readinessProbe: httpGet: @@ -122,7 +122,7 @@ spec: requests: memory: "512Mi" limits: - # cpu: "" no cpu limit to avoid CFS scheduler limits see https://doc.akka.io/docs/akka/snapshot/additional/deploy.html#in-kubernetes + # cpu: "" no cpu limit to avoid CFS scheduler limits see https://pekko.apache.org/docs/pekko/current/additional/deploying.html#in-kubernetes memory: "512Mi" env: - name: INSTANCE_INDEX @@ -141,7 +141,7 @@ spec: - name: TZ value: "Europe/Berlin" - name: JAVA_TOOL_OPTIONS - value: "-XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=75 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=3s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=7s" + value: "-XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=75 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=3s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=7s" - name: MONGO_DB_URI valueFrom: secretKeyRef: @@ -174,7 +174,7 @@ spec: containerPort: 2551 protocol: TCP - name: management - containerPort: 8558 + containerPort: 7626 protocol: TCP readinessProbe: httpGet: @@ -194,7 +194,7 @@ spec: requests: memory: "512Mi" limits: - # cpu: "" no cpu limit to avoid CFS scheduler limits see https://doc.akka.io/docs/akka/snapshot/additional/deploy.html#in-kubernetes + # cpu: "" no cpu limit to avoid CFS scheduler limits see https://pekko.apache.org/docs/pekko/current/additional/deploying.html#in-kubernetes memory: "512Mi" env: - name: INSTANCE_INDEX @@ -212,7 +212,7 @@ spec: - name: TZ value: "Europe/Berlin" - name: JAVA_TOOL_OPTIONS - value: "-XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=75 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=3s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=7s" + value: "-XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=75 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=3s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=7s" - name: MONGO_DB_URI valueFrom: secretKeyRef: @@ -245,7 +245,7 @@ spec: containerPort: 2551 protocol: TCP - name: management - containerPort: 8558 + containerPort: 7626 protocol: TCP readinessProbe: httpGet: @@ -265,7 +265,7 @@ spec: requests: memory: "512Mi" limits: - # cpu: "" no cpu limit to avoid CFS scheduler limits see https://doc.akka.io/docs/akka/snapshot/additional/deploy.html#in-kubernetes + # cpu: "" no cpu limit to avoid CFS scheduler limits see https://pekko.apache.org/docs/pekko/current/additional/deploying.html#in-kubernetes memory: "512Mi" env: - name: INSTANCE_INDEX @@ -284,7 +284,7 @@ spec: - name: TZ value: "Europe/Berlin" - name: JAVA_TOOL_OPTIONS - value: "-XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=75 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=3s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=7s" + value: "-XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=75 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=3s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=7s" - name: MONGO_DB_URI valueFrom: secretKeyRef: @@ -317,7 +317,7 @@ spec: containerPort: 2551 protocol: TCP - name: management - containerPort: 8558 + containerPort: 7626 protocol: TCP readinessProbe: httpGet: @@ -337,7 +337,7 @@ spec: requests: memory: "512Mi" limits: - # cpu: "" no cpu limit to avoid CFS scheduler limits see https://doc.akka.io/docs/akka/snapshot/additional/deploy.html#in-kubernetes + # cpu: "" no cpu limit to avoid CFS scheduler limits see https://pekko.apache.org/docs/pekko/current/additional/deploy.html#in-kubernetes memory: "512Mi" env: - name: ENABLE_PRE_AUTHENTICATION @@ -360,7 +360,7 @@ spec: - name: TZ value: "Europe/Berlin" - name: JAVA_TOOL_OPTIONS - value: "-XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=75 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dakka.coordinated-shutdown.exit-jvm=on -Dakka.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dakka.cluster.failure-detector.threshold=15.0 -Dakka.cluster.failure-detector.expected-response-after=3s -Dakka.cluster.failure-detector.acceptable-heartbeat-pause=7s" + value: "-XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=75 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=60s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=3s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=7s" - name: DEVOPS_PASSWORD value: "dittoPW1!" --- diff --git a/deployment/operations/grafana-dashboards/Akka.json b/deployment/operations/grafana-dashboards/Akka.json index 32d6e089ed..1846681fd5 100644 --- a/deployment/operations/grafana-dashboards/Akka.json +++ b/deployment/operations/grafana-dashboards/Akka.json @@ -178,7 +178,7 @@ }, "timepicker": {}, "timezone": "", - "title": "Akka", + "title": "Pekko", "uid": "HQzg96fMz", "version": 5, "weekStart": "" diff --git a/deployment/operations/grafana-dashboards/Akka_Dispatcher_Metrics.json b/deployment/operations/grafana-dashboards/Akka_Dispatcher_Metrics.json index 9b36113fb7..3be97cfe27 100644 --- a/deployment/operations/grafana-dashboards/Akka_Dispatcher_Metrics.json +++ b/deployment/operations/grafana-dashboards/Akka_Dispatcher_Metrics.json @@ -18,7 +18,7 @@ } ] }, - "description": "The Dispatchers instrumentation captures metrics on the underlying executor service for Akka dispatchers.", + "description": "The Dispatchers instrumentation captures metrics on the underlying executor service for Pekko dispatchers.", "editable": true, "fiscalYearStartMonth": 0, "gnetId": 12315, @@ -651,7 +651,7 @@ "schemaVersion": 36, "style": "dark", "tags": [ - "akka", + "pekko", "dispatcher" ], "templating": { @@ -863,7 +863,7 @@ ] }, "timezone": "browser", - "title": "Akka Dispatcher Metrics", + "title": "Pekko Dispatcher Metrics", "uid": "cJ8qaziVz", "version": 33, "weekStart": "" diff --git a/deployment/operations/grafana-dashboards/Cluster_traffic.json b/deployment/operations/grafana-dashboards/Cluster_traffic.json index 8723f3e16b..3fb6b1a344 100644 --- a/deployment/operations/grafana-dashboards/Cluster_traffic.json +++ b/deployment/operations/grafana-dashboards/Cluster_traffic.json @@ -986,14 +986,14 @@ "pluginVersion": "8.5.6", "targets": [ { - "expr": "sum(rate(akka_persistence_mongo_journal_scala_official_write_append_seconds_count[1m]))", + "expr": "sum(rate(pekko_persistence_mongo_journal_scala_official_write_append_seconds_count[1m]))", "format": "time_series", "intervalFactor": 1, "legendFormat": "inserts", "refId": "A" }, { - "expr": "sum(rate(akka_persistence_mongo_journal_scala_official_read_max_seq_seconds_count[1m]))", + "expr": "sum(rate(pekko_persistence_mongo_journal_scala_official_read_max_seq_seconds_count[1m]))", "format": "time_series", "intervalFactor": 1, "legendFormat": "reads", @@ -1014,7 +1014,7 @@ }, "id": 26, "panels": [], - "title": "Akka Remoting", + "title": "Pekko Remoting", "type": "row" }, { @@ -1049,7 +1049,7 @@ "for": "0m", "frequency": "1m", "handler": 1, - "name": "Akka Remoting Dropped messages alert", + "name": "Pekko Remoting Dropped messages alert", "noDataState": "no_data", "notifications": [] }, @@ -1144,13 +1144,13 @@ "type": "count" } ], - "query": "logger_name:\"akka.remote.RemoteActorRef\" AND message:\"was dropped. Due to overflow of send queue\"", + "query": "logger_name:\"org.apache.pekko.remote.RemoteActorRef\" AND message:\"was dropped. Due to overflow of send queue\"", "queryType": "randomWalk", "refId": "A", "timeField": "@timestamp" } ], - "title": "Akka Remoting Dropped messages per minute", + "title": "Pekko Remoting Dropped messages per minute", "type": "timeseries" } ], diff --git a/deployment/operations/grafana-dashboards/External_Metrics.json b/deployment/operations/grafana-dashboards/External_Metrics.json index 67b79c3f72..26793438d9 100644 --- a/deployment/operations/grafana-dashboards/External_Metrics.json +++ b/deployment/operations/grafana-dashboards/External_Metrics.json @@ -88,27 +88,27 @@ "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.5, sum(irate(akka_persistence_mongo_journal_scala_official_write_append_seconds_bucket{job=~\"$Application\", instance=~\"$Instance\"}[5m]) > 0) by (le, job, instance))", + "expr": "histogram_quantile(0.5, sum(irate(pekko_persistence_mongo_journal_scala_official_write_append_seconds_bucket{job=~\"$Application\", instance=~\"$Instance\"}[5m]) > 0) by (le, job, instance))", "format": "time_series", "hide": false, "intervalFactor": 1, "legendFormat": "{{job}} ({{instance}}) - mean", "refId": "A", - "target": "aliasByNode(stats.gauges.$Application.$Host.akka-persistence-mongo.journal.casbah.write.append.timer.p50, 2, 3, -1)", + "target": "aliasByNode(stats.gauges.$Application.$Host.pekko-persistence-mongo.journal.casbah.write.append.timer.p50, 2, 3, -1)", "textEditor": true }, { - "expr": "histogram_quantile(0.95, sum(irate(akka_persistence_mongo_journal_scala_official_write_append_seconds_bucket{job=~\"$Application\", instance=~\"$Instance\"}[5m]) > 0) by (le, job, instance))", + "expr": "histogram_quantile(0.95, sum(irate(pekko_persistence_mongo_journal_scala_official_write_append_seconds_bucket{job=~\"$Application\", instance=~\"$Instance\"}[5m]) > 0) by (le, job, instance))", "format": "time_series", "hide": false, "intervalFactor": 1, "legendFormat": "{{job}} ({{instance}}) - 95th percentile", "refId": "B", - "target": "aliasByNode(stats.gauges.$Application.$Host.akka-persistence-mongo.journal.casbah.write.append.timer.p95, 2, 3, -1)", + "target": "aliasByNode(stats.gauges.$Application.$Host.pekko-persistence-mongo.journal.casbah.write.append.timer.p95, 2, 3, -1)", "textEditor": true }, { - "expr": "histogram_quantile(0.5, sum(irate(akka_persistence_mongo_journal_scala_official_write_append_seconds_bucket{job=\"things\"}[5m]) > 0) by (le)) or vector(0)", + "expr": "histogram_quantile(0.5, sum(irate(pekko_persistence_mongo_journal_scala_official_write_append_seconds_bucket{job=\"things\"}[5m]) > 0) by (le)) or vector(0)", "format": "time_series", "hide": true, "intervalFactor": 1, @@ -216,33 +216,33 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(akka_persistence_mongo_journal_scala_official_write_append_seconds_count{job=~\"$Application\", instance=~\"$Instance\"}[1m]))", + "expr": "sum(rate(pekko_persistence_mongo_journal_scala_official_write_append_seconds_count{job=~\"$Application\", instance=~\"$Instance\"}[1m]))", "format": "time_series", "hide": false, "intervalFactor": 1, "legendFormat": "inserts/seconds (1m)", "refId": "A", - "target": "alias(sumSeries(stats.gauges.$Application.$Host.akka-persistence-mongo.journal.casbah.write.append.timer.m1_rate), 'inserts/second 1min')", + "target": "alias(sumSeries(stats.gauges.$Application.$Host.pekko-persistence-mongo.journal.casbah.write.append.timer.m1_rate), 'inserts/second 1min')", "textEditor": true }, { - "expr": "sum(rate(akka_persistence_mongo_journal_scala_official_write_append_seconds_count{job=~\"$Application\", instance=~\"$Instance\"}[5m]))", + "expr": "sum(rate(pekko_persistence_mongo_journal_scala_official_write_append_seconds_count{job=~\"$Application\", instance=~\"$Instance\"}[5m]))", "format": "time_series", "hide": false, "intervalFactor": 1, "legendFormat": "inserts/seconds (5m)", "refId": "C", - "target": "alias(sumSeries(stats.gauges.$Application.$Host.akka-persistence-mongo.journal.casbah.write.append.timer.m5_rate), 'inserts/second 5min')", + "target": "alias(sumSeries(stats.gauges.$Application.$Host.pekko-persistence-mongo.journal.casbah.write.append.timer.m5_rate), 'inserts/second 5min')", "textEditor": true }, { - "expr": "sum(rate(akka_persistence_mongo_journal_scala_official_write_append_seconds_count{job=~\"$Application\", instance=~\"$Instance\"}[15m]))", + "expr": "sum(rate(pekko_persistence_mongo_journal_scala_official_write_append_seconds_count{job=~\"$Application\", instance=~\"$Instance\"}[15m]))", "format": "time_series", "hide": false, "intervalFactor": 1, "legendFormat": "inserts/seconds (15m)", "refId": "D", - "target": "alias(sumSeries(stats.gauges.$Application.$Host.akka-persistence-mongo.journal.casbah.write.append.timer.m15_rate), 'inserts/second 15min')", + "target": "alias(sumSeries(stats.gauges.$Application.$Host.pekko-persistence-mongo.journal.casbah.write.append.timer.m15_rate), 'inserts/second 15min')", "textEditor": true } ], @@ -355,23 +355,23 @@ "steppedLine": false, "targets": [ { - "expr": "histogram_quantile(0.5, sum(irate(akka_persistence_mongo_journal_scala_official_read_max_seq_seconds_bucket{job=~\"$Application\", instance=~\"$Instance\"}[5m]) > 0) by (le, job, instance))", + "expr": "histogram_quantile(0.5, sum(irate(pekko_persistence_mongo_journal_scala_official_read_max_seq_seconds_bucket{job=~\"$Application\", instance=~\"$Instance\"}[5m]) > 0) by (le, job, instance))", "format": "time_series", "hide": false, "intervalFactor": 1, "legendFormat": "{{job}} ({{instance}}) - mean", "refId": "C", - "target": "aliasByNode(stats.gauges.$Application.$Host.akka-persistence-mongo.journal.casbah.read.replay.timer.p50, 2, 3, -1)", + "target": "aliasByNode(stats.gauges.$Application.$Host.pekko-persistence-mongo.journal.casbah.read.replay.timer.p50, 2, 3, -1)", "textEditor": true }, { - "expr": "histogram_quantile(0.95, sum(irate(akka_persistence_mongo_journal_scala_official_read_max_seq_seconds_bucket{job=~\"$Application\", instance=~\"$Instance\"}[5m]) > 0) by (le, job, instance))", + "expr": "histogram_quantile(0.95, sum(irate(pekko_persistence_mongo_journal_scala_official_read_max_seq_seconds_bucket{job=~\"$Application\", instance=~\"$Instance\"}[5m]) > 0) by (le, job, instance))", "format": "time_series", "hide": false, "intervalFactor": 1, "legendFormat": "{{job}} ({{instance}}) - 95th percentile", "refId": "D", - "target": "aliasByNode(stats.gauges.$Application.$Host.akka-persistence-mongo.journal.casbah.read.replay.timer.p95, 2, 3, -1)", + "target": "aliasByNode(stats.gauges.$Application.$Host.pekko-persistence-mongo.journal.casbah.read.replay.timer.p95, 2, 3, -1)", "textEditor": true } ], @@ -469,33 +469,33 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(akka_persistence_mongo_journal_scala_official_read_max_seq_seconds_count{job=~\"$Application\", instance=~\"$Instance\"}[1m]))", + "expr": "sum(rate(pekko_persistence_mongo_journal_scala_official_read_max_seq_seconds_count{job=~\"$Application\", instance=~\"$Instance\"}[1m]))", "format": "time_series", "hide": false, "intervalFactor": 1, "legendFormat": "reads/second (1m)", "refId": "B", - "target": "alias(sumSeries(stats.gauges.$Application.$Host.akka-persistence-mongo.journal.casbah.read.replay.timer.m1_rate), 'reads/second 1min')", + "target": "alias(sumSeries(stats.gauges.$Application.$Host.pekko-persistence-mongo.journal.casbah.read.replay.timer.m1_rate), 'reads/second 1min')", "textEditor": true }, { - "expr": "sum(rate(akka_persistence_mongo_journal_scala_official_read_max_seq_seconds_count{job=~\"$Application\", instance=~\"$Instance\"}[5m]))", + "expr": "sum(rate(pekko_persistence_mongo_journal_scala_official_read_max_seq_seconds_count{job=~\"$Application\", instance=~\"$Instance\"}[5m]))", "format": "time_series", "hide": false, "intervalFactor": 1, "legendFormat": "reads/second (5m)", "refId": "E", - "target": "alias(sumSeries(stats.gauges.$Application.$Host.akka-persistence-mongo.journal.casbah.read.replay.timer.m5_rate), 'reads/second 5min')", + "target": "alias(sumSeries(stats.gauges.$Application.$Host.pekko-persistence-mongo.journal.casbah.read.replay.timer.m5_rate), 'reads/second 5min')", "textEditor": true }, { - "expr": "sum(rate(akka_persistence_mongo_journal_scala_official_read_max_seq_seconds_count{job=~\"$Application\", instance=~\"$Instance\"}[15m]))", + "expr": "sum(rate(pekko_persistence_mongo_journal_scala_official_read_max_seq_seconds_count{job=~\"$Application\", instance=~\"$Instance\"}[15m]))", "format": "time_series", "hide": false, "intervalFactor": 1, "legendFormat": "reads/second (15m)", "refId": "F", - "target": "alias(sumSeries(stats.gauges.$Application.$Host.akka-persistence-mongo.journal.casbah.read.replay.timer.m15_rate), 'reads/second 15min')", + "target": "alias(sumSeries(stats.gauges.$Application.$Host.pekko-persistence-mongo.journal.casbah.read.replay.timer.m15_rate), 'reads/second 15min')", "textEditor": true } ], @@ -785,7 +785,7 @@ "name": "Application", "options": [], "query": { - "query": "label_values(akka_persistence_mongo_journal_scala_official_read_max_seq_seconds_bucket, job)", + "query": "label_values(pekko_persistence_mongo_journal_scala_official_read_max_seq_seconds_bucket, job)", "refId": "prometheus-Application-Variable-Query" }, "refresh": 1, diff --git a/deployment/operations/grafana-dashboards/Load_Test.json b/deployment/operations/grafana-dashboards/Load_Test.json index 6c0544e730..4169fc1d5e 100644 --- a/deployment/operations/grafana-dashboards/Load_Test.json +++ b/deployment/operations/grafana-dashboards/Load_Test.json @@ -312,14 +312,14 @@ "pluginVersion": "8.5.6", "targets": [ { - "expr": "sum(rate(akka_persistence_mongo_journal_scala_official_write_append_seconds_count[1m]))", + "expr": "sum(rate(pekko_persistence_mongo_journal_scala_official_write_append_seconds_count[1m]))", "format": "time_series", "intervalFactor": 1, "legendFormat": "inserts", "refId": "A" }, { - "expr": "sum(rate(akka_persistence_mongo_journal_scala_official_read_max_seq_seconds_count[1m]))", + "expr": "sum(rate(pekko_persistence_mongo_journal_scala_official_read_max_seq_seconds_count[1m]))", "format": "time_series", "intervalFactor": 1, "legendFormat": "reads", diff --git a/deployment/operations/grafana-dashboards/Persistence_Entities.json b/deployment/operations/grafana-dashboards/Persistence_Entities.json index f69715730d..79199b623f 100644 --- a/deployment/operations/grafana-dashboards/Persistence_Entities.json +++ b/deployment/operations/grafana-dashboards/Persistence_Entities.json @@ -12,7 +12,7 @@ } ] }, - "description": "Dashboard which shows Entities managed by Akka Persistence", + "description": "Dashboard which shows Entities managed by Pekko Persistence", "editable": true, "gnetId": null, "graphTooltip": 0, @@ -165,7 +165,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(irate(akka_persistence_mongo_journal_scala_official_write_append_seconds_count{job=\"things\"}[5m]))", + "expr": "sum(irate(pekko_persistence_mongo_journal_scala_official_write_append_seconds_count{job=\"things\"}[5m]))", "interval": "", "legendFormat": "persisted events", "queryType": "randomWalk", @@ -366,7 +366,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(irate(akka_persistence_mongo_journal_scala_official_write_append_seconds_count{job=\"policies\"}[5m]))", + "expr": "sum(irate(pekko_persistence_mongo_journal_scala_official_write_append_seconds_count{job=\"policies\"}[5m]))", "interval": "", "legendFormat": "persisted events", "queryType": "randomWalk", @@ -567,7 +567,7 @@ "targets": [ { "exemplar": true, - "expr": "sum(irate(akka_persistence_mongo_journal_scala_official_write_append_seconds_count{job=\"connectivity\"}[5m]))", + "expr": "sum(irate(pekko_persistence_mongo_journal_scala_official_write_append_seconds_count{job=\"connectivity\"}[5m]))", "interval": "", "legendFormat": "persisted events", "queryType": "randomWalk", diff --git a/documentation/src/main/resources/_posts/2019-08-28-openid-connect.md b/documentation/src/main/resources/_posts/2019-08-28-openid-connect.md index f8decd4b27..10f9d6aa0b 100644 --- a/documentation/src/main/resources/_posts/2019-08-28-openid-connect.md +++ b/documentation/src/main/resources/_posts/2019-08-28-openid-connect.md @@ -20,7 +20,7 @@ Follow their [installation guide](https://www.ory.sh/docs/next/hydra/configure-d #### Configuration Download the self-signed certificate form the ORY Hydra server: https://localhost:9000/.well-known/openid-configuration -Use the downloaded certificate for the akka-http ssl configuration. +Use the downloaded certificate for the pekko-http ssl configuration. ```hocon ssl-config { trustManager = { diff --git a/documentation/src/main/resources/_posts/2021-05-06-release-announcement-200.md b/documentation/src/main/resources/_posts/2021-05-06-release-announcement-200.md index bbc03474c9..aa7ba5ec62 100644 --- a/documentation/src/main/resources/_posts/2021-05-06-release-announcement-200.md +++ b/documentation/src/main/resources/_posts/2021-05-06-release-announcement-200.md @@ -54,7 +54,7 @@ The following non-functional enhancements are also included: * Improvement of stability during rolling updates * Addition of sharding concept for Ditto internal pub/sub enabling connection of e.g. tens of thousands Websocket sessions * Background cleanup improvements in order to have less impact on DB roundtrip times -* Update of third party libraries (e.g. Akka) +* Update of third party libraries (e.g. Pekko) * Documentation of deployment via K3S Please have a look at the [2.0.0 release notes](release_notes_200.html) for a more detailed information on the release. diff --git a/documentation/src/main/resources/architecture/DADR-0002-replace-akka-pubsub-for-event-publishing.md b/documentation/src/main/resources/architecture/DADR-0002-replace-akka-pubsub-for-event-publishing.md index ca5302c3ad..aa79fb2675 100644 --- a/documentation/src/main/resources/architecture/DADR-0002-replace-akka-pubsub-for-event-publishing.md +++ b/documentation/src/main/resources/architecture/DADR-0002-replace-akka-pubsub-for-event-publishing.md @@ -8,7 +8,7 @@ accepted ## Context -Up to now Ditto used Akka's distributed publish/subscribe in order to emit e.g. `ThingEvent`s to interested other services: +Up to now Ditto used Pekko's distributed publish/subscribe in order to emit e.g. `ThingEvent`s to interested other services: * gateway * websocket/SSE sessions publishing events @@ -30,12 +30,12 @@ We will implement a custom Ditto pub/sub which * uses "authorization subjects" as topics when subscribing * uses "read subjects" as topics when publishing -* manages and distributes the active subscriptions via Akka Distributed Data (ddata) +* manages and distributes the active subscriptions via Pekko Distributed Data (ddata) * emits `ThingEvent`s only to service instances where at least one consumer consumes the event ## Consequences -The event publishing is no longer implemented by a proven and stable Akka feature but lies in our own +The event publishing is no longer implemented by a proven and stable Pekko feature but lies in our own responsibility. This has upsides (we can implement it just the way we need it) as well as downsides (we might add bugs which were not). diff --git a/documentation/src/main/resources/architecture/DADR-0003-do-not-interrupt-threads.md b/documentation/src/main/resources/architecture/DADR-0003-do-not-interrupt-threads.md index f1f3dedbc7..ea55efe3af 100644 --- a/documentation/src/main/resources/architecture/DADR-0003-do-not-interrupt-threads.md +++ b/documentation/src/main/resources/architecture/DADR-0003-do-not-interrupt-threads.md @@ -22,11 +22,11 @@ We will ignore [RSPEC-2142](https://rules.sonarsource.com/java/tag/multi-threadi ## Consequences The best way to deal with `InterruptedException` is not catching it at all. -Leave it to Akka to handle low-level concurrency errors. -Use Akka's `CompletionStage` APIs instead of blocking-wait whenever possible. +Leave it to Pekko to handle low-level concurrency errors. +Use Pekko's `CompletionStage` APIs instead of blocking-wait whenever possible. Use `CompletableFuture.join()` instead of `CompletableFuture.get()` in tests. Where blocking-wait cannot be avoided, the actors executing blocking wait should execute in their own dispatcher to not starve the actor system of threads. Use -[PinnedDispatcher](https://doc.akka.io/docs/akka/current/dispatchers.html) +[PinnedDispatcher](https://pekko.apache.org/docs/pekko/current/dispatchers.html) for example to give each blocking actor its own thread. diff --git a/documentation/src/main/resources/jsonschema/connection.json b/documentation/src/main/resources/jsonschema/connection.json index 9611751057..40d2594a06 100644 --- a/documentation/src/main/resources/jsonschema/connection.json +++ b/documentation/src/main/resources/jsonschema/connection.json @@ -666,7 +666,7 @@ "$id": "/properties/clientCount", "type": "integer", "title": "Client count", - "description": "The client count defines how many clients are instantiated for this connection. Each client opens a separate 'physical' connection and thus raises the overall availability and throughput of the connection. Clients are always instantiated on separate AKKA cluster nodes while having only a single client per node. Therefore the max client count is limited by the number of cluster nodes.", + "description": "The client count defines how many clients are instantiated for this connection. Each client opens a separate 'physical' connection and thus raises the overall availability and throughput of the connection. Clients are always instantiated on separate PEKKO cluster nodes while having only a single client per node. Therefore the max client count is limited by the number of cluster nodes.", "default": 1, "minimum": 1, "maximum": 9, diff --git a/documentation/src/main/resources/jsonschema/piggyback-command.json b/documentation/src/main/resources/jsonschema/piggyback-command.json index d77bf40cc3..1ae967a654 100644 --- a/documentation/src/main/resources/jsonschema/piggyback-command.json +++ b/documentation/src/main/resources/jsonschema/piggyback-command.json @@ -7,7 +7,7 @@ "$id": "/properties/targetActorSelection", "type": "string", "title": "Target actor selection", - "description": "Selects the AKKA actors which should receive this command", + "description": "Selects the PEKKO actors which should receive this command", "examples": [ "/system/sharding/connection" ] diff --git a/documentation/src/main/resources/openapi/ditto-api-2.yml b/documentation/src/main/resources/openapi/ditto-api-2.yml index 5c3f0d90c9..f4322172a3 100644 --- a/documentation/src/main/resources/openapi/ditto-api-2.yml +++ b/documentation/src/main/resources/openapi/ditto-api-2.yml @@ -7403,7 +7403,7 @@ paths: example: |- { "level": "info", - "logger": "akka.actor.CoordinatedShutdown" + "logger": "org.apache.pekko.actor.CoordinatedShutdown" } responses: '201': @@ -7459,7 +7459,7 @@ paths: example: |- { "level": "info", - "logger": "akka.actor.CoordinatedShutdown" + "logger": "org.apache.pekko.actor.CoordinatedShutdown" } responses: '201': @@ -7588,7 +7588,7 @@ paths: /devops/piggyback: post: summary: Send a piggyback command - description: Send a piggyback command to Akka’s pub-sub-mediator + description: Send a piggyback command to Pekko’s pub-sub-mediator security: - DevOpsBasic: [] - DevOpsBearer: [] diff --git a/documentation/src/main/resources/openapi/sources/paths/logging/logging.yml b/documentation/src/main/resources/openapi/sources/paths/logging/logging.yml index 32de39fff0..64eb5797b7 100644 --- a/documentation/src/main/resources/openapi/sources/paths/logging/logging.yml +++ b/documentation/src/main/resources/openapi/sources/paths/logging/logging.yml @@ -51,7 +51,7 @@ put: example: |- { "level": "info", - "logger": "akka.actor.CoordinatedShutdown" + "logger": "org.apache.pekko.actor.CoordinatedShutdown" } responses: '201': diff --git a/documentation/src/main/resources/openapi/sources/paths/logging/moduleName.yml b/documentation/src/main/resources/openapi/sources/paths/logging/moduleName.yml index a1c1ad92b4..2d3a020ab3 100644 --- a/documentation/src/main/resources/openapi/sources/paths/logging/moduleName.yml +++ b/documentation/src/main/resources/openapi/sources/paths/logging/moduleName.yml @@ -55,7 +55,7 @@ put: example: |- { "level": "info", - "logger": "akka.actor.CoordinatedShutdown" + "logger": "org.apache.pekko.actor.CoordinatedShutdown" } responses: '201': diff --git a/documentation/src/main/resources/openapi/sources/paths/piggyback/piggyback.yml b/documentation/src/main/resources/openapi/sources/paths/piggyback/piggyback.yml index 55fe413a23..268a748679 100644 --- a/documentation/src/main/resources/openapi/sources/paths/piggyback/piggyback.yml +++ b/documentation/src/main/resources/openapi/sources/paths/piggyback/piggyback.yml @@ -10,7 +10,7 @@ # SPDX-License-Identifier: EPL-2.0 post: summary: Send a piggyback command - description: Send a piggyback command to Akka’s pub-sub-mediator + description: Send a piggyback command to Pekko’s pub-sub-mediator security: - DevOpsBasic: [] - DevOpsBearer: [] diff --git a/documentation/src/main/resources/pages/ditto/architecture-overview.md b/documentation/src/main/resources/pages/ditto/architecture-overview.md index 9e200be58c..1bcc9aa377 100644 --- a/documentation/src/main/resources/pages/ditto/architecture-overview.md +++ b/documentation/src/main/resources/pages/ditto/architecture-overview.md @@ -27,7 +27,7 @@ The components have the following tasks: * persistence of [Connections](basic-connections.html) * sends [Ditto Protocol](protocol-overview.html) messages to external message brokers and receives messages from them -All services run in the same [Akka cluster](https://doc.akka.io/docs/akka/current/typed/cluster-concepts.html) and can +All services run in the same [Pekko cluster](https://pekko.apache.org/docs/pekko/current/typed/cluster-concepts.html) and can reach each other via TCP without the need for an additional message broker in between. ## Components @@ -43,7 +43,7 @@ A "microservice" in Ditto is defined as: ## Communication All microservices can communicate asynchronously in a Ditto cluster. Communication is done via -[Akka remoting](https://doc.akka.io/docs/akka/current/general/remoting.html) which means that each service acts as server, +[Pekko remoting](https://pekko.apache.org/docs/pekko/current/general/remoting.html) which means that each service acts as server, providing a TCP endpoint, as well as client sending data to other services. All messages which are sent between Ditto microservices must in a way be serializable and deserializable. diff --git a/documentation/src/main/resources/pages/ditto/architecture-services-connectivity.md b/documentation/src/main/resources/pages/ditto/architecture-services-connectivity.md index 102f8fe366..dc47211c60 100644 --- a/documentation/src/main/resources/pages/ditto/architecture-services-connectivity.md +++ b/documentation/src/main/resources/pages/ditto/architecture-services-connectivity.md @@ -31,7 +31,7 @@ Other services can communicate with the connectivity service via: ## Persistence -The connectivity service uses [Akka persistence](https://doc.akka.io/docs/akka/current/persistence.html?language=java) and +The connectivity service uses [Pekko persistence](https://pekko.apache.org/docs/pekko/current/persistence.html?language=java) and with that [Event sourcing](basic-signals.html#architectural-style) in order to persist changes to and restore persisted [connections](basic-connections.html). diff --git a/documentation/src/main/resources/pages/ditto/architecture-services-policies.md b/documentation/src/main/resources/pages/ditto/architecture-services-policies.md index e05292e3ca..ea231875a6 100644 --- a/documentation/src/main/resources/pages/ditto/architecture-services-policies.md +++ b/documentation/src/main/resources/pages/ditto/architecture-services-policies.md @@ -25,7 +25,7 @@ Other services can communicate with the policies service via: ## Persistence -The policies service uses [Akka persistence](https://doc.akka.io/docs/akka/current/persistence.html?language=java) and +The policies service uses [Pekko persistence](https://pekko.apache.org/docs/pekko/current/persistence.html?language=java) and with that [Event sourcing](basic-signals.html#architectural-style) in order to persist changes to and restore persisted [policies](basic-policy.html). diff --git a/documentation/src/main/resources/pages/ditto/architecture-services-things.md b/documentation/src/main/resources/pages/ditto/architecture-services-things.md index 0bdebcc0c2..8687e89225 100644 --- a/documentation/src/main/resources/pages/ditto/architecture-services-things.md +++ b/documentation/src/main/resources/pages/ditto/architecture-services-things.md @@ -24,7 +24,7 @@ Other services can communicate with the things service via: ## Persistence -The things service uses [Akka persistence](https://doc.akka.io/docs/akka/current/persistence.html?language=java) and +The things service uses [Pekko persistence](https://pekko.apache.org/docs/pekko/current/persistence.html?language=java) and with that [Event sourcing](basic-signals.html#architectural-style) in order to persist changes to and restore persisted [things](basic-thing.html). diff --git a/documentation/src/main/resources/pages/ditto/client-sdk-java.md b/documentation/src/main/resources/pages/ditto/client-sdk-java.md index 7cb500dd0e..ddc90f6aa2 100644 --- a/documentation/src/main/resources/pages/ditto/client-sdk-java.md +++ b/documentation/src/main/resources/pages/ditto/client-sdk-java.md @@ -221,10 +221,10 @@ Publisher> publisher = client.twin().search() .filter("eq(attributes/location,'kitchen')") // apply RQL expression here .options(builder -> builder.sort(s -> s.desc("thingId")).size(1)) ); -// integrate the publisher in the reactive streams library of your choice, e.g. Akka streams: -akka.stream.javadsl.Source things = akka.stream.javadsl.Source.fromPublisher(publisher) +// integrate the publisher in the reactive streams library of your choice, e.g. Pekko streams: +org.apache.pekko.stream.javadsl.Source things = org.apache.pekko.stream.javadsl.Source.fromPublisher(publisher) .flatMapConcat(Source::from); -// .. proceed working with the Akka Source .. +// .. proceed working with the Pekko Source .. ``` diff --git a/documentation/src/main/resources/pages/ditto/installation-extending.md b/documentation/src/main/resources/pages/ditto/installation-extending.md index 739764ae88..162780467e 100644 --- a/documentation/src/main/resources/pages/ditto/installation-extending.md +++ b/documentation/src/main/resources/pages/ditto/installation-extending.md @@ -6,18 +6,18 @@ permalink: installation-extending.html --- ## Create Extensions for Ditto -Ditto offers the possibility to execute custom behaviour by utilizing Akka extensions. The places which can be +Ditto offers the possibility to execute custom behaviour by utilizing Pekko extensions. The places which can be extended by such custom behaviour are marked by extending the `DittoExtensionPoint` interface. Add a new implementation of an interface extending `DittoExtensionPoint` for changing its behaviour. -The implementation needs a public constructor accepting an ActorSystem and Config, for the Akka Classloader to load +The implementation needs a public constructor accepting an ActorSystem and Config, for the Pekko Classloader to load the extension via reflection. ```java public CustomExtension(final ActorSystem actorSystem, final Config config) {} ``` ## Configure Extensions -In order for the Akka Classloader to load the correct implementation of a `DittoExtensionPoint`, the +In order for the Pekko Classloader to load the correct implementation of a `DittoExtensionPoint`, the implementation has to be configured. This can be done by adding the `CONFIG_KEY` of the extension either to the `-extension.conf` if the extension should only be loaded in specific services, or to the `reference.conf` for a global scope. diff --git a/documentation/src/main/resources/pages/ditto/installation-operating.md b/documentation/src/main/resources/pages/ditto/installation-operating.md index ed1182835a..934b228e18 100644 --- a/documentation/src/main/resources/pages/ditto/installation-operating.md +++ b/documentation/src/main/resources/pages/ditto/installation-operating.md @@ -5,7 +5,7 @@ keywords: operating, docker, docker-compose, devops, logging, logstash, elk, mon permalink: installation-operating.html --- -[pubsubmediator]: https://doc.akka.io/docs/akka/current/distributed-pub-sub.html +[pubsubmediator]: https://pekko.apache.org/docs/pekko/current/distributed-pub-sub.html Once you have successfully started Ditto, proceed with setting it up for continuous operation. @@ -26,8 +26,8 @@ the following environment variables in order to configure the connection to the * `MONGO_DB_CONNECTION_POOL_SIZE`: Configure MongoDB connection pool size * `MONGO_DB_READ_PREFERENCE`: Configure MongoDB read preference * `MONGO_DB_WRITE_CONCERN`: Configure MongoDB write concern -* `AKKA_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN`: Configure Akka Persistence MongoDB journal write concern -* `AKKA_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN`: Configure Akka Persistence MongoDB snapshot write concern +* `PEKKO_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN`: Configure Pekko Persistence MongoDB journal write concern +* `PEKKO_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN`: Configure Pekko Persistence MongoDB snapshot write concern ### Ditto configuration @@ -165,7 +165,7 @@ may be put in front of Ditto to handle the token-logic like e.g. loading/saving it to Ditto as `Authorization` header. **If the chosen OIDC provider uses a self-signed certificate**, the certificate has to be retrieved and configured for -the akka-http ssl configuration. +the pekko-http ssl configuration. ``` ssl-config { @@ -1161,7 +1161,7 @@ To do so safely, perform the following steps in sequence. ##### Block all messages to a namespace -Send a piggyback command to [Akka's pub-sub-mediator][pubsubmediator] with type `namespaces.commands:blockNamespace` +Send a piggyback command to [Pekko's pub-sub-mediator][pubsubmediator] with type `namespaces.commands:blockNamespace` to block all messages sent to actors belonging to a namespace. `PUT /devops/piggyback?timeout=10s` @@ -1194,7 +1194,7 @@ or until you proceed with [step 4](#unblock-messages-to-a-namespace), which unbl ##### Shutdown all actors in a namespace -Send a piggyback command to [Akka's pub-sub-mediator][pubsubmediator] with type `common.commands:shutdown` +Send a piggyback command to [Pekko's pub-sub-mediator][pubsubmediator] with type `common.commands:shutdown` to request all actors in a namespace to shut down. The value of `piggybackCommand/reason/type` must be `purge-namespace`; otherwise, the namespace's actors will not stop themselves. @@ -1219,7 +1219,7 @@ Feel free to send the shutdown command several times to make sure. ##### Erase all data in a namespace from the persistence -Send a piggyback command to [Akka's pub-sub-mediator][pubsubmediator] with type `namespaces.commands:purgeNamespace` +Send a piggyback command to [Pekko's pub-sub-mediator][pubsubmediator] with type `namespaces.commands:purgeNamespace` to erase all data from the persistence. It is better to purge a namespace after [blocking](#block-all-messages-to-a-namespace) it and @@ -1278,7 +1278,7 @@ Note that to see responses from multiple resource types, the header `aggregate` ##### Unblock messages to a namespace -Send a piggyback command to [Akka's pub-sub-mediator][pubsubmediator] with type `namespaces.commands:unblockNamespace` +Send a piggyback command to [Pekko's pub-sub-mediator][pubsubmediator] with type `namespaces.commands:unblockNamespace` to stop blocking messages to a namespace. `PUT /devops/piggyback?timeout=10s` diff --git a/documentation/src/main/resources/pages/ditto/release_notes_130.md b/documentation/src/main/resources/pages/ditto/release_notes_130.md index ee52e23efa..541385cec5 100644 --- a/documentation/src/main/resources/pages/ditto/release_notes_130.md +++ b/documentation/src/main/resources/pages/ditto/release_notes_130.md @@ -18,7 +18,7 @@ bugfixes were added. ### Changes -#### [Update Akka, Akka HTTP and Scala to latest versions](https://github.com/eclipse-ditto/ditto/issues/774) +#### [Update Pekko, Pekko HTTP and Scala to latest versions](https://github.com/eclipse-ditto/ditto/issues/774) The core libraries Ditto is built on were updated to their latest versions which should improve cluster stability and overall performance. diff --git a/documentation/src/main/resources/pages/ditto/release_notes_200.md b/documentation/src/main/resources/pages/ditto/release_notes_200.md index 43ea9d5f52..22b149796a 100644 --- a/documentation/src/main/resources/pages/ditto/release_notes_200.md +++ b/documentation/src/main/resources/pages/ditto/release_notes_200.md @@ -42,7 +42,7 @@ The following non-functional enhancements are also included: * Improvement of stability during rolling updates * Addition of sharding concept for Ditto internal pub/sub enabling connection of e.g. tens of thousands websocket sessions * Background cleanup improvements in order to have less impact on DB roundtrip times -* Update of third party libraries (e.g. Akka) +* Update of third party libraries (e.g. Pekko) * Documentation of deployment via K3S diff --git a/documentation/src/main/resources/pages/ditto/release_notes_212.md b/documentation/src/main/resources/pages/ditto/release_notes_212.md index e5819b1171..2255f60f8d 100644 --- a/documentation/src/main/resources/pages/ditto/release_notes_212.md +++ b/documentation/src/main/resources/pages/ditto/release_notes_212.md @@ -34,7 +34,7 @@ It should also reduce the consumer lag due to a lack of threads when there are a Previously, the JSON element order e.g. in arrays in a managed `connection` could be mixed up, e.g. from creation to persistence. This has been fixed by maintaining the JSON element order in the connection model. -#### [Updated to Akka HTTP 10.2.7 due to critical reported CVE](https://github.com/eclipse-ditto/ditto/pull/1222) +#### [Updated to Pekko HTTP 10.2.7 due to critical reported CVE](https://github.com/eclipse-ditto/ditto/pull/1222) The for Ditto's HTTP API used library contained a critical security issue -[CVE-2021-42697](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-42697) which has been resolved in Akka HTTP 10.2.7 +[CVE-2021-42697](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-42697) which has been resolved in Pekko HTTP 10.2.7 diff --git a/documentation/src/main/resources/pages/ditto/release_notes_230.md b/documentation/src/main/resources/pages/ditto/release_notes_230.md index 15b91da08a..af4cc5ad86 100644 --- a/documentation/src/main/resources/pages/ditto/release_notes_230.md +++ b/documentation/src/main/resources/pages/ditto/release_notes_230.md @@ -33,8 +33,8 @@ The following notable fixes are included: The following non-functional work is also included: * Update of several used dependencies: - * Akka: `2.6.18` - * Akka Management: `1.1.2` + * Pekko: `2.6.18` + * Pekko Management: `1.1.2` * Caffeine: `3.0.5` * Classindex: `3.11` * Cloudevents: `2.3.0` diff --git a/documentation/src/main/resources/pages/ditto/release_notes_332.md b/documentation/src/main/resources/pages/ditto/release_notes_332.md index f5d23c6c16..018590f425 100644 --- a/documentation/src/main/resources/pages/ditto/release_notes_332.md +++ b/documentation/src/main/resources/pages/ditto/release_notes_332.md @@ -23,9 +23,9 @@ We had to skip Ditto version 3.3.1, as there were errors in our release pipeline This is a complete list of the [merged pull requests](https://github.com/eclipse-ditto/ditto/pulls?q=is%3Apr+milestone%3A3.3.2). -#### [Fix blocking Akka dispatcher thread on WoT skeleton creation](https://github.com/eclipse-ditto/ditto/pull/1666) +#### [Fix blocking Pekko dispatcher thread on WoT skeleton creation](https://github.com/eclipse-ditto/ditto/pull/1666) -Ditto's [WoT integration](basic-wot-integration.html) did block the Akka dispatcher thread which could lead to deadlock +Ditto's [WoT integration](basic-wot-integration.html) did block the Pekko dispatcher thread which could lead to deadlock situations when e.g. creating new twins based on a WoT ThingModel. This was solved and the complete WoT operations are now executed asynchronously. diff --git a/documentation/src/main/resources/pages/ditto/release_notes_340.md b/documentation/src/main/resources/pages/ditto/release_notes_340.md new file mode 100644 index 0000000000..55ed449113 --- /dev/null +++ b/documentation/src/main/resources/pages/ditto/release_notes_340.md @@ -0,0 +1,54 @@ +--- +title: Release notes 3.4.0 +tags: [release_notes] +published: true +keywords: release notes, announcements, changelog +summary: "Version 3.4.0 of Eclipse Ditto, released on 13.09.2023" +permalink: release_notes_340.html +--- + +The fourth minor release of Ditto 3.x, Eclipse Ditto version 3.4.0 is here. + +This release is completely [IP (intellectual property) checked by the Eclipse Foundation](https://www.eclipse.org/projects/handbook/#ip) +meaning that project code as well as all used dependencies were "[...] reviewed to ensure that the copyrights +expressed are correct, licensing is valid and compatible, and that other issues have been uncovered and properly +investigated." + + +## Changelog + +Eclipse Ditto 3.4.0 focuses on the following areas: + +* Swapping the Akka framework (because of its switch of license to [BSL License](https://www.lightbend.com/akka/license-faq) after Akka v2.6.x) + with its fork [Apache Pekko](https://pekko.apache.org/docs/pekko/current/index.html) which is Apache 2.0 licensed. [#1477](https://github.com/eclipse-ditto/ditto/issues/1477) +* Improve logging by adding the W3C traceparent header as MDC field to logs [#1739](https://github.com/eclipse-ditto/ditto/issues/1739) +* Optimize docker files [#1744](https://github.com/eclipse-ditto/ditto/issues/1744) + +### Migrating to Ditto 3.4.x + +To migrate a running system with live data there are few configurations that should be overridden with Java system properties in the following services. + +Policies: +```markdown +* -Dpekko-contrib-mongodb-persistence-policies-journal.overrides.metadata-index=akka_persistence_metadata_pid +* -Dpekko-contrib-mongodb-persistence-policies-journal-read.overrides.metadata-index=akka_persistence_metadata_pid +``` + +Things: +```markdown +* -Dpekko-contrib-mongodb-persistence-things-journal.overrides.metadata-index=akka_persistence_metadata_pid +* -Dpekko-contrib-mongodb-persistence-things-journal-read.overrides.metadata-index=akka_persistence_metadata_pid +``` + +Connectivity: +```markdown +* -Dpekko-contrib-mongodb-persistence-connection-journal.overrides.metadata-index=akka_persistence_metadata_pid +* -Dpekko-contrib-mongodb-persistence-connection-journal-read.overrides.metadata-index=akka_persistence_metadata_pid +* -Dpekko-contrib-mongodb-persistence-connection-remember-journal.overrides.metadata-index=akka_persistence_metadata_pid +``` + +Full cluster recreate is required, rolling update is not supported as there are changes in the management +urls and ports. + +Other than that the transition should be smooth. + diff --git a/documentation/src/main/resources/slides/2022_10_24_eclipse-iot-wg-community-day/index.html b/documentation/src/main/resources/slides/2022_10_24_eclipse-iot-wg-community-day/index.html index 49cab5a4c3..63fc7aef48 100644 --- a/documentation/src/main/resources/slides/2022_10_24_eclipse-iot-wg-community-day/index.html +++ b/documentation/src/main/resources/slides/2022_10_24_eclipse-iot-wg-community-day/index.html @@ -308,10 +308,10 @@

        Current topics


          -
        • Akka license change from ASL-2.0 to BSL-1.1 +
        • Pekko license change from ASL-2.0 to BSL-1.1
            -
          • Ditto heavily relies on the Akka toolkit
          • -
          • hope that fork of Akka under Apache-Foundation with name "Pekko" will be a success
          • +
          • Ditto heavily relies on the Pekko toolkit
          • +
          • hope that fork of Pekko under Apache-Foundation with name "Pekko" will be a success
        • diff --git a/edge/service/pom.xml b/edge/service/pom.xml index d705848148..948a454022 100644 --- a/edge/service/pom.xml +++ b/edge/service/pom.xml @@ -71,7 +71,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko org.eclipse.ditto @@ -115,18 +115,18 @@ test - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test - com.typesafe.akka - akka-slf4j_${scala.version} + org.apache.pekko + pekko-slf4j_${scala.version} test org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko test-jar test diff --git a/edge/service/src/main/java/org/eclipse/ditto/edge/service/acknowledgements/AcknowledgementAggregatorActor.java b/edge/service/src/main/java/org/eclipse/ditto/edge/service/acknowledgements/AcknowledgementAggregatorActor.java index f957f0a440..49c2343e19 100644 --- a/edge/service/src/main/java/org/eclipse/ditto/edge/service/acknowledgements/AcknowledgementAggregatorActor.java +++ b/edge/service/src/main/java/org/eclipse/ditto/edge/service/acknowledgements/AcknowledgementAggregatorActor.java @@ -44,11 +44,11 @@ import org.eclipse.ditto.internal.models.signal.CommandHeaderRestoration; import org.eclipse.ditto.internal.models.signal.correlation.CommandAndCommandResponseMatchingValidator; import org.eclipse.ditto.internal.models.signal.correlation.MatchingValidationResult; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; -import akka.actor.AbstractActorWithTimers; -import akka.actor.Props; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.Props; /** * Actor which is created for an {@code ThingModifyCommand} containing {@code AcknowledgementRequests} responsible for @@ -142,7 +142,7 @@ private Consumer getDefaultMatchingValidationF } /** - * Creates Akka configuration object Props for this AcknowledgementAggregatorActor. + * Creates Pekko configuration object Props for this AcknowledgementAggregatorActor. * * @param entityId the entity ID of the originating signal. * @param signal the originating signal. @@ -153,7 +153,7 @@ private Consumer getDefaultMatchingValidationF * @param matchingValidationFailureConsumer optional handler for response validation failures. * @param responseAcknowledgementProvider an Acknowledgement provider which provide Acks based on processed command * responses or ditto runtime exceptions. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. * @throws org.eclipse.ditto.base.model.acks.AcknowledgementRequestParseException if a contained acknowledgement * request could not be parsed. */ @@ -177,7 +177,7 @@ static > Props props(final EntityId entityId, } /** - * Creates Akka configuration object Props for this AcknowledgementAggregatorActor. + * Creates Pekko configuration object Props for this AcknowledgementAggregatorActor. * * @param entityId the entity ID of the originating signal. * @param signal the originating signal. @@ -189,7 +189,7 @@ static > Props props(final EntityId entityId, * @param matchingValidationFailureConsumer optional handler for response validation failures. * @param responseAcknowledgementProvider an Acknowledgement providers which provide Acks based on * processed command responses or ditto runtime exceptions. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. * @throws org.eclipse.ditto.base.model.acks.AcknowledgementRequestParseException if a contained acknowledgement * request could not be parsed. */ diff --git a/edge/service/src/main/java/org/eclipse/ditto/edge/service/acknowledgements/AcknowledgementAggregatorActorStarter.java b/edge/service/src/main/java/org/eclipse/ditto/edge/service/acknowledgements/AcknowledgementAggregatorActorStarter.java index 41c45ba160..9263d18c33 100644 --- a/edge/service/src/main/java/org/eclipse/ditto/edge/service/acknowledgements/AcknowledgementAggregatorActorStarter.java +++ b/edge/service/src/main/java/org/eclipse/ditto/edge/service/acknowledgements/AcknowledgementAggregatorActorStarter.java @@ -38,14 +38,14 @@ import org.eclipse.ditto.base.model.signals.Signal; import org.eclipse.ditto.base.model.signals.commands.Command; import org.eclipse.ditto.internal.models.signal.correlation.MatchingValidationResult; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; - -import akka.actor.ActorRef; -import akka.actor.ActorRefFactory; -import akka.actor.Address; -import akka.cluster.Cluster; -import akka.japi.pf.PFBuilder; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; + +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.Address; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.japi.pf.PFBuilder; import scala.PartialFunction; /** diff --git a/edge/service/src/main/java/org/eclipse/ditto/edge/service/acknowledgements/AcknowledgementForwarderActor.java b/edge/service/src/main/java/org/eclipse/ditto/edge/service/acknowledgements/AcknowledgementForwarderActor.java index d2ad12b4f3..a501de94c1 100644 --- a/edge/service/src/main/java/org/eclipse/ditto/edge/service/acknowledgements/AcknowledgementForwarderActor.java +++ b/edge/service/src/main/java/org/eclipse/ditto/edge/service/acknowledgements/AcknowledgementForwarderActor.java @@ -33,15 +33,15 @@ import org.eclipse.ditto.base.model.signals.acks.AcknowledgementCorrelationIdMissingException; import org.eclipse.ditto.base.model.signals.commands.CommandResponse; import org.eclipse.ditto.base.model.signals.commands.ErrorResponse; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorRefFactory; -import akka.actor.ActorSelection; -import akka.actor.Props; -import akka.actor.ReceiveTimeout; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.ReceiveTimeout; /** * Actor which is created with an acknowledgement requester actor reference that requested to receive custom @@ -80,12 +80,12 @@ private AcknowledgementForwarderActor(final ActorSelection commandForwarder, fin } /** - * Creates Akka configuration object Props for this AcknowledgementForwarderActor. + * Creates Pekko configuration object Props for this AcknowledgementForwarderActor. * * @param commandForwarder the actor ref of the edge command forwarder actor. * @param dittoHeaders the DittoHeaders of the Signal which contained the request for Acknowledgements. * @param defaultTimeout the default timeout to apply when {@code dittoHeaders} did not contain a specific timeout. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ static Props props(final ActorSelection commandForwarder, final DittoHeaders dittoHeaders, final Duration defaultTimeout) { diff --git a/edge/service/src/main/java/org/eclipse/ditto/edge/service/acknowledgements/AcknowledgementForwarderActorStarter.java b/edge/service/src/main/java/org/eclipse/ditto/edge/service/acknowledgements/AcknowledgementForwarderActorStarter.java index bfdb5bbd97..a0654aa5be 100644 --- a/edge/service/src/main/java/org/eclipse/ditto/edge/service/acknowledgements/AcknowledgementForwarderActorStarter.java +++ b/edge/service/src/main/java/org/eclipse/ditto/edge/service/acknowledgements/AcknowledgementForwarderActorStarter.java @@ -35,15 +35,15 @@ import org.eclipse.ditto.base.model.signals.announcements.Announcement; import org.eclipse.ditto.base.model.signals.commands.Command; import org.eclipse.ditto.base.model.signals.events.Event; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; -import akka.actor.ActorRef; -import akka.actor.ActorRefFactory; -import akka.actor.ActorSelection; -import akka.actor.InvalidActorNameException; -import akka.actor.Props; -import akka.japi.Pair; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.InvalidActorNameException; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.Pair; /** * Starting an acknowledgement forwarder actor is more complex than simply call {@code actorOf}. diff --git a/edge/service/src/main/java/org/eclipse/ditto/edge/service/dispatching/AskWithRetryCommandForwarder.java b/edge/service/src/main/java/org/eclipse/ditto/edge/service/dispatching/AskWithRetryCommandForwarder.java index 368cc93bee..96331f5f74 100644 --- a/edge/service/src/main/java/org/eclipse/ditto/edge/service/dispatching/AskWithRetryCommandForwarder.java +++ b/edge/service/src/main/java/org/eclipse/ditto/edge/service/dispatching/AskWithRetryCommandForwarder.java @@ -28,21 +28,21 @@ import org.eclipse.ditto.base.model.signals.commands.Command; import org.eclipse.ditto.base.model.signals.commands.CommandResponse; import org.eclipse.ditto.edge.service.EdgeServiceTimeoutException; -import org.eclipse.ditto.internal.utils.akka.AkkaClassLoader; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.PekkoClassLoader; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.cacheloaders.AskWithRetry; import org.eclipse.ditto.internal.utils.cacheloaders.config.AskWithRetryConfig; import org.eclipse.ditto.internal.utils.cacheloaders.config.DefaultAskWithRetryConfig; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; -import akka.actor.AbstractExtensionId; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.actor.Extension; -import akka.cluster.pubsub.DistributedPubSubMessage; -import akka.pattern.AskTimeoutException; +import org.apache.pekko.actor.AbstractExtensionId; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.actor.Extension; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMessage; +import org.apache.pekko.pattern.AskTimeoutException; /** * Forwards commands from the edges to a specified ActorRef, waiting for a response if the command demands one. @@ -258,7 +258,7 @@ private static final class ExtensionId extends AbstractExtensionId org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko org.eclipse.ditto @@ -173,18 +173,18 @@ test - com.typesafe.akka - akka-http-testkit_${scala.version} + org.apache.pekko + pekko-http-testkit_${scala.version} test - com.typesafe.akka - akka-stream-testkit_${scala.version} + org.apache.pekko + pekko-stream-testkit_${scala.version} test - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test @@ -207,7 +207,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko test-jar test diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/actors/AbstractConnectionsRetrievalActor.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/actors/AbstractConnectionsRetrievalActor.java index 6c4dde22a8..cc6e3135bc 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/actors/AbstractConnectionsRetrievalActor.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/actors/AbstractConnectionsRetrievalActor.java @@ -43,18 +43,18 @@ import org.eclipse.ditto.connectivity.model.signals.commands.query.RetrieveConnectionsResponse; import org.eclipse.ditto.gateway.service.util.config.DittoGatewayConfig; import org.eclipse.ditto.gateway.service.util.config.endpoints.CommandConfig; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; import org.eclipse.ditto.json.JsonArray; import org.eclipse.ditto.json.JsonCollectors; import org.eclipse.ditto.json.JsonFieldSelector; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ReceiveTimeout; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ReceiveTimeout; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; /** diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/actors/AbstractHttpRequestActor.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/actors/AbstractHttpRequestActor.java index 5cc7f7942d..9ad9f8a955 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/actors/AbstractHttpRequestActor.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/actors/AbstractHttpRequestActor.java @@ -65,37 +65,37 @@ import org.eclipse.ditto.gateway.service.util.config.endpoints.CommandConfig; import org.eclipse.ditto.gateway.service.util.config.endpoints.HttpConfig; import org.eclipse.ditto.internal.models.signal.correlation.MatchingValidationResult; -import org.eclipse.ditto.internal.utils.akka.actors.AbstractActorWithShutdownBehavior; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.actors.AbstractActorWithShutdownBehavior; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.cluster.JsonValueSourceRef; import org.eclipse.ditto.json.JsonPointer; import org.eclipse.ditto.json.JsonRuntimeException; import org.eclipse.ditto.messages.model.Message; import org.eclipse.ditto.messages.model.signals.commands.MessageCommandResponse; -import akka.Done; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.Cancellable; -import akka.actor.CoordinatedShutdown; -import akka.actor.ReceiveTimeout; -import akka.actor.Status; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpEntities; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.model.Uri; -import akka.http.javadsl.model.headers.Location; -import akka.http.javadsl.model.headers.RawHeader; -import akka.http.scaladsl.model.ContentType$; -import akka.http.scaladsl.model.EntityStreamSizeException; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.AskTimeoutException; -import akka.pattern.Patterns; -import akka.util.ByteString; +import org.apache.pekko.Done; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Cancellable; +import org.apache.pekko.actor.CoordinatedShutdown; +import org.apache.pekko.actor.ReceiveTimeout; +import org.apache.pekko.actor.Status; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpEntities; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.http.javadsl.model.headers.Location; +import org.apache.pekko.http.javadsl.model.headers.RawHeader; +import org.apache.pekko.http.scaladsl.model.ContentType$; +import org.apache.pekko.http.scaladsl.model.EntityStreamSizeException; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.AskTimeoutException; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.util.ByteString; import scala.Option; import scala.util.Either; @@ -111,7 +111,7 @@ public abstract class AbstractHttpRequestActor extends AbstractActorWithShutdown */ public static final String COMPLETE_MESSAGE = "complete"; - private static final akka.http.javadsl.model.ContentType CONTENT_TYPE_JSON = ContentTypes.APPLICATION_JSON; + private static final org.apache.pekko.http.javadsl.model.ContentType CONTENT_TYPE_JSON = ContentTypes.APPLICATION_JSON; private final ActorRef proxyActor; private final HeaderTranslator headerTranslator; @@ -227,7 +227,7 @@ public AbstractActor.Receive handleMessage() { handleDittoRuntimeException(dittoRuntimeException); } else if (cause instanceof EntityStreamSizeException) { logger.warning("Got EntityStreamSizeException when a 'Command' was expected which means that" + - " the max. allowed http payload size configured in Akka was overstepped in this" + + " the max. allowed http payload size configured in Pekko was overstepped in this" + " request."); completeWithResult(createHttpResponse(HttpStatus.REQUEST_ENTITY_TOO_LARGE)); } else { @@ -485,14 +485,14 @@ private HttpResponse handleMessageResponseMessage(final MessageCommandResponse !HttpStatus.NO_CONTENT.equals(status)).orElse(true)) { // this is on purpose not .map(ContentTypes:parse) as this would throw an exception: - final Optional optionalContentType = message.getContentType() + final Optional optionalContentType = message.getContentType() .map(ContentType$.MODULE$::parse) .filter(Either::isRight) .map(Either::toOption) .map(Option::get); final boolean isBinary = optionalContentType - .map(akka.http.scaladsl.model.ContentType::value) + .map(org.apache.pekko.http.scaladsl.model.ContentType::value) .map(ContentType::of) .filter(ContentType::isBinary) .isPresent(); @@ -500,12 +500,12 @@ private HttpResponse handleMessageResponseMessage(final MessageCommandResponseAkkas Header model
          + * @see Pekkos Header model */ private static String extractMediaType(final HttpRequest request) { final Iterable requestHeaders = request.getHeaders(); diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/CorrelationIdEnsuringDirective.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/CorrelationIdEnsuringDirective.java index 205d08d1c5..f3d2cbf5be 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/CorrelationIdEnsuringDirective.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/CorrelationIdEnsuringDirective.java @@ -12,7 +12,7 @@ */ package org.eclipse.ditto.gateway.service.endpoints.directives; -import static akka.http.javadsl.server.Directives.extractRequestContext; +import static org.apache.pekko.http.javadsl.server.Directives.extractRequestContext; import java.util.Optional; import java.util.UUID; @@ -21,15 +21,15 @@ import javax.annotation.concurrent.Immutable; import org.eclipse.ditto.base.model.headers.DittoHeaderDefinition; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.server.Route; /** - * Custom Akka Http directive adding a correlationId to the request, if it does not yet exist. + * Custom Pekko Http directive adding a correlationId to the request, if it does not yet exist. */ @Immutable public final class CorrelationIdEnsuringDirective { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/CorsEnablingDirective.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/CorsEnablingDirective.java index c502bc657e..f92fe461bc 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/CorsEnablingDirective.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/CorsEnablingDirective.java @@ -12,11 +12,11 @@ */ package org.eclipse.ditto.gateway.service.endpoints.directives; -import static akka.http.javadsl.server.Directives.complete; -import static akka.http.javadsl.server.Directives.concat; -import static akka.http.javadsl.server.Directives.extractRequest; -import static akka.http.javadsl.server.Directives.options; -import static akka.http.javadsl.server.Directives.respondWithHeaders; +import static org.apache.pekko.http.javadsl.server.Directives.complete; +import static org.apache.pekko.http.javadsl.server.Directives.concat; +import static org.apache.pekko.http.javadsl.server.Directives.extractRequest; +import static org.apache.pekko.http.javadsl.server.Directives.options; +import static org.apache.pekko.http.javadsl.server.Directives.respondWithHeaders; import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull; import java.util.ArrayList; @@ -27,23 +27,23 @@ import org.eclipse.ditto.gateway.service.util.config.endpoints.HttpConfig; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpMethods; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.model.headers.AccessControlAllowHeaders; -import akka.http.javadsl.model.headers.AccessControlAllowMethods; -import akka.http.javadsl.model.headers.AccessControlAllowOrigin; -import akka.http.javadsl.model.headers.AccessControlRequestHeaders; -import akka.http.javadsl.model.headers.HttpOrigin; -import akka.http.javadsl.model.headers.HttpOriginRange; -import akka.http.javadsl.model.headers.HttpOriginRanges; -import akka.http.javadsl.model.headers.Origin; -import akka.http.javadsl.server.Directives; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpMethods; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.model.headers.AccessControlAllowHeaders; +import org.apache.pekko.http.javadsl.model.headers.AccessControlAllowMethods; +import org.apache.pekko.http.javadsl.model.headers.AccessControlAllowOrigin; +import org.apache.pekko.http.javadsl.model.headers.AccessControlRequestHeaders; +import org.apache.pekko.http.javadsl.model.headers.HttpOrigin; +import org.apache.pekko.http.javadsl.model.headers.HttpOriginRange; +import org.apache.pekko.http.javadsl.model.headers.HttpOriginRanges; +import org.apache.pekko.http.javadsl.model.headers.Origin; +import org.apache.pekko.http.javadsl.server.Directives; +import org.apache.pekko.http.javadsl.server.Route; /** - * Custom Akka Http directive enabling CORS for the wrapped Route. + * Custom Pekko Http directive enabling CORS for the wrapped Route. */ public final class CorsEnablingDirective { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/EncodingEnsuringDirective.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/EncodingEnsuringDirective.java index 6cfa0f9c0a..45e9682c17 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/EncodingEnsuringDirective.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/EncodingEnsuringDirective.java @@ -12,8 +12,8 @@ */ package org.eclipse.ditto.gateway.service.endpoints.directives; -import static akka.http.javadsl.server.Directives.complete; -import static akka.http.javadsl.server.Directives.extractRequestContext; +import static org.apache.pekko.http.javadsl.server.Directives.complete; +import static org.apache.pekko.http.javadsl.server.Directives.extractRequestContext; import java.text.MessageFormat; import java.util.function.Supplier; @@ -22,13 +22,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.model.Uri; -import akka.http.javadsl.server.Route; -import akka.http.scaladsl.model.IllegalUriException; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.http.scaladsl.model.IllegalUriException; /** - * Custom Akka Http directive ensuring that request uris are encoded. + * Custom Pekko Http directive ensuring that request uris are encoded. */ public final class EncodingEnsuringDirective { @@ -45,7 +45,7 @@ public static Route ensureEncoding(final Supplier inner) { return extractRequestContext(requestContext -> { final Uri uri = requestContext.getRequest().getUri(); try { - // per default, Akka evaluates the query params "lazily" in the routes and throws an IllegalUriException + // per default, Pekko evaluates the query params "lazily" in the routes and throws an IllegalUriException // in case of error; we evaluate the query params explicitly here to be able to handle this error at // a central location uri.query(); diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/HttpsEnsuringDirective.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/HttpsEnsuringDirective.java index 71ce635100..6fe92040cb 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/HttpsEnsuringDirective.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/HttpsEnsuringDirective.java @@ -12,10 +12,10 @@ */ package org.eclipse.ditto.gateway.service.endpoints.directives; -import static akka.http.javadsl.server.Directives.complete; -import static akka.http.javadsl.server.Directives.extractActorSystem; -import static akka.http.javadsl.server.Directives.extractRequestContext; -import static akka.http.javadsl.server.Directives.redirect; +import static org.apache.pekko.http.javadsl.server.Directives.complete; +import static org.apache.pekko.http.javadsl.server.Directives.extractActorSystem; +import static org.apache.pekko.http.javadsl.server.Directives.extractRequestContext; +import static org.apache.pekko.http.javadsl.server.Directives.redirect; import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull; import java.util.List; @@ -28,19 +28,19 @@ import javax.annotation.Nullable; import org.eclipse.ditto.gateway.service.util.config.endpoints.HttpConfig; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.slf4j.Logger; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.model.Uri; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; /** - * Custom Akka Http directive ensuring that proxied requests only come via HTTPs. + * Custom Pekko Http directive ensuring that proxied requests only come via HTTPs. */ public final class HttpsEnsuringDirective { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestLoggingFilter.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestLoggingFilter.java index 44c6462ba9..ae276cfb72 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestLoggingFilter.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestLoggingFilter.java @@ -17,9 +17,9 @@ import java.util.Set; import java.util.stream.StreamSupport; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.Query; -import akka.http.javadsl.model.Uri; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.Query; +import org.apache.pekko.http.javadsl.model.Uri; /** * Provides methods to redact sensitive parameter/header values from (raw) URIs and headers e.g. for logging purposes. @@ -33,7 +33,7 @@ final class RequestLoggingFilter { private RequestLoggingFilter() {} /** - * Determines whether a {@link akka.http.javadsl.model.Query} contains parameters that need filtering. + * Determines whether a {@link org.apache.pekko.http.javadsl.model.Query} contains parameters that need filtering. * * @param query the query to check * @return {@code true} if the given Query requires filtering @@ -91,7 +91,7 @@ static Query filterQuery(final Query query) { } /** - * Redacts unwanted header values with {@code ***} in an iterable of {@link akka.http.javadsl.model.HttpHeader}s. + * Redacts unwanted header values with {@code ***} in an iterable of {@link org.apache.pekko.http.javadsl.model.HttpHeader}s. * * @param headers the headers to redact * @return the redacted headers diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestResultLoggingDirective.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestResultLoggingDirective.java index d6fdcd3811..4311ba825e 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestResultLoggingDirective.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestResultLoggingDirective.java @@ -12,10 +12,10 @@ */ package org.eclipse.ditto.gateway.service.endpoints.directives; -import static akka.http.javadsl.server.Directives.extractRequest; -import static akka.http.javadsl.server.Directives.logRequest; -import static akka.http.javadsl.server.Directives.logResult; -import static akka.http.javadsl.server.Directives.mapRouteResult; +import static org.apache.pekko.http.javadsl.server.Directives.extractRequest; +import static org.apache.pekko.http.javadsl.server.Directives.logRequest; +import static org.apache.pekko.http.javadsl.server.Directives.logResult; +import static org.apache.pekko.http.javadsl.server.Directives.mapRouteResult; import static org.eclipse.ditto.gateway.service.endpoints.directives.RequestLoggingFilter.filterHeaders; import static org.eclipse.ditto.gateway.service.endpoints.directives.RequestLoggingFilter.filterRawUri; import static org.eclipse.ditto.gateway.service.endpoints.directives.RequestLoggingFilter.filterUri; @@ -23,14 +23,14 @@ import java.util.function.Supplier; import org.eclipse.ditto.gateway.service.endpoints.utils.HttpUtils; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; -import akka.http.javadsl.server.Complete; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.server.Complete; +import org.apache.pekko.http.javadsl.server.Route; /** - * Custom Akka Http directive logging the StatusCode and duration of the route. + * Custom Pekko Http directive logging the StatusCode and duration of the route. */ public final class RequestResultLoggingDirective { @@ -52,8 +52,8 @@ private RequestResultLoggingDirective() { * @return the new Route wrapping {@code inner} with logging */ public static Route logRequestResult(final CharSequence correlationId, final Supplier inner) { - // add akka standard logging to the route - final Supplier innerWithAkkaLoggingRoute = () -> logRequest("http-request", () -> + // add pekko standard logging to the route + final Supplier innerWithPekkoLoggingRoute = () -> logRequest("http-request", () -> logResult("http-response", inner)); // add our own logging with time measurement and creating a kamon trace @@ -79,12 +79,12 @@ public static Route logRequestResult(final CharSequence correlationId, final Sup /* routeResult could be Rejected, if no route is able to handle the request -> but this should not happen when rejections are handled before this directive is called. */ logger.warn("Unexpected routeResult for request {} '{}': {}, routeResult will be handled by " + - "akka default RejectionHandler.", requestMethod, filteredRelativeRequestUri, + "pekko default RejectionHandler.", requestMethod, filteredRelativeRequestUri, routeResult); } return routeResult; - }, innerWithAkkaLoggingRoute); + }, innerWithPekkoLoggingRoute); }); } diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestTimeoutHandlingDirective.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestTimeoutHandlingDirective.java index 9b2817b88c..6b4b89c9a0 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestTimeoutHandlingDirective.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestTimeoutHandlingDirective.java @@ -12,7 +12,7 @@ */ package org.eclipse.ditto.gateway.service.endpoints.directives; -import static akka.http.javadsl.server.Directives.extractRequestContext; +import static org.apache.pekko.http.javadsl.server.Directives.extractRequestContext; import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull; import static org.eclipse.ditto.gateway.service.endpoints.utils.HttpUtils.getRawRequestUri; @@ -27,24 +27,24 @@ import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.eclipse.ditto.gateway.api.GatewayServiceUnavailableException; import org.eclipse.ditto.gateway.service.util.config.endpoints.HttpConfig; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.metrics.instruments.timer.StartedTimer; import org.eclipse.ditto.internal.utils.metrics.instruments.timer.StoppedTimer; import org.eclipse.ditto.internal.utils.tracing.TraceUtils; import org.eclipse.ditto.internal.utils.tracing.span.SpanTagKey; import org.slf4j.Logger; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.server.Directives; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; -import akka.util.ByteString; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.server.Directives; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.util.ByteString; /** - * Custom Akka HTTP directive which handles a request timeout. + * Custom Pekko HTTP directive which handles a request timeout. */ public final class RequestTimeoutHandlingDirective { @@ -158,7 +158,7 @@ private HttpResponse doHandleRequestTimeout(final CharSequence correlationId, final HttpRequest request = requestContext.getRequest(); - /* We have to log and create a trace here because the RequestResultLoggingDirective won't be called by akka + /* We have to log and create a trace here because the RequestResultLoggingDirective won't be called by pekko in case of a timeout */ final var httpStatus = cre.getHttpStatus(); @@ -182,7 +182,7 @@ private HttpResponse doHandleRequestTimeout(final CharSequence correlationId, /* * We have to add security response headers explicitly here because SecurityResponseHeadersDirective won't be - * called by akka in case of a timeout. + * called by pekko in case of a timeout. */ return HttpResponse.create() .withStatus(httpStatus.getCode()) diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestTracingDirective.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestTracingDirective.java index c5a3f400ed..e9cf739aec 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestTracingDirective.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestTracingDirective.java @@ -12,9 +12,9 @@ */ package org.eclipse.ditto.gateway.service.endpoints.directives; -import static akka.http.javadsl.server.Directives.extractRequest; -import static akka.http.javadsl.server.Directives.mapRequest; -import static akka.http.javadsl.server.Directives.mapRouteResult; +import static org.apache.pekko.http.javadsl.server.Directives.extractRequest; +import static org.apache.pekko.http.javadsl.server.Directives.mapRequest; +import static org.apache.pekko.http.javadsl.server.Directives.mapRouteResult; import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull; import java.net.URI; @@ -32,24 +32,24 @@ import org.eclipse.ditto.base.model.common.HttpStatus; import org.eclipse.ditto.base.model.common.HttpStatusCodeOutOfRangeException; import org.eclipse.ditto.base.model.headers.DittoHeaderDefinition; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.tracing.DittoTracing; import org.eclipse.ditto.internal.utils.tracing.TraceInformationGenerator; import org.eclipse.ditto.internal.utils.tracing.span.SpanOperationName; import org.eclipse.ditto.internal.utils.tracing.span.SpanTagKey; import org.eclipse.ditto.internal.utils.tracing.span.StartedSpan; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.Uri; -import akka.http.javadsl.server.Complete; -import akka.http.javadsl.server.Route; -import akka.http.javadsl.server.RouteResult; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.http.javadsl.server.Complete; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.server.RouteResult; /** - * Custom Akka Http directive tracing the request. + * Custom Pekko Http directive tracing the request. */ @Immutable public final class RequestTracingDirective { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DevOpsBasicAuthenticationDirective.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DevOpsBasicAuthenticationDirective.java index f41bac6671..f3aad54674 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DevOpsBasicAuthenticationDirective.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DevOpsBasicAuthenticationDirective.java @@ -24,12 +24,12 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.http.javadsl.server.Directives; -import akka.http.javadsl.server.Route; -import akka.http.javadsl.server.directives.SecurityDirectives; +import org.apache.pekko.http.javadsl.server.Directives; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.server.directives.SecurityDirectives; /** - * Custom Akka Http directive performing basic auth for a defined {@link #USER_DEVOPS devops user}. + * Custom Pekko Http directive performing basic auth for a defined {@link #USER_DEVOPS devops user}. */ public final class DevOpsBasicAuthenticationDirective implements DevopsAuthenticationDirective { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DevOpsInsecureAuthenticationDirective.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DevOpsInsecureAuthenticationDirective.java index e11ece6a47..f363306391 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DevOpsInsecureAuthenticationDirective.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DevOpsInsecureAuthenticationDirective.java @@ -15,7 +15,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.server.Route; /** * Authentication directive which does not perform any authentication. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DevOpsOAuth2AuthenticationDirective.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DevOpsOAuth2AuthenticationDirective.java index cb24b0b1b0..8ce4d5a2af 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DevOpsOAuth2AuthenticationDirective.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DevOpsOAuth2AuthenticationDirective.java @@ -12,7 +12,7 @@ */ package org.eclipse.ditto.gateway.service.endpoints.directives.auth; -import static akka.http.javadsl.server.Directives.extractRequestContext; +import static org.apache.pekko.http.javadsl.server.Directives.extractRequestContext; import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull; import java.util.Collection; @@ -28,15 +28,15 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.server.AuthorizationFailedRejection; -import akka.http.javadsl.server.Directives; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.server.AuthorizationFailedRejection; +import org.apache.pekko.http.javadsl.server.Directives; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; import scala.util.Try; /** - * Custom Akka Http directive performing oauth2 with an {@link #expectedSubjects expected subject}. + * Custom Pekko Http directive performing oauth2 with an {@link #expectedSubjects expected subject}. */ public final class DevOpsOAuth2AuthenticationDirective implements DevopsAuthenticationDirective { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DevopsAuthenticationDirective.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DevopsAuthenticationDirective.java index d882a85fd9..0d4baef805 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DevopsAuthenticationDirective.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DevopsAuthenticationDirective.java @@ -12,7 +12,7 @@ */ package org.eclipse.ditto.gateway.service.endpoints.directives.auth; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.server.Route; /** diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DittoGatewayAuthenticationDirectiveFactory.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DittoGatewayAuthenticationDirectiveFactory.java index 72b676c96f..de21c597e0 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DittoGatewayAuthenticationDirectiveFactory.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/DittoGatewayAuthenticationDirectiveFactory.java @@ -33,7 +33,7 @@ import com.mongodb.lang.Nullable; import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Ditto's default factory for building authentication directives. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/GatewayAuthenticationDirective.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/GatewayAuthenticationDirective.java index 3babdc5832..6ce0365f93 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/GatewayAuthenticationDirective.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/GatewayAuthenticationDirective.java @@ -12,7 +12,7 @@ */ package org.eclipse.ditto.gateway.service.endpoints.directives.auth; -import static akka.http.javadsl.server.Directives.extractRequestContext; +import static org.apache.pekko.http.javadsl.server.Directives.extractRequestContext; import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull; import java.util.concurrent.CompletableFuture; @@ -23,16 +23,16 @@ import org.eclipse.ditto.gateway.api.GatewayAuthenticationFailedException; import org.eclipse.ditto.gateway.service.security.authentication.AuthenticationChain; import org.eclipse.ditto.gateway.service.security.authentication.AuthenticationResult; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; -import akka.http.javadsl.model.Uri; -import akka.http.javadsl.server.Directives; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.http.javadsl.server.Directives; +import org.apache.pekko.http.javadsl.server.Route; import scala.util.Try; /** - * Akka Http directive which performs authentication for the gateway. + * Pekko Http directive which performs authentication for the gateway. */ public final class GatewayAuthenticationDirective { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/GatewayAuthenticationDirectiveFactory.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/GatewayAuthenticationDirectiveFactory.java index 372bf2f12c..4c84ef9f73 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/GatewayAuthenticationDirectiveFactory.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/directives/auth/GatewayAuthenticationDirectiveFactory.java @@ -20,7 +20,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Factory for authentication directives. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/AbstractRoute.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/AbstractRoute.java index 2ad53e14bf..89b1ba42ce 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/AbstractRoute.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/AbstractRoute.java @@ -42,8 +42,8 @@ import org.eclipse.ditto.gateway.service.endpoints.actors.HttpRequestActorPropsFactory; import org.eclipse.ditto.gateway.service.endpoints.directives.ContentTypeValidationDirective; import org.eclipse.ditto.gateway.service.util.config.endpoints.CommandConfig; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.config.ScopedConfig; import org.eclipse.ditto.json.JsonFactory; import org.eclipse.ditto.json.JsonFieldSelector; @@ -51,32 +51,32 @@ import org.eclipse.ditto.json.JsonParseOptions; import org.eclipse.ditto.json.JsonValue; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.Status; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.MediaTypes; -import akka.http.javadsl.server.AllDirectives; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; -import akka.stream.ActorAttributes; -import akka.stream.Attributes; -import akka.stream.Supervision; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.RunnableGraph; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.StreamConverters; -import akka.util.ByteString; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Status; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.MediaTypes; +import org.apache.pekko.http.javadsl.server.AllDirectives; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.stream.ActorAttributes; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.stream.Supervision; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.RunnableGraph; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.StreamConverters; +import org.apache.pekko.util.ByteString; /** - * Base class for Akka HTTP routes. + * Base class for Pekko HTTP routes. */ public abstract class AbstractRoute extends AllDirectives { /** - * Don't configure URL decoding as JsonParseOptions because Akka-Http already decodes the fields-param and we would + * Don't configure URL decoding as JsonParseOptions because Pekko-Http already decodes the fields-param and we would * decode twice. */ public static final JsonParseOptions JSON_FIELD_SELECTOR_PARSE_OPTIONS = JsonFactory.newParseOptionsBuilder() @@ -84,10 +84,10 @@ public abstract class AbstractRoute extends AllDirectives { .build(); /** - * Timeout for Akka HTTP. Timeout is normally managed in HttpRequestActor and AcknowledgementAggregatorActor. - * The Akka HTTP timeout is only there to prevent resource leak. + * Timeout for Pekko HTTP. Timeout is normally managed in HttpRequestActor and AcknowledgementAggregatorActor. + * The Pekko HTTP timeout is only there to prevent resource leak. */ - private static final scala.concurrent.duration.Duration AKKA_HTTP_TIMEOUT = + private static final scala.concurrent.duration.Duration PEKKO_HTTP_TIMEOUT = scala.concurrent.duration.Duration.create(2, TimeUnit.MINUTES); private static final DittoLogger LOGGER = DittoLoggerFactory.getLogger(AbstractRoute.class); @@ -339,10 +339,10 @@ protected Route ensureMediaTypeMergePatchJsonThenExtractDataBytes(final RequestC /** * Validate the passed {@code optionalTimeout} with the passed * {@code checkTimeoutFunction} falling back to the optional {@code defaultTimeout} wrapping the passed - * {@code inner} route. Set Akka HTTP timeout to a ceiling because the actual timeout handling happens in + * {@code inner} route. Set Pekko HTTP timeout to a ceiling because the actual timeout handling happens in * HttpRequestActor and AcknowledgementAggregatorActor. * - * @param optionalTimeout the custom timeout to use as Akka HTTP request timeout adjusting the configured default + * @param optionalTimeout the custom timeout to use as Pekko HTTP request timeout adjusting the configured default * one. * @param checkTimeoutFunction a function to check the passed optionalTimeout for validity e. g. within some bounds. * @param inner the inner Route to wrap. @@ -373,7 +373,7 @@ private Route increaseHttpRequestTimeout(final java.util.function.Function inner, final scala.concurrent.duration.Duration requestTimeout) { - return withRequestTimeout(AKKA_HTTP_TIMEOUT, + return withRequestTimeout(PEKKO_HTTP_TIMEOUT, () -> inner.apply(Duration.ofMillis(requestTimeout.toMillis()))); } diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/CustomApiRoutesProvider.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/CustomApiRoutesProvider.java index 68e2aeb85e..ce7262e500 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/CustomApiRoutesProvider.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/CustomApiRoutesProvider.java @@ -21,8 +21,8 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; -import akka.http.javadsl.server.Route; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.server.Route; /** * Provider for custom routes. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/CustomHeadersHandler.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/CustomHeadersHandler.java index 917d4487ab..21a17326bc 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/CustomHeadersHandler.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/CustomHeadersHandler.java @@ -16,7 +16,7 @@ import org.eclipse.ditto.base.model.headers.DittoHeaders; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * Responsible for adding custom headers. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/DittoRuntimeExceptionToHttpResponse.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/DittoRuntimeExceptionToHttpResponse.java index fce3bc1ac1..e8b752d1b9 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/DittoRuntimeExceptionToHttpResponse.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/DittoRuntimeExceptionToHttpResponse.java @@ -25,10 +25,10 @@ import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.eclipse.ditto.base.model.headers.translator.HeaderTranslator; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpResponse; -import akka.util.ByteString; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.util.ByteString; /** * This class creates a {@link HttpResponse} from a {@link DittoRuntimeException}. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/HttpBindFlowProvider.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/HttpBindFlowProvider.java index f4c4eaa724..f68b3d5be0 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/HttpBindFlowProvider.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/HttpBindFlowProvider.java @@ -20,12 +20,12 @@ import com.typesafe.config.Config; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.server.Route; -import akka.stream.javadsl.Flow; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.stream.javadsl.Flow; /** * Extension to add a custom bind flow for HTTP requests. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/LoggingHttpBindFlowProvider.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/LoggingHttpBindFlowProvider.java index 523a40169a..e528e4a9a5 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/LoggingHttpBindFlowProvider.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/LoggingHttpBindFlowProvider.java @@ -14,14 +14,14 @@ import com.typesafe.config.Config; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.event.Logging; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.server.Directives; -import akka.http.javadsl.server.Route; -import akka.stream.javadsl.Flow; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.event.Logging; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.server.Directives; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.stream.javadsl.Flow; /** * Default HTTP bind flow provider, which logs the requests. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/NoopCustomApiRoutesProvider.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/NoopCustomApiRoutesProvider.java index a62ce46ec8..814392634a 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/NoopCustomApiRoutesProvider.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/NoopCustomApiRoutesProvider.java @@ -19,9 +19,9 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; -import akka.http.javadsl.server.Directives; -import akka.http.javadsl.server.Route; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.server.Directives; +import org.apache.pekko.http.javadsl.server.Route; @Immutable public final class NoopCustomApiRoutesProvider implements CustomApiRoutesProvider { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/NoopCustomHeadersHandler.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/NoopCustomHeadersHandler.java index 85176fa090..b60fb789d0 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/NoopCustomHeadersHandler.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/NoopCustomHeadersHandler.java @@ -17,7 +17,7 @@ import org.eclipse.ditto.base.model.headers.DittoHeaders; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * A default CustomHeadersHandler implementation which does not adjust the headers. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRoute.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRoute.java index dc8a5c4e7d..1422542081 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRoute.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRoute.java @@ -58,24 +58,24 @@ import org.eclipse.ditto.internal.utils.protocol.ProtocolAdapterProvider; import org.eclipse.ditto.protocol.adapter.ProtocolAdapter; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.server.AllDirectives; -import akka.http.javadsl.server.ExceptionHandler; -import akka.http.javadsl.server.PathMatchers; -import akka.http.javadsl.server.RejectionHandler; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; -import akka.http.javadsl.server.directives.RouteAdapter; -import akka.http.scaladsl.server.RouteResult; -import akka.japi.pf.PFBuilder; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.server.AllDirectives; +import org.apache.pekko.http.javadsl.server.ExceptionHandler; +import org.apache.pekko.http.javadsl.server.PathMatchers; +import org.apache.pekko.http.javadsl.server.RejectionHandler; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.server.directives.RouteAdapter; +import org.apache.pekko.http.scaladsl.server.RouteResult; +import org.apache.pekko.japi.pf.PFBuilder; import scala.Function1; import scala.compat.java8.FutureConverters; import scala.concurrent.Future; /** - * Builder for creating Akka HTTP routes for {@code /}. + * Builder for creating Pekko HTTP routes for {@code /}. */ public final class RootRoute extends AllDirectives { @@ -202,7 +202,7 @@ private Route wrapWithRootDirectives(final Function rootRoute) { EncodingEnsuringDirective.ensureEncoding(() -> httpsDirective.ensureHttps(correlationId, () -> corsDirective.enableCors(() -> - /* handling the rejections is done by akka automatically, but if we + /* handling the rejections is done by pekko automatically, but if we do it here explicitly, we are able to log the status code for the rejection (e.g. 404 or 405) in a wrapping directive. */ handleRejections(rejectionHandler, () -> @@ -406,17 +406,17 @@ private Route withDittoHeaders(final CompletionStage dittoHeadersP .thenCompose(route -> routeToJavaFunction(route).apply(requestContext)))); } - private static Route javaFunctionToRoute(final Function> function) { - final Function1> scalaFunction = - new PFBuilder>() + final Function1> scalaFunction = + new PFBuilder>() .matchAny(scalaRequestContext -> FutureConverters.toScala(function.apply(scalaRequestContext))) .build(); return RouteAdapter.asJava(scalaFunction); } - private static Function> routeToJavaFunction( + private static Function> routeToJavaFunction( final Route route) { return scalaRequestContext -> diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteBuilder.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteBuilder.java index fd9df32780..0f446cc871 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteBuilder.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteBuilder.java @@ -33,9 +33,9 @@ import org.eclipse.ditto.internal.utils.health.routes.StatusRoute; import org.eclipse.ditto.internal.utils.protocol.ProtocolAdapterProvider; -import akka.http.javadsl.server.ExceptionHandler; -import akka.http.javadsl.server.RejectionHandler; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.server.ExceptionHandler; +import org.apache.pekko.http.javadsl.server.RejectionHandler; +import org.apache.pekko.http.javadsl.server.Route; /** * A builder for the root {@code Route}. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteExceptionHandler.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteExceptionHandler.java index c476692b7f..3362ac2067 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteExceptionHandler.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteExceptionHandler.java @@ -26,15 +26,15 @@ import org.eclipse.ditto.base.model.exceptions.DittoJsonException; import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; import org.eclipse.ditto.base.model.headers.DittoHeaders; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; - -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.server.Directives; -import akka.http.javadsl.server.ExceptionHandler; -import akka.http.javadsl.server.Route; -import akka.japi.pf.FI; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; + +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.server.Directives; +import org.apache.pekko.http.javadsl.server.ExceptionHandler; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.japi.pf.FI; /** * This class provides an {@link ExceptionHandler} for the root route. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteHeadersStepBuilder.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteHeadersStepBuilder.java index 90c2deb418..624e2a8e4e 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteHeadersStepBuilder.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteHeadersStepBuilder.java @@ -29,9 +29,9 @@ import org.eclipse.ditto.edge.service.headers.DittoHeadersValidator; import org.eclipse.ditto.gateway.api.GatewayDuplicateHeaderException; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpMessage; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpMessage; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * This class provides a fluent API for building a CompletionStage that eventually supplies the {@link DittoHeaders} for diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RouteBaseProperties.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RouteBaseProperties.java index 8adf20d9fd..fa6c4cda12 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RouteBaseProperties.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/RouteBaseProperties.java @@ -22,8 +22,8 @@ import org.eclipse.ditto.gateway.service.util.config.endpoints.CommandConfig; import org.eclipse.ditto.gateway.service.util.config.endpoints.HttpConfig; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; /** * Base properties of each {@link AbstractRoute} implementation. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/cloudevents/CloudEventsRoute.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/cloudevents/CloudEventsRoute.java index a705dc7a7b..6255a8eddb 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/cloudevents/CloudEventsRoute.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/cloudevents/CloudEventsRoute.java @@ -35,24 +35,24 @@ import org.eclipse.ditto.gateway.service.endpoints.routes.AbstractRoute; import org.eclipse.ditto.gateway.service.endpoints.routes.RouteBaseProperties; import org.eclipse.ditto.gateway.service.util.config.endpoints.CloudEventsConfig; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.json.JsonObject; import org.eclipse.ditto.protocol.JsonifiableAdaptable; import org.eclipse.ditto.protocol.ProtocolFactory; import org.eclipse.ditto.protocol.adapter.DittoProtocolAdapter; import org.eclipse.ditto.things.model.signals.commands.ThingCommand; -import akka.actor.Status; -import akka.http.javadsl.model.ContentType; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; -import akka.stream.javadsl.Sink; -import akka.util.ByteString; +import org.apache.pekko.actor.Status; +import org.apache.pekko.http.javadsl.model.ContentType; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.util.ByteString; import io.cloudevents.CloudEvent; import io.cloudevents.CloudEventData; import io.cloudevents.core.message.MessageReader; @@ -60,7 +60,7 @@ import io.cloudevents.rw.CloudEventRWException; /** - * Builder for creating Akka HTTP route for {@code /cloudevents}. + * Builder for creating Pekko HTTP route for {@code /cloudevents}. */ public final class CloudEventsRoute extends AbstractRoute { @@ -200,7 +200,7 @@ private CloudEvent toCloudEvent(final RequestContext ctx, final DittoHeaders dit }); if (!sawContentType.get()) { - // we didn't see the content type in the header, so extract it from akka's request + // we didn't see the content type in the header, so extract it from pekko's request acceptor.accept(DittoHeaderDefinition.CONTENT_TYPE.getKey(), ctx.getRequest().entity().getContentType().mediaType().toString()); } diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/connections/ConnectionsRoute.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/connections/ConnectionsRoute.java index 5b29f630f8..259f8b40a4 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/connections/ConnectionsRoute.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/connections/ConnectionsRoute.java @@ -56,13 +56,13 @@ import org.eclipse.ditto.json.JsonObjectBuilder; import org.eclipse.ditto.json.JsonPointer; -import akka.http.javadsl.model.MediaTypes; -import akka.http.javadsl.server.PathMatchers; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.model.MediaTypes; +import org.apache.pekko.http.javadsl.server.PathMatchers; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; /** - * Builder for creating Akka HTTP routes for {@code /connections}. + * Builder for creating Pekko HTTP routes for {@code /connections}. */ public final class ConnectionsRoute extends AbstractRoute { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/devops/DevOpsRoute.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/devops/DevOpsRoute.java index c2c2328fba..10588fc6a4 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/devops/DevOpsRoute.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/devops/DevOpsRoute.java @@ -41,14 +41,14 @@ import org.eclipse.ditto.json.JsonPointer; import org.eclipse.ditto.json.JsonValue; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.server.PathMatchers; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.server.PathMatchers; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; /** - * Builder for creating Akka HTTP routes for {@code /devops}. + * Builder for creating Pekko HTTP routes for {@code /devops}. */ public final class DevOpsRoute extends AbstractRoute { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/health/CachingHealthRoute.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/health/CachingHealthRoute.java index 1ecd3847df..72deb6dbbe 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/health/CachingHealthRoute.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/health/CachingHealthRoute.java @@ -12,9 +12,9 @@ */ package org.eclipse.ditto.gateway.service.endpoints.routes.health; -import static akka.http.javadsl.server.Directives.completeWithFuture; -import static akka.http.javadsl.server.Directives.get; -import static akka.http.javadsl.server.Directives.path; +import static org.apache.pekko.http.javadsl.server.Directives.completeWithFuture; +import static org.apache.pekko.http.javadsl.server.Directives.get; +import static org.apache.pekko.http.javadsl.server.Directives.path; import java.time.Duration; import java.time.Instant; @@ -27,13 +27,13 @@ import org.eclipse.ditto.internal.utils.health.StatusDetailMessage; import org.eclipse.ditto.internal.utils.health.StatusInfo; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.server.Route; /** - * Builder for creating Akka HTTP route for {@code /health}. + * Builder for creating Pekko HTTP route for {@code /health}. */ public final class CachingHealthRoute { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/policies/PoliciesRoute.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/policies/PoliciesRoute.java index 8b8d345bc0..431141ecb9 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/policies/PoliciesRoute.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/policies/PoliciesRoute.java @@ -52,12 +52,12 @@ import org.eclipse.ditto.policies.model.signals.commands.modify.ModifyPolicy; import org.eclipse.ditto.policies.model.signals.commands.query.RetrievePolicy; -import akka.http.javadsl.server.PathMatchers; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.server.PathMatchers; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; /** - * Builder for creating Akka HTTP routes for {@code /policies}. + * Builder for creating Pekko HTTP routes for {@code /policies}. */ public final class PoliciesRoute extends AbstractRoute { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/policies/PolicyEntriesRoute.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/policies/PolicyEntriesRoute.java index 6c996c675a..3857d52cc7 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/policies/PolicyEntriesRoute.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/policies/PolicyEntriesRoute.java @@ -60,12 +60,12 @@ import org.eclipse.ditto.policies.model.signals.commands.query.RetrieveSubject; import org.eclipse.ditto.policies.model.signals.commands.query.RetrieveSubjects; -import akka.http.javadsl.server.PathMatchers; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.server.PathMatchers; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; /** - * Builder for creating Akka HTTP routes for Policy {@code /entries}. + * Builder for creating Pekko HTTP routes for Policy {@code /entries}. */ final class PolicyEntriesRoute extends AbstractRoute { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/policies/PolicyImportsRoute.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/policies/PolicyImportsRoute.java index 304afd62bb..ac8c3f0b6a 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/policies/PolicyImportsRoute.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/policies/PolicyImportsRoute.java @@ -29,12 +29,12 @@ import org.eclipse.ditto.policies.model.signals.commands.query.RetrievePolicyImport; import org.eclipse.ditto.policies.model.signals.commands.query.RetrievePolicyImports; -import akka.http.javadsl.server.PathMatchers; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.server.PathMatchers; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; /** - * Builder for creating Akka HTTP routes for Policy {@code /imports}. + * Builder for creating Pekko HTTP routes for Policy {@code /imports}. */ final class PolicyImportsRoute extends AbstractRoute { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/NoOpSseConnectionSupervisor.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/NoOpSseConnectionSupervisor.java index 23e02d6ed6..482312e711 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/NoOpSseConnectionSupervisor.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/NoOpSseConnectionSupervisor.java @@ -17,7 +17,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Null implementation for {@link SseConnectionSupervisor}. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/NoOpSseEventSniffer.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/NoOpSseEventSniffer.java index d626f3d387..11da714cc5 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/NoOpSseEventSniffer.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/NoOpSseEventSniffer.java @@ -14,11 +14,11 @@ import com.typesafe.config.Config; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.sse.ServerSentEvent; -import akka.stream.javadsl.Flow; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.sse.ServerSentEvent; +import org.apache.pekko.stream.javadsl.Flow; /** * Sniffer for Server Sent Events that does purposefully nothing. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/SseConnectionSupervisor.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/SseConnectionSupervisor.java index ff203b126d..a0b9084763 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/SseConnectionSupervisor.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/SseConnectionSupervisor.java @@ -20,7 +20,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Provides the means to supervise a particular SSE connection. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/SseEventSniffer.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/SseEventSniffer.java index 76527d3b16..c22e0e9895 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/SseEventSniffer.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/SseEventSniffer.java @@ -19,11 +19,11 @@ import com.typesafe.config.Config; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.sse.ServerSentEvent; -import akka.stream.javadsl.Flow; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.sse.ServerSentEvent; +import org.apache.pekko.stream.javadsl.Flow; /** * Functional interface to sniff events over or SSE. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/SseRouteBuilder.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/SseRouteBuilder.java index b2328e1af0..016a60a705 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/SseRouteBuilder.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/SseRouteBuilder.java @@ -21,12 +21,12 @@ import org.eclipse.ditto.gateway.service.endpoints.utils.GatewaySignalEnrichmentProvider; import org.eclipse.ditto.gateway.service.streaming.StreamingAuthorizationEnforcer; -import akka.actor.ActorRef; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; /** - * Builder with a fluent API for creating Akka HTTP routes for SSE (Server Sent Events). + * Builder with a fluent API for creating Pekko HTTP routes for SSE (Server Sent Events). */ public interface SseRouteBuilder { @@ -78,7 +78,7 @@ public interface SseRouteBuilder { SseRouteBuilder withProxyActor(@Nullable ActorRef proxyActor); /** - * Creates the Akka HTTP route for SSE. + * Creates the Pekko HTTP route for SSE. * * @param requestContext provides the HTTP request. * @param dittoHeadersSupplier provides the Ditto headers to be used. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/ThingsSseRouteBuilder.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/ThingsSseRouteBuilder.java index 98a9da3630..9bccc4da9c 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/ThingsSseRouteBuilder.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/ThingsSseRouteBuilder.java @@ -90,30 +90,30 @@ import com.typesafe.config.Config; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.http.javadsl.marshalling.sse.EventStreamMarshalling; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.MediaTypes; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.model.headers.Accept; -import akka.http.javadsl.model.sse.ServerSentEvent; -import akka.http.javadsl.server.PathMatchers; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; -import akka.http.javadsl.server.directives.RouteDirectives; -import akka.japi.pf.PFBuilder; -import akka.pattern.Patterns; -import akka.stream.KillSwitch; -import akka.stream.KillSwitches; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.marshalling.sse.EventStreamMarshalling; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.MediaTypes; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.model.headers.Accept; +import org.apache.pekko.http.javadsl.model.sse.ServerSentEvent; +import org.apache.pekko.http.javadsl.server.PathMatchers; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.server.directives.RouteDirectives; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.KillSwitch; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Source; import scala.PartialFunction; /** - * Builder for creating Akka HTTP routes for SSE (Server Sent Events) {@code /things} and {@code /search} routes. + * Builder for creating Pekko HTTP routes for SSE (Server Sent Events) {@code /things} and {@code /search} routes. */ @NotThreadSafe public final class ThingsSseRouteBuilder extends RouteDirectives implements SseRouteBuilder { @@ -196,7 +196,7 @@ private ThingsSseRouteBuilder(final ActorSystem actorSystem, * @param actorSystem the actor system. * @param streamingActor is used for actual event streaming. * @param streamingConfig the streaming configuration. - * @param pubSubMediator akka pub-sub mediator for error reporting by the search source. + * @param pubSubMediator pekko pub-sub mediator for error reporting by the search source. * @param headerTranslator the header translator used for translating to external headers. * @return the instance. * @throws NullPointerException if {@code streamingActor} is {@code null}. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/stats/StatsRoute.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/stats/StatsRoute.java index 23fb1d70c2..14b87ccafc 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/stats/StatsRoute.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/stats/StatsRoute.java @@ -30,20 +30,20 @@ import org.eclipse.ditto.base.api.devops.signals.commands.RetrieveStatistics; import org.eclipse.ditto.base.api.devops.signals.commands.RetrieveStatisticsDetails; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.server.Directives; -import akka.http.javadsl.server.PathMatchers; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; -import akka.japi.function.Function; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.util.ByteString; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.server.Directives; +import org.apache.pekko.http.javadsl.server.PathMatchers; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.japi.function.Function; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.util.ByteString; /** - * Builder for Akka HTTP route for providing statistics. + * Builder for Pekko HTTP route for providing statistics. */ public final class StatsRoute extends AbstractRoute { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/status/OverallStatusRoute.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/status/OverallStatusRoute.java index fa8009480e..3a0b5d473a 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/status/OverallStatusRoute.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/status/OverallStatusRoute.java @@ -20,15 +20,15 @@ import org.eclipse.ditto.gateway.service.health.StatusAndHealthProvider; import org.eclipse.ditto.internal.utils.health.cluster.ClusterStatus; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.server.PathMatchers; -import akka.http.javadsl.server.Route; -import akka.http.javadsl.server.directives.RouteDirectives; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.server.PathMatchers; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.server.directives.RouteDirectives; /** - * Builder for creating Akka HTTP routes for {@code /status}. + * Builder for creating Pekko HTTP routes for {@code /status}. */ public final class OverallStatusRoute extends RouteDirectives { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/FeaturesRoute.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/FeaturesRoute.java index 62495f2226..e0e99af972 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/FeaturesRoute.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/FeaturesRoute.java @@ -44,12 +44,12 @@ import org.eclipse.ditto.things.model.signals.commands.query.RetrieveFeatureProperty; import org.eclipse.ditto.things.model.signals.commands.query.RetrieveFeatures; -import akka.http.javadsl.server.PathMatchers; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.server.PathMatchers; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; /** - * Builder for creating Akka HTTP routes for {@code /features}. + * Builder for creating Pekko HTTP routes for {@code /features}. */ final class FeaturesRoute extends AbstractRoute { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/MessagesRoute.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/MessagesRoute.java index 2c3384fe2d..a9ac1c1a95 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/MessagesRoute.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/MessagesRoute.java @@ -42,22 +42,22 @@ import org.eclipse.ditto.protocol.TopicPath; import org.eclipse.ditto.things.model.ThingId; -import akka.http.javadsl.model.ContentType; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpCharset; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.RequestEntity; -import akka.http.javadsl.server.PathMatchers; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; -import akka.japi.function.Function; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.util.ByteString; +import org.apache.pekko.http.javadsl.model.ContentType; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpCharset; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.RequestEntity; +import org.apache.pekko.http.javadsl.server.PathMatchers; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.japi.function.Function; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.util.ByteString; /** - * Builder for creating Akka HTTP routes for MessagesService. + * Builder for creating Pekko HTTP routes for MessagesService. */ final class MessagesRoute extends AbstractRoute { @@ -394,7 +394,7 @@ private Duration checkClaimTimeout(final Duration timeout) { /** * Check if the request has a Content-Length of {@code 0}, indicating it has no payload. The non-existence of - * Content-Length in a message will return {@code false}, as the akka documentation states that "in many cases + * Content-Length in a message will return {@code false}, as the pekko documentation states that "in many cases * it's dangerous to rely on the (non-)existence of a content-length" (see {@link RequestEntity#getContentLengthOption()}). * * @param request The request. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/ThingsRoute.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/ThingsRoute.java index 27f95b08d9..fbec9ccca4 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/ThingsRoute.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/ThingsRoute.java @@ -69,20 +69,20 @@ import org.eclipse.ditto.thingsearch.model.SearchResult; import org.eclipse.ditto.thingsearch.model.signals.commands.query.QueryThings; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpCharsets; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.MediaTypes; -import akka.http.javadsl.model.headers.Accept; -import akka.http.javadsl.model.headers.Link; -import akka.http.javadsl.model.headers.LinkParams; -import akka.http.javadsl.model.headers.LinkValue; -import akka.http.javadsl.server.PathMatchers; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpCharsets; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.MediaTypes; +import org.apache.pekko.http.javadsl.model.headers.Accept; +import org.apache.pekko.http.javadsl.model.headers.Link; +import org.apache.pekko.http.javadsl.model.headers.LinkParams; +import org.apache.pekko.http.javadsl.model.headers.LinkValue; +import org.apache.pekko.http.javadsl.server.PathMatchers; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; /** - * Builder for creating Akka HTTP routes for {@code /things}. + * Builder for creating Pekko HTTP routes for {@code /things}. */ public final class ThingsRoute extends AbstractRoute { @@ -265,9 +265,9 @@ private HttpResponse transformQueryThingsResult(final RequestContext ctx, return theResponse.withEntity(determineResponseContentType(ctx), resultArray.toString()); } - private static akka.http.javadsl.model.ContentType.NonBinary determineResponseContentType( + private static org.apache.pekko.http.javadsl.model.ContentType.NonBinary determineResponseContentType( final RequestContext ctx) { - final akka.http.javadsl.model.ContentType.NonBinary contentType; + final org.apache.pekko.http.javadsl.model.ContentType.NonBinary contentType; if (ctx.getRequest().getHeader(Accept.class) .filter(accept -> accept.value().equals(ContentType.APPLICATION_TD_JSON.getValue())) .isPresent()) { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/thingsearch/ThingSearchRoute.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/thingsearch/ThingSearchRoute.java index d69430355f..dcfdc69ec2 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/thingsearch/ThingSearchRoute.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/thingsearch/ThingSearchRoute.java @@ -28,13 +28,13 @@ import org.eclipse.ditto.thingsearch.model.signals.commands.query.CountThings; import org.eclipse.ditto.thingsearch.model.signals.commands.query.QueryThings; -import akka.http.javadsl.server.Directives; -import akka.http.javadsl.server.PathMatchers; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.server.Directives; +import org.apache.pekko.http.javadsl.server.PathMatchers; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; /** - * Builder for creating Akka HTTP routes for {@code /search/things}. + * Builder for creating Pekko HTTP routes for {@code /search/things}. */ public final class ThingSearchRoute extends AbstractRoute { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/IncomingWebSocketEventSniffer.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/IncomingWebSocketEventSniffer.java index e6334ea630..eb1a362313 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/IncomingWebSocketEventSniffer.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/IncomingWebSocketEventSniffer.java @@ -20,10 +20,10 @@ import com.typesafe.config.Config; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpRequest; -import akka.stream.javadsl.Flow; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.stream.javadsl.Flow; /** * Extension to sniff incoming events over websocket. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/NoOpIncomingWebSocketEventSniffer.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/NoOpIncomingWebSocketEventSniffer.java index 3a6bc7bb15..aed9fb9ed4 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/NoOpIncomingWebSocketEventSniffer.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/NoOpIncomingWebSocketEventSniffer.java @@ -14,11 +14,11 @@ import com.typesafe.config.Config; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpRequest; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Sink; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Sink; /** * Event Sniffer for incoming WebSocket messages that does purposefully nothing. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/NoOpOutgoingWebSocketEventSniffer.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/NoOpOutgoingWebSocketEventSniffer.java index b650b83536..3c49678127 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/NoOpOutgoingWebSocketEventSniffer.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/NoOpOutgoingWebSocketEventSniffer.java @@ -14,11 +14,11 @@ import com.typesafe.config.Config; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpRequest; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Sink; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Sink; /** * Event Sniffer for outgoing WebSocket messages that does purposefully nothing. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/NoOpWebSocketConfigProvider.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/NoOpWebSocketConfigProvider.java index c188063613..5e34ba62ee 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/NoOpWebSocketConfigProvider.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/NoOpWebSocketConfigProvider.java @@ -17,7 +17,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Null implementation for {@link WebSocketConfigProvider} which does nothing. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/NoOpWebSocketSupervisor.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/NoOpWebSocketSupervisor.java index 3d6dc2d39a..a073a17389 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/NoOpWebSocketSupervisor.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/NoOpWebSocketSupervisor.java @@ -17,7 +17,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Null implementation for {@link WebSocketSupervisor} which does nothing. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/OutgoingWebSocketEventSniffer.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/OutgoingWebSocketEventSniffer.java index d867485530..06de02ada3 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/OutgoingWebSocketEventSniffer.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/OutgoingWebSocketEventSniffer.java @@ -19,10 +19,10 @@ import com.typesafe.config.Config; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpRequest; -import akka.stream.javadsl.Flow; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.stream.javadsl.Flow; /** * Extension to sniff outgoing events over websocket. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/WebSocketConfigProvider.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/WebSocketConfigProvider.java index 343c8cecfc..62f7889a35 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/WebSocketConfigProvider.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/WebSocketConfigProvider.java @@ -23,7 +23,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Provides a method to customize a given {@link org.eclipse.ditto.gateway.service.util.config.streaming.WebsocketConfig}. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/WebSocketRoute.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/WebSocketRoute.java index 6d53aad66c..dbe00b4154 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/WebSocketRoute.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/WebSocketRoute.java @@ -66,10 +66,10 @@ import org.eclipse.ditto.gateway.service.util.config.streaming.StreamingConfig; import org.eclipse.ditto.gateway.service.util.config.streaming.WebsocketConfig; import org.eclipse.ditto.internal.models.signalenrichment.SignalEnrichmentFacade; -import org.eclipse.ditto.internal.utils.akka.controlflow.Filter; -import org.eclipse.ditto.internal.utils.akka.controlflow.LimitRateByRejection; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.controlflow.Filter; +import org.eclipse.ditto.internal.utils.pekko.controlflow.LimitRateByRejection; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.config.ScopedConfig; import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; import org.eclipse.ditto.internal.utils.metrics.instruments.counter.Counter; @@ -98,42 +98,42 @@ import org.eclipse.ditto.thingsearch.model.signals.commands.SearchErrorResponse; import org.slf4j.Logger; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.event.Logging; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.ws.Message; -import akka.http.javadsl.model.ws.TextMessage; -import akka.http.javadsl.model.ws.WebSocketUpgrade; -import akka.http.javadsl.server.Directives; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; -import akka.japi.Pair; -import akka.japi.function.Function; -import akka.japi.pf.PFBuilder; -import akka.pattern.Patterns; -import akka.stream.Attributes; -import akka.stream.FanOutShape2; -import akka.stream.FlowShape; -import akka.stream.Graph; -import akka.stream.KillSwitches; -import akka.stream.Materializer; -import akka.stream.SharedKillSwitch; -import akka.stream.SinkShape; -import akka.stream.UniformFanInShape; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.GraphDSL; -import akka.stream.javadsl.Merge; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.event.Logging; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.ws.Message; +import org.apache.pekko.http.javadsl.model.ws.TextMessage; +import org.apache.pekko.http.javadsl.model.ws.WebSocketUpgrade; +import org.apache.pekko.http.javadsl.server.Directives; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.japi.function.Function; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.stream.FanOutShape2; +import org.apache.pekko.stream.FlowShape; +import org.apache.pekko.stream.Graph; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.SharedKillSwitch; +import org.apache.pekko.stream.SinkShape; +import org.apache.pekko.stream.UniformFanInShape; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.GraphDSL; +import org.apache.pekko.stream.javadsl.Merge; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; import scala.util.Either; import scala.util.Left; import scala.util.Right; /** - * Builder for creating Akka HTTP routes for {@code /ws}. + * Builder for creating Pekko HTTP routes for {@code /ws}. */ @NotThreadSafe public final class WebSocketRoute implements WebSocketRouteBuilder { @@ -919,7 +919,7 @@ private static SearchErrorResponse buildSearchErrorResponse(final DittoRuntimeEx private static Optional extractJwtFromRequestIfPresent(final HttpRequest request) { return request.getHeader(HttpHeader.AUTHORIZATION.toString()) - .map(akka.http.javadsl.model.HttpHeader::value) + .map(org.apache.pekko.http.javadsl.model.HttpHeader::value) .filter(s -> s.startsWith(BEARER)) .map(ImmutableJsonWebToken::fromAuthorization); } diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/WebSocketRouteBuilder.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/WebSocketRouteBuilder.java index 34403b37f1..8ee814b617 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/WebSocketRouteBuilder.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/WebSocketRouteBuilder.java @@ -21,11 +21,11 @@ import org.eclipse.ditto.gateway.service.endpoints.utils.GatewaySignalEnrichmentProvider; import org.eclipse.ditto.protocol.adapter.ProtocolAdapter; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; /** - * Builder with a fluent API for creating Akka HTTP routes for websocket connections. + * Builder with a fluent API for creating Pekko HTTP routes for websocket connections. */ public interface WebSocketRouteBuilder { @@ -97,7 +97,7 @@ public interface WebSocketRouteBuilder { WebSocketRouteBuilder withWebSocketConfigProvider(WebSocketConfigProvider webSocketConfigProvider); /** - * Creates the Akka HTTP route for websocket. + * Creates the Pekko HTTP route for websocket. * * @param version the WS API version. * @param correlationId the correlation ID of the request to open the WS connection. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/WebSocketSupervisor.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/WebSocketSupervisor.java index bce531026b..1f0d035f33 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/WebSocketSupervisor.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/websocket/WebSocketSupervisor.java @@ -20,7 +20,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Provides the means to supervise a particular WebSocket stream. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/whoami/WhoamiRoute.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/whoami/WhoamiRoute.java index 91fee572c1..e5a0de57ed 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/whoami/WhoamiRoute.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/routes/whoami/WhoamiRoute.java @@ -17,9 +17,9 @@ import org.eclipse.ditto.gateway.service.endpoints.routes.AbstractRoute; import org.eclipse.ditto.gateway.service.endpoints.routes.RouteBaseProperties; -import akka.http.javadsl.server.PathMatchers; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.server.PathMatchers; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; /** * Route providing information about the current user. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/utils/DefaultGatewaySignalEnrichmentProvider.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/utils/DefaultGatewaySignalEnrichmentProvider.java index 42bd142681..abbc72da8c 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/utils/DefaultGatewaySignalEnrichmentProvider.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/utils/DefaultGatewaySignalEnrichmentProvider.java @@ -24,8 +24,8 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpRequest; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpRequest; /** * Provider for gateway-service of signal-enriching facades that uses an async Caffeine cache in order to load diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/utils/DittoRejectionHandlerFactory.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/utils/DittoRejectionHandlerFactory.java index a4a9e38f45..35750fcb38 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/utils/DittoRejectionHandlerFactory.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/utils/DittoRejectionHandlerFactory.java @@ -12,17 +12,17 @@ */ package org.eclipse.ditto.gateway.service.endpoints.utils; -import static akka.http.javadsl.server.Directives.complete; +import static org.apache.pekko.http.javadsl.server.Directives.complete; import java.text.MessageFormat; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.server.MissingQueryParamRejection; -import akka.http.javadsl.server.RejectionHandler; -import akka.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.server.MissingQueryParamRejection; +import org.apache.pekko.http.javadsl.server.RejectionHandler; +import org.apache.pekko.http.javadsl.server.Route; /** - * Factory to create a custom {@link akka.http.javadsl.server.RejectionHandler}. + * Factory to create a custom {@link org.apache.pekko.http.javadsl.server.RejectionHandler}. */ public final class DittoRejectionHandlerFactory { @@ -33,7 +33,7 @@ private DittoRejectionHandlerFactory() { } /** - * Creates a new instance of {@link akka.http.javadsl.server.RejectionHandler} with custom behaviour. + * Creates a new instance of {@link org.apache.pekko.http.javadsl.server.RejectionHandler} with custom behaviour. * * @return The new instance. */ @@ -45,7 +45,7 @@ public static RejectionHandler createInstance() { } private static Route handleMissingQueryParam(MissingQueryParamRejection missingQueryParamRejection) { - // return status code 400 instead of the akka default 404 + // return status code 400 instead of the pekko default 404 return complete(StatusCodes.BAD_REQUEST, MessageFormat.format(MISSING_QUERY_PARAM_TEMPLATE, missingQueryParamRejection.parameterName())); } diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/utils/GatewaySignalEnrichmentProvider.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/utils/GatewaySignalEnrichmentProvider.java index 91d460efde..9920220601 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/utils/GatewaySignalEnrichmentProvider.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/utils/GatewaySignalEnrichmentProvider.java @@ -23,8 +23,8 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpRequest; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpRequest; /** * Provider of {@link SignalEnrichmentFacade} to be loaded by reflection. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/utils/HttpUtils.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/utils/HttpUtils.java index d260a0a1db..e4020ad27a 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/utils/HttpUtils.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/endpoints/utils/HttpUtils.java @@ -17,11 +17,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.headers.RawRequestURI; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.headers.RawRequestURI; /** - * Utilities for Akka-Http. + * Utilities for Pekko-Http. */ @Immutable public final class HttpUtils { @@ -34,8 +34,8 @@ private HttpUtils() { /** * Gets the (absolute) raw requestUri. - *

          NOTE: You must configure {@code raw-request-uri-header = on} for Akka-Http, otherwise the url already - * parsed by Akka Http will be returned.

          + *

          NOTE: You must configure {@code raw-request-uri-header = on} for Pekko-Http, otherwise the url already + * parsed by Pekko Http will be returned.

          * * @param request the http request * @return the raw requestUri diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/health/ClusterStatusAndHealthHelper.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/health/ClusterStatusAndHealthHelper.java index dce75c8326..788a214a07 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/health/ClusterStatusAndHealthHelper.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/health/ClusterStatusAndHealthHelper.java @@ -29,8 +29,8 @@ import org.eclipse.ditto.base.service.CompletableFutureUtils; import org.eclipse.ditto.gateway.service.util.config.health.HealthCheckConfig; -import org.eclipse.ditto.internal.utils.akka.SimpleCommand; -import org.eclipse.ditto.internal.utils.akka.SimpleCommandResponse; +import org.eclipse.ditto.internal.utils.pekko.SimpleCommand; +import org.eclipse.ditto.internal.utils.pekko.SimpleCommandResponse; import org.eclipse.ditto.internal.utils.health.StatusDetailMessage; import org.eclipse.ditto.internal.utils.health.StatusInfo; import org.eclipse.ditto.internal.utils.health.cluster.ClusterRoleStatus; @@ -43,8 +43,8 @@ import org.eclipse.ditto.json.JsonObjectBuilder; import org.eclipse.ditto.json.JsonValue; -import akka.actor.ActorSystem; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.pattern.Patterns; /** * Helper for retrieving status and health information via the cluster. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/health/DittoStatusAndHealthProviderFactory.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/health/DittoStatusAndHealthProviderFactory.java index dca7e895e4..298fd141bc 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/health/DittoStatusAndHealthProviderFactory.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/health/DittoStatusAndHealthProviderFactory.java @@ -19,7 +19,7 @@ import org.eclipse.ditto.internal.utils.health.status.StatusHealthSupplier; import org.eclipse.ditto.internal.utils.health.status.StatusSupplier; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Provides a {@link StatusAndHealthProvider} for the ditto-cluster. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/health/GatewayHttpReadinessCheck.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/health/GatewayHttpReadinessCheck.java index 352b0a6123..f70cbab199 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/health/GatewayHttpReadinessCheck.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/health/GatewayHttpReadinessCheck.java @@ -16,12 +16,12 @@ import java.util.concurrent.CompletionStage; import java.util.function.Supplier; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.pattern.Patterns; /** - * Health check supplier for Akka Management checking whether the {@code GatewayRootActor} already started the HTTP + * Health check supplier for Pekko Management checking whether the {@code GatewayRootActor} already started the HTTP * route. */ public final class GatewayHttpReadinessCheck implements Supplier> { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/proxy/actors/GatewayProxyActor.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/proxy/actors/GatewayProxyActor.java index 21eeab1037..dbad422ee1 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/proxy/actors/GatewayProxyActor.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/proxy/actors/GatewayProxyActor.java @@ -22,8 +22,8 @@ import org.eclipse.ditto.connectivity.model.signals.commands.query.RetrieveConnections; import org.eclipse.ditto.gateway.service.endpoints.actors.ConnectionsRetrievalActorPropsFactory; import org.eclipse.ditto.gateway.service.util.config.endpoints.HttpConfig; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.config.ScopedConfig; import org.eclipse.ditto.internal.utils.pubsub.StreamingType; import org.eclipse.ditto.json.JsonRuntimeException; @@ -31,16 +31,16 @@ import com.typesafe.config.Config; -import akka.actor.AbstractActor; -import akka.actor.ActorKilledException; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.OneForOneStrategy; -import akka.actor.Props; -import akka.actor.Status; -import akka.actor.SupervisorStrategy; -import akka.japi.pf.DeciderBuilder; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorKilledException; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.OneForOneStrategy; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.japi.pf.DeciderBuilder; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * A command proxy for the Ditto gateway. @@ -77,13 +77,13 @@ private GatewayProxyActor(final ActorRef pubSubMediator, final ActorSelection de } /** - * Creates Akka configuration object Props for this GatewayProxyActor. + * Creates Pekko configuration object Props for this GatewayProxyActor. * * @param pubSubMediator the Pub/Sub mediator to use for subscribing for events. * @param devOpsCommandsActor the Actor ref to the local DevOpsCommandsActor. * @param edgeCommandForwarder the Actor ref to the {@code EdgeCommandForwarderActor}. * @param httpConfig the http config. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final ActorRef pubSubMediator, final ActorSelection devOpsCommandsActor, final ActorRef edgeCommandForwarder, final HttpConfig httpConfig) { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/proxy/actors/QueryThingsPerRequestActor.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/proxy/actors/QueryThingsPerRequestActor.java index 7aea646934..ce686aa3f3 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/proxy/actors/QueryThingsPerRequestActor.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/proxy/actors/QueryThingsPerRequestActor.java @@ -21,9 +21,9 @@ import javax.annotation.Nullable; import org.eclipse.ditto.gateway.service.util.config.endpoints.HttpConfig; -import org.eclipse.ditto.internal.utils.akka.actors.AbstractActorWithShutdownBehavior; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.actors.AbstractActorWithShutdownBehavior; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.json.JsonArray; import org.eclipse.ditto.json.JsonCollectors; @@ -40,13 +40,13 @@ import org.eclipse.ditto.thingsearch.model.signals.commands.query.QueryThings; import org.eclipse.ditto.thingsearch.model.signals.commands.query.QueryThingsResponse; -import akka.Done; -import akka.actor.ActorRef; -import akka.actor.Cancellable; -import akka.actor.CoordinatedShutdown; -import akka.actor.Props; -import akka.actor.ReceiveTimeout; -import akka.pattern.Patterns; +import org.apache.pekko.Done; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Cancellable; +import org.apache.pekko.actor.CoordinatedShutdown; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.ReceiveTimeout; +import org.apache.pekko.pattern.Patterns; /** * Actor which is started for each {@link QueryThings} command in the gateway handling the response from @@ -92,9 +92,9 @@ private QueryThingsPerRequestActor(final QueryThings queryThings, } /** - * Creates Akka configuration object Props for this QueryThingsPerRequestActor. + * Creates Pekko configuration object Props for this QueryThingsPerRequestActor. * - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ static Props props(final QueryThings queryThings, final ActorRef commandForwarderActor, diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/proxy/actors/StatisticsActor.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/proxy/actors/StatisticsActor.java index 74d18f9312..5413a6a0a2 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/proxy/actors/StatisticsActor.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/proxy/actors/StatisticsActor.java @@ -39,8 +39,8 @@ import org.eclipse.ditto.base.model.json.Jsonifiable; import org.eclipse.ditto.gateway.service.proxy.config.StatisticsConfig; import org.eclipse.ditto.gateway.service.proxy.config.StatisticsShardConfig; -import org.eclipse.ditto.internal.utils.akka.actors.AbstractActorWithStashWithTimers; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.actors.AbstractActorWithStashWithTimers; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.cluster.ClusterStatusSupplier; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.internal.utils.cluster.ShardRegionExtractor; @@ -57,17 +57,17 @@ import org.eclipse.ditto.json.JsonObjectBuilder; import org.eclipse.ditto.json.JsonValue; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Address; -import akka.actor.Props; -import akka.cluster.Cluster; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.cluster.sharding.ClusterSharding; -import akka.cluster.sharding.ShardRegion; -import akka.event.DiagnosticLoggingAdapter; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.AskTimeoutException; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Address; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.cluster.sharding.ClusterSharding; +import org.apache.pekko.cluster.sharding.ShardRegion; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.AskTimeoutException; import scala.concurrent.duration.FiniteDuration; /** @@ -110,10 +110,10 @@ private StatisticsActor(final ActorRef pubSubMediator) { } /** - * Creates Akka configuration object Props for this StatisticsActor. + * Creates Pekko configuration object Props for this StatisticsActor. * * @param pubSubMediator the Pub/Sub mediator to use. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ static Props props(final ActorRef pubSubMediator) { diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/proxy/config/StatisticsConfig.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/proxy/config/StatisticsConfig.java index 75c0377660..7bc5116164 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/proxy/config/StatisticsConfig.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/proxy/config/StatisticsConfig.java @@ -23,7 +23,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorContext; +import org.apache.pekko.actor.ActorContext; /** * Provides configuration settings for the statistics actor. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/AuthenticationChain.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/AuthenticationChain.java index afd894e74a..0ec327b255 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/AuthenticationChain.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/AuthenticationChain.java @@ -28,10 +28,10 @@ import javax.annotation.concurrent.Immutable; import org.eclipse.ditto.base.model.headers.DittoHeaders; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * Handles authentication by multiple authentication providers. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/AuthenticationProvider.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/AuthenticationProvider.java index 731fa6ef23..ffbdb24e78 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/AuthenticationProvider.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/AuthenticationProvider.java @@ -16,7 +16,7 @@ import org.eclipse.ditto.base.model.headers.DittoHeaders; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * Responsible for authenticating requests by a specific mechanism. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/TimeMeasuringAuthenticationProvider.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/TimeMeasuringAuthenticationProvider.java index 40594cfa6c..4b2acc2a41 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/TimeMeasuringAuthenticationProvider.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/TimeMeasuringAuthenticationProvider.java @@ -25,12 +25,12 @@ import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.eclipse.ditto.gateway.api.GatewayAuthenticationProviderUnavailableException; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.metrics.instruments.timer.StartedTimer; import org.eclipse.ditto.internal.utils.tracing.TraceUtils; import org.eclipse.ditto.internal.utils.tracing.span.SpanTagKey; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * An abstract class that measures the time it takes to authenticate a request. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DefaultJwtAuthenticationResultProvider.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DefaultJwtAuthenticationResultProvider.java index ff4da51f2b..5d625c48d2 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DefaultJwtAuthenticationResultProvider.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DefaultJwtAuthenticationResultProvider.java @@ -26,7 +26,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Default implementation of {@link JwtAuthenticationResultProvider}. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DefaultJwtExtractor.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DefaultJwtExtractor.java index 38ec8290c8..9b719faa91 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DefaultJwtExtractor.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DefaultJwtExtractor.java @@ -20,7 +20,7 @@ import org.eclipse.ditto.gateway.service.security.HttpHeader; import org.eclipse.ditto.gateway.service.security.utils.HttpUtils; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * Default implementation of {@link JwtExtractor} diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DittoJwtAuthorizationSubjectsProvider.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DittoJwtAuthorizationSubjectsProvider.java index cd26f974ca..43d391d9f7 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DittoJwtAuthorizationSubjectsProvider.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DittoJwtAuthorizationSubjectsProvider.java @@ -33,7 +33,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Implementation of {@link JwtAuthorizationSubjectsProvider} for Google JWTs. @@ -43,7 +43,7 @@ public final class DittoJwtAuthorizationSubjectsProvider implements JwtAuthoriza private final JwtSubjectIssuersConfig jwtSubjectIssuersConfig; - @SuppressWarnings("unused") //Loaded via reflection by AkkaExtension. + @SuppressWarnings("unused") //Loaded via reflection by PekkoExtension. public DittoJwtAuthorizationSubjectsProvider(final ActorSystem actorSystem, final Config extensionConfig) { this(jwtSubjectIssuersConfig(actorSystem)); } diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DittoPublicKeyProvider.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DittoPublicKeyProvider.java index 0b322ecaaa..ec8206776f 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DittoPublicKeyProvider.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DittoPublicKeyProvider.java @@ -65,12 +65,12 @@ import com.github.benmanes.caffeine.cache.Caffeine; import com.github.benmanes.caffeine.cache.RemovalListener; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.stream.Materializer; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Sink; -import akka.util.ByteString; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.util.ByteString; import io.jsonwebtoken.JwtParser; import io.jsonwebtoken.Jwts; diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtAuthenticationFactory.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtAuthenticationFactory.java index 71bd074ef1..e992a82a0d 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtAuthenticationFactory.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtAuthenticationFactory.java @@ -21,7 +21,7 @@ import org.eclipse.ditto.internal.utils.config.ScopedConfig; import org.eclipse.ditto.internal.utils.http.HttpClientFacade; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * A factory for {@link org.eclipse.ditto.jwt.model.JsonWebToken} related security. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtAuthenticationProvider.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtAuthenticationProvider.java index 5988304b58..86b63a2c3c 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtAuthenticationProvider.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtAuthenticationProvider.java @@ -30,11 +30,11 @@ import org.eclipse.ditto.gateway.service.security.authentication.AuthenticationResult; import org.eclipse.ditto.gateway.service.security.authentication.DefaultAuthenticationResult; import org.eclipse.ditto.gateway.service.security.authentication.TimeMeasuringAuthenticationProvider; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.jwt.model.JsonWebToken; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * Handles authentication by JWT. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtAuthenticationResultProvider.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtAuthenticationResultProvider.java index abe876df91..65cd8c9f48 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtAuthenticationResultProvider.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtAuthenticationResultProvider.java @@ -23,7 +23,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Responsible for extraction of an {@link org.eclipse.ditto.gateway.service.security.authentication.AuthenticationResult} out of a diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtAuthorizationSubjectsProvider.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtAuthorizationSubjectsProvider.java index faff1cc3c7..be6abca044 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtAuthorizationSubjectsProvider.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtAuthorizationSubjectsProvider.java @@ -23,7 +23,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * A provider for {@link AuthorizationSubject}s contained in a {@link JsonWebToken}. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtExtractor.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtExtractor.java index ab270ad438..c3d436964e 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtExtractor.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/JwtExtractor.java @@ -19,7 +19,7 @@ import org.eclipse.ditto.gateway.api.GatewayAuthenticationFailedException; import org.eclipse.ditto.jwt.model.JsonWebToken; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * Extract a JsonWebToken from the given RequestContext or returns an empty Optional if no token is present. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/WebSocketJwtExtractor.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/WebSocketJwtExtractor.java index 14a350090e..cf9cdc78cd 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/WebSocketJwtExtractor.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/WebSocketJwtExtractor.java @@ -21,7 +21,7 @@ import org.eclipse.ditto.jwt.model.ImmutableJsonWebToken; import org.eclipse.ditto.jwt.model.JsonWebToken; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * Implementation of {@link JwtExtractor} extracting diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/preauth/PreAuthenticatedAuthenticationProvider.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/preauth/PreAuthenticatedAuthenticationProvider.java index 7c34fd3220..dd6bcf7de4 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/preauth/PreAuthenticatedAuthenticationProvider.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/authentication/preauth/PreAuthenticatedAuthenticationProvider.java @@ -34,14 +34,14 @@ import org.eclipse.ditto.gateway.service.security.authentication.DefaultAuthenticationResult; import org.eclipse.ditto.gateway.service.security.authentication.TimeMeasuringAuthenticationProvider; import org.eclipse.ditto.gateway.service.security.utils.HttpUtils; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.utils.jsr305.annotations.AllValuesAreNonnullByDefault; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.Query; -import akka.http.javadsl.model.Uri; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.Query; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * Handles authentication by using a defined header field {@link org.eclipse.ditto.gateway.service.security.HttpHeader#X_DITTO_PRE_AUTH} which proxies in front diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/utils/HttpUtils.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/utils/HttpUtils.java index b1f3710e6a..b7ed908e58 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/utils/HttpUtils.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/security/utils/HttpUtils.java @@ -26,11 +26,11 @@ import org.eclipse.ditto.gateway.service.security.parser.RequestHeaders; import org.eclipse.ditto.gateway.service.security.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.headers.Authorization; -import akka.http.javadsl.model.headers.BasicHttpCredentials; -import akka.http.javadsl.model.headers.Cookie; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.headers.Authorization; +import org.apache.pekko.http.javadsl.model.headers.BasicHttpCredentials; +import org.apache.pekko.http.javadsl.model.headers.Cookie; +import org.apache.pekko.http.javadsl.server.RequestContext; @Immutable public final class HttpUtils { @@ -51,7 +51,7 @@ private HttpUtils() { public static Optional getRequestHeader(final RequestContext requestContext, final String name) { return requestContext.getRequest() .getHeader(name) - .map(akka.http.javadsl.model.HttpHeader::value); + .map(org.apache.pekko.http.javadsl.model.HttpHeader::value); } /** @@ -68,9 +68,9 @@ public static RequestHeaders getHeaders(final RequestContext requestContext) { requestContext.getRequest().getHeaders().forEach( header -> headers.put(header.name().toLowerCase(), header.value())); - final Iterable cookies = requestContext.getRequest() + final Iterable cookies = requestContext.getRequest() .getHeader(Cookie.class) - .map(akka.http.javadsl.model.headers.Cookie::getCookies) + .map(org.apache.pekko.http.javadsl.model.headers.Cookie::getCookies) .orElse(Collections.emptyList()); final Map cookieMap = new HashMap<>(); cookies.forEach(cookie -> cookieMap.put(cookie.name(), cookie.value())); @@ -91,7 +91,7 @@ public static boolean containsAuthorizationForPrefix(final RequestContext reques final Optional authorizationHeader = requestContext.getRequest().getHeader(HttpHeader.AUTHORIZATION.toString()) - .map(akka.http.javadsl.model.HttpHeader::value) + .map(org.apache.pekko.http.javadsl.model.HttpHeader::value) .filter(headerValue -> headerValue.startsWith(authorizationHeaderPrefix)); return authorizationHeader.isPresent(); diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/starter/GatewayRootActor.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/starter/GatewayRootActor.java index f757920f47..4a67a06503 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/starter/GatewayRootActor.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/starter/GatewayRootActor.java @@ -52,7 +52,7 @@ import org.eclipse.ditto.gateway.service.util.config.security.AuthenticationConfig; import org.eclipse.ditto.gateway.service.util.config.security.DevOpsConfig; import org.eclipse.ditto.gateway.service.util.config.security.OAuthConfig; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.cache.config.CacheConfig; import org.eclipse.ditto.internal.utils.cluster.ClusterStatusSupplier; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; @@ -68,20 +68,20 @@ import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.ActorRefFactory; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.cluster.Cluster; -import akka.event.DiagnosticLoggingAdapter; -import akka.http.javadsl.Http; -import akka.http.javadsl.ServerBinding; -import akka.http.javadsl.server.Route; -import akka.japi.pf.ReceiveBuilder; -import akka.stream.SystemMaterializer; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.http.javadsl.Http; +import org.apache.pekko.http.javadsl.ServerBinding; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.stream.SystemMaterializer; /** - * The Root Actor of the API Gateway's Akka ActorSystem. + * The Root Actor of the API Gateway's Pekko ActorSystem. */ public final class GatewayRootActor extends DittoRootActor { @@ -171,11 +171,11 @@ private GatewayRootActor(final GatewayConfig gatewayConfig, final ActorRef pubSu } /** - * Creates Akka configuration object Props for this actor. + * Creates Pekko configuration object Props for this actor. * * @param gatewayConfig the configuration settings of this service. * @param pubSubMediator the pub-sub mediator. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final GatewayConfig gatewayConfig, final ActorRef pubSubMediator) { return Props.create(GatewayRootActor.class, gatewayConfig, pubSubMediator); diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/starter/GatewayService.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/starter/GatewayService.java index 52bcc1a178..01a8827bbd 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/starter/GatewayService.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/starter/GatewayService.java @@ -20,8 +20,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.actor.ActorRef; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; /** * The Gateway service for Eclipse Ditto. @@ -30,7 +30,7 @@ public final class GatewayService extends DittoService { /** - * Name for the Akka actor system of the Gateway service. + * Name for the Pekko actor system of the Gateway service. */ public static final String SERVICE_NAME = "gateway"; diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/NoOpAuthorizationEnforcer.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/NoOpAuthorizationEnforcer.java index d7c5578d03..b327d984cc 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/NoOpAuthorizationEnforcer.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/NoOpAuthorizationEnforcer.java @@ -19,8 +19,8 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * Null implementation for {@link StreamingAuthorizationEnforcer}. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/StreamingAuthorizationEnforcer.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/StreamingAuthorizationEnforcer.java index d17dcabbdf..639483a2be 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/StreamingAuthorizationEnforcer.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/StreamingAuthorizationEnforcer.java @@ -22,8 +22,8 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * Enforces authorization in order to establish a Streaming connection. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/DefaultSupervisedStream.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/DefaultSupervisedStream.java index 4de658ab7c..1929f3ec81 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/DefaultSupervisedStream.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/DefaultSupervisedStream.java @@ -15,8 +15,8 @@ import java.util.concurrent.CompletionStage; import java.util.function.Consumer; -import akka.Done; -import akka.stream.KillSwitch; +import org.apache.pekko.Done; +import org.apache.pekko.stream.KillSwitch; /** * Implementation of {@link SupervisedStream}. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingActor.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingActor.java index b86130cdf4..704bdb33fc 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingActor.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingActor.java @@ -23,10 +23,10 @@ import org.eclipse.ditto.gateway.service.streaming.signals.Connect; import org.eclipse.ditto.gateway.service.util.config.streaming.DefaultStreamingConfig; import org.eclipse.ditto.gateway.service.util.config.streaming.StreamingConfig; -import org.eclipse.ditto.internal.utils.akka.actors.ModifyConfigBehavior; -import org.eclipse.ditto.internal.utils.akka.actors.RetrieveConfigBehavior; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.actors.ModifyConfigBehavior; +import org.eclipse.ditto.internal.utils.pekko.actors.RetrieveConfigBehavior; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; import org.eclipse.ditto.internal.utils.metrics.instruments.gauge.Gauge; import org.eclipse.ditto.internal.utils.pubsubthings.DittoProtocolSub; @@ -34,15 +34,15 @@ import com.typesafe.config.Config; -import akka.actor.AbstractActorWithTimers; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.OneForOneStrategy; -import akka.actor.Props; -import akka.actor.SupervisorStrategy; -import akka.japi.pf.DeciderBuilder; -import akka.japi.pf.ReceiveBuilder; -import akka.stream.Materializer; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.OneForOneStrategy; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.japi.pf.DeciderBuilder; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.stream.Materializer; /** * Parent Actor for {@link StreamingSessionActor}s delegating most of the messages to a specific session. @@ -107,7 +107,7 @@ private StreamingActor(final DittoProtocolSub dittoProtocolSub, } /** - * Creates Akka configuration object Props for this StreamingActor. + * Creates Pekko configuration object Props for this StreamingActor. * * @param dittoProtocolSub the Ditto protocol sub access. * @param commandRouter the command router used to send signals into the cluster. @@ -115,9 +115,9 @@ private StreamingActor(final DittoProtocolSub dittoProtocolSub, * @param jwtAuthenticationResultProvider the JwtAuthenticationResultProvider. * @param streamingConfig the streaming config. * @param headerTranslator translates headers from external sources or to external sources. - * @param pubSubMediator the ActorRef to the Akka pub/sub mediator. + * @param pubSubMediator the ActorRef to the Pekko pub/sub mediator. * @param commandForwarder the ActorRef of the actor to forward commands to. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final DittoProtocolSub dittoProtocolSub, final ActorRef commandRouter, diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingSession.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingSession.java index b986ab71e7..a31f7f1d63 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingSession.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingSession.java @@ -21,7 +21,7 @@ import org.eclipse.ditto.base.model.entity.id.WithEntityId; import org.eclipse.ditto.base.model.signals.Signal; import org.eclipse.ditto.edge.service.placeholders.EntityIdPlaceholder; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.json.JsonObject; import org.eclipse.ditto.placeholders.PlaceholderFactory; import org.eclipse.ditto.placeholders.TimePlaceholder; @@ -34,7 +34,7 @@ import org.eclipse.ditto.things.model.ThingFieldSelector; import org.eclipse.ditto.things.model.signals.events.ThingEventToThingConverter; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Store of the needed information about a streaming session of a single streaming type. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingSessionActor.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingSessionActor.java index d847fe6c9c..942f470f78 100755 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingSessionActor.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingSessionActor.java @@ -70,8 +70,8 @@ import org.eclipse.ditto.gateway.service.streaming.signals.StartStreaming; import org.eclipse.ditto.gateway.service.streaming.signals.StopStreaming; import org.eclipse.ditto.gateway.service.util.config.streaming.StreamingConfig; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.pubsub.StreamingType; import org.eclipse.ditto.internal.utils.pubsubthings.DittoProtocolSub; import org.eclipse.ditto.internal.utils.search.SubscriptionManager; @@ -87,21 +87,21 @@ import org.eclipse.ditto.thingsearch.model.signals.commands.ThingSearchCommand; import org.eclipse.ditto.thingsearch.model.signals.events.SubscriptionEvent; -import akka.Done; -import akka.actor.AbstractActorWithTimers; -import akka.actor.ActorRef; -import akka.actor.Cancellable; -import akka.actor.CoordinatedShutdown; -import akka.actor.Props; -import akka.actor.Terminated; -import akka.japi.pf.PFBuilder; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; -import akka.stream.KillSwitch; -import akka.stream.SourceRef; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.SourceQueueWithComplete; +import org.apache.pekko.Done; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Cancellable; +import org.apache.pekko.actor.CoordinatedShutdown; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Terminated; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.KillSwitch; +import org.apache.pekko.stream.SourceRef; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.SourceQueueWithComplete; import scala.PartialFunction; /** @@ -190,7 +190,7 @@ private StreamingSessionActor(final Connect connect, } /** - * Creates Akka configuration object Props for this StreamingSessionActor. + * Creates Pekko configuration object Props for this StreamingSessionActor. * * @param connect the command to start a streaming session. * @param dittoProtocolSub manager of subscriptions. @@ -201,7 +201,7 @@ private StreamingSessionActor(final Connect connect, * @param streamingSubscriptionManagerProps Props of the subscription manager for streaming subscription commands. * @param jwtValidator validator of JWT tokens. * @param jwtAuthenticationResultProvider provider of JWT authentication results. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ static Props props(final Connect connect, final DittoProtocolSub dittoProtocolSub, diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/SupervisedStream.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/SupervisedStream.java index 134b7f6e2e..b3cb069e65 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/SupervisedStream.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/actors/SupervisedStream.java @@ -14,13 +14,13 @@ import java.util.function.Consumer; -import akka.event.Logging; -import akka.stream.KillSwitch; -import akka.stream.KillSwitches; -import akka.stream.OverflowStrategy; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.SourceQueueWithComplete; +import org.apache.pekko.event.Logging; +import org.apache.pekko.stream.KillSwitch; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.OverflowStrategy; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.SourceQueueWithComplete; /** * Materialized value of a source queue for supervision of the stream for which the queue is a part. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/signals/Connect.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/signals/Connect.java index 68dd384efd..09c3f9f945 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/signals/Connect.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/streaming/signals/Connect.java @@ -26,8 +26,8 @@ import org.eclipse.ditto.base.model.json.JsonSchemaVersion; import org.eclipse.ditto.gateway.service.streaming.actors.SessionedJsonifiable; -import akka.stream.KillSwitch; -import akka.stream.javadsl.SourceQueueWithComplete; +import org.apache.pekko.stream.KillSwitch; +import org.apache.pekko.stream.javadsl.SourceQueueWithComplete; /** * Message to be sent in order to establish a new "streaming" connection via {@link org.eclipse.ditto.gateway.service.streaming.actors.StreamingActor}. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/util/config/endpoints/CloudEventsConfig.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/util/config/endpoints/CloudEventsConfig.java index c242da6a6b..116397b6dc 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/util/config/endpoints/CloudEventsConfig.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/util/config/endpoints/CloudEventsConfig.java @@ -19,7 +19,7 @@ import org.eclipse.ditto.base.model.common.DittoConstants; import org.eclipse.ditto.internal.utils.config.KnownConfigValue; -import akka.http.javadsl.model.MediaTypes; +import org.apache.pekko.http.javadsl.model.MediaTypes; /** * Provides configuration settings for the cloud events endpoint of the Ditto Gateway service. diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/util/config/endpoints/HttpConfig.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/util/config/endpoints/HttpConfig.java index be5db7bcb6..30d513b361 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/util/config/endpoints/HttpConfig.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/util/config/endpoints/HttpConfig.java @@ -25,7 +25,7 @@ import org.eclipse.ditto.base.model.json.JsonSchemaVersion; import org.eclipse.ditto.internal.utils.config.KnownConfigValue; -import akka.http.javadsl.model.MediaTypes; +import org.apache.pekko.http.javadsl.model.MediaTypes; /** * Provides configuration settings of the Gateway service's HTTP behaviour. @@ -169,7 +169,7 @@ enum GatewayHttpConfigValue implements KnownConfigValue { * PUT and POST resources validate that the content-type of a request is supported. With this config value * additional media-types can be specified, which will also be accepted. Default value * 'application/octet-stream' is for unknown or not further specified payload and request without any - * content-type declaration will also be mapped to this type by akka-http. + * content-type declaration will also be mapped to this type by pekko-http. * * @since 1.1.0 */ diff --git a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/util/config/streaming/WebsocketConfig.java b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/util/config/streaming/WebsocketConfig.java index 79cda234a1..dfc2b9c630 100644 --- a/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/util/config/streaming/WebsocketConfig.java +++ b/gateway/service/src/main/java/org/eclipse/ditto/gateway/service/util/config/streaming/WebsocketConfig.java @@ -49,7 +49,7 @@ public interface WebsocketConfig { /** * Returns the factor of maximum throughput at which rejections were sent. - * This threshold should never be reached unless Akka HTTP or the underlying TCP implementation is broken. + * This threshold should never be reached unless Pekko HTTP or the underlying TCP implementation is broken. * * @return the factor of maximum throughput at which rejections are sent. */ diff --git a/gateway/service/src/main/resources/gateway-dev.conf b/gateway/service/src/main/resources/gateway-dev.conf index 16bb7b60a3..048018db07 100755 --- a/gateway/service/src/main/resources/gateway-dev.conf +++ b/gateway/service/src/main/resources/gateway-dev.conf @@ -31,7 +31,7 @@ ditto { } } -akka { +pekko { management.http.port = 25620 @@ -59,8 +59,8 @@ akka { } seed-nodes = [ - "akka://ditto-cluster@127.0.0.1:2552", # port of the policy service to join in cluster - "akka://ditto-cluster@"${akka.remote.artery.canonical.hostname}":"${akka.remote.artery.canonical.port} + "pekko://ditto-cluster@127.0.0.1:2552", # port of the policy service to join in cluster + "pekko://ditto-cluster@"${pekko.remote.artery.canonical.hostname}":"${pekko.remote.artery.canonical.port} ] } } diff --git a/gateway/service/src/main/resources/gateway.conf b/gateway/service/src/main/resources/gateway.conf index 846bf229b0..3743add213 100755 --- a/gateway/service/src/main/resources/gateway.conf +++ b/gateway/service/src/main/resources/gateway.conf @@ -152,7 +152,7 @@ ditto { } # At which multiple of maximum throughput to send rejections. - # Should never be tripped if Akka HTTP and TCP flow control are correct. + # Should never be tripped if Pekko HTTP and TCP flow control are correct. throttling-rejection-factor = 1.25 throttling-rejection-factor = ${?GATEWAY_WEBSOCKET_THROTTLING_REJECTION_FACTOR} @@ -450,11 +450,11 @@ secrets { } } -akka.http.client { +pekko.http.client { user-agent-header = eclipse-ditto/${ditto.version} } -akka { +pekko { actor { default-dispatcher { executor = "org.eclipse.ditto.internal.utils.metrics.executor.InstrumentedForkJoinExecutorServiceConfigurator" @@ -494,7 +494,7 @@ akka { # to be able to let ongoing HTTP requests take longer: # must be higher than ${ditto.gateway.http.coordinated-shutdown-timeout} ! timeout = 70s - timeout = ${?AKKA_COORDINATED_SHUTDOWN_PHASES_SERVICE_REQUESTS_DONE_TIMEOUT} + timeout = ${?PEKKO_COORDINATED_SHUTDOWN_PHASES_SERVICE_REQUESTS_DONE_TIMEOUT} } } } @@ -502,18 +502,18 @@ akka { http { server { - server-header = "" # default: akka-http/${akka.http.version} + server-header = "" # default: pekko-http/${pekko.http.version} server-header = ${?SERVER_HEADER} request-timeout = ${ditto.gateway.http.request-timeout} request-timeout = ${?REQUEST_TIMEOUT} idle-timeout = 610s # default: 60s idle-timeout = ${?IDLE_TIMEOUT} max-connections = 4096 # default: 1024 - max-connections = ${?AKKA_HTTP_SERVER_MAX_CONNECTIONS} + max-connections = ${?PEKKO_HTTP_SERVER_MAX_CONNECTIONS} backlog = 100 # default: 100 - backlog = ${?AKKA_HTTP_SERVER_BACKLOG} + backlog = ${?PEKKO_HTTP_SERVER_BACKLOG} raw-request-uri-header = on # default: off - raw-request-uri-header = ${?AKKA_HTTP_SERVER_RAW_REQUEST_URI_HEADER} + raw-request-uri-header = ${?PEKKO_HTTP_SERVER_RAW_REQUEST_URI_HEADER} parsing { max-uri-length = 8k # default: 2k diff --git a/gateway/service/src/main/resources/logback.xml b/gateway/service/src/main/resources/logback.xml index 97cdcf2df4..0dadcbcefa 100755 --- a/gateway/service/src/main/resources/logback.xml +++ b/gateway/service/src/main/resources/logback.xml @@ -16,14 +16,14 @@ - %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{akkaSource} - %msg%n + %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{pekkoSource} - %msg%n System.err - %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{akkaSource} - %msg%n + %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{pekkoSource} - %msg%n ERROR @@ -70,9 +70,9 @@ - - - + + + diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/EndpointTestBase.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/EndpointTestBase.java index b2c4b31367..ca4244197c 100755 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/EndpointTestBase.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/EndpointTestBase.java @@ -12,7 +12,7 @@ */ package org.eclipse.ditto.gateway.service.endpoints; -import static akka.http.javadsl.model.ContentTypes.APPLICATION_JSON; +import static org.apache.pekko.http.javadsl.model.ContentTypes.APPLICATION_JSON; import static java.util.Objects.requireNonNull; import java.util.Collections; @@ -79,19 +79,19 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.http.javadsl.model.HttpEntities; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.server.Route; -import akka.http.javadsl.testkit.JUnitRouteTest; -import akka.http.javadsl.testkit.TestRouteResult; -import akka.japi.pf.ReceiveBuilder; -import akka.testkit.TestProbe; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.http.javadsl.model.HttpEntities; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.testkit.JUnitRouteTest; +import org.apache.pekko.http.javadsl.testkit.TestRouteResult; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.testkit.TestProbe; /** * Abstract base class for Endpoint tests for the gateway. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/EndpointTestConstants.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/EndpointTestConstants.java index 45dd2a842e..611ce62849 100755 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/EndpointTestConstants.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/EndpointTestConstants.java @@ -14,10 +14,10 @@ import org.eclipse.ditto.things.model.ThingId; -import akka.http.javadsl.model.StatusCode; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.model.headers.BasicHttpCredentials; -import akka.http.javadsl.model.headers.HttpCredentials; +import org.apache.pekko.http.javadsl.model.StatusCode; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.model.headers.BasicHttpCredentials; +import org.apache.pekko.http.javadsl.model.headers.HttpCredentials; /** * Constants used for gateway endpoint tests. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/AbstractHttpRequestActorTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/AbstractHttpRequestActorTest.java index 007e2be83c..66553649d4 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/AbstractHttpRequestActorTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/AbstractHttpRequestActorTest.java @@ -36,7 +36,7 @@ import org.eclipse.ditto.gateway.service.endpoints.routes.whoami.Whoami; import org.eclipse.ditto.gateway.service.util.config.DittoGatewayConfig; import org.eclipse.ditto.gateway.service.util.config.GatewayConfig; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; import org.eclipse.ditto.json.JsonObject; import org.eclipse.ditto.json.JsonPointer; @@ -57,16 +57,16 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.ResponseEntity; -import akka.http.javadsl.model.StatusCode; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.model.headers.RawHeader; -import akka.util.ByteString; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.ResponseEntity; +import org.apache.pekko.http.javadsl.model.StatusCode; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.model.headers.RawHeader; +import org.apache.pekko.util.ByteString; /** * Abstract class to set up the infrastructure to test HttpRequestActor. @@ -113,7 +113,7 @@ void testThingModifyCommand(final ThingId thingId, final DittoHeaders receivedHeaders = receivedModifyAttribute.getDittoHeaders(); if (AcknowledgementAggregatorActorStarter.shouldStartForIncoming(expectedModifyAttribute)) { assertThat(receivedHeaders.get(DittoHeaderDefinition.DITTO_ACKREGATOR_ADDRESS.getKey())) - .startsWith("akka:"); + .startsWith("pekko:"); receivedModifyAttribute = receivedModifyAttribute.setDittoHeaders( receivedHeaders.toBuilder() .removeHeader(DittoHeaderDefinition.DITTO_ACKREGATOR_ADDRESS.getKey()) @@ -202,7 +202,7 @@ HttpResponse testMessageCommand(final ThingId thingId, final DittoHeaders receivedHeaders = receivedSendThingMessage.getDittoHeaders(); if (AcknowledgementAggregatorActorStarter.shouldStartForIncoming(expectedSendThingMessage)) { assertThat(receivedHeaders.get(DittoHeaderDefinition.DITTO_ACKREGATOR_ADDRESS.getKey())) - .startsWith("akka:"); + .startsWith("pekko:"); receivedSendThingMessage = receivedSendThingMessage.setDittoHeaders( receivedHeaders.toBuilder() .removeHeader(DittoHeaderDefinition.DITTO_ACKREGATOR_ADDRESS.getKey()) diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/HttpRequestActorHeaderInteractionTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/HttpRequestActorHeaderInteractionTest.java index 12bb8fbd6b..becb0a733d 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/HttpRequestActorHeaderInteractionTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/HttpRequestActorHeaderInteractionTest.java @@ -29,7 +29,7 @@ import org.junit.runner.RunWith; import org.junit.runners.Parameterized; -import akka.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.model.StatusCodes; /** * Test the interaction between timeout, response-required and requested-acks for {@link HttpRequestActor}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/HttpRequestActorTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/HttpRequestActorTest.java index e073d0a6a6..eaa1d1d7c2 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/HttpRequestActorTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/HttpRequestActorTest.java @@ -52,16 +52,16 @@ import org.junit.Rule; import org.junit.Test; -import akka.Done; -import akka.actor.ActorRef; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpEntities; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.ResponseEntity; -import akka.http.javadsl.model.StatusCodes; -import akka.testkit.javadsl.TestKit; -import akka.util.ByteString; +import org.apache.pekko.Done; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpEntities; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.ResponseEntity; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.testkit.javadsl.TestKit; +import org.apache.pekko.util.ByteString; /** * Unit test for {@link HttpRequestActor}. @@ -118,7 +118,7 @@ public void generateLocationHeaderInTwinPersistedAcknowledgementWithCreatedStatu final DittoHeaders receivedHeaders = receivedModifyAttribute.getDittoHeaders(); if (AcknowledgementAggregatorActorStarter.shouldStartForIncoming(command)) { assertThat(receivedHeaders.get(DittoHeaderDefinition.DITTO_ACKREGATOR_ADDRESS.getKey())) - .startsWith("akka:"); + .startsWith("pekko:"); receivedModifyAttribute = receivedModifyAttribute.setDittoHeaders( receivedHeaders.toBuilder() .removeHeader(DittoHeaderDefinition.DITTO_ACKREGATOR_ADDRESS.getKey()) diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/JsonValueSourceToHttpResponseTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/JsonValueSourceToHttpResponseTest.java index 9257396cdd..1d9ac25290 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/JsonValueSourceToHttpResponseTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/JsonValueSourceToHttpResponseTest.java @@ -29,13 +29,13 @@ import org.junit.Rule; import org.junit.Test; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.model.headers.HttpEncodings; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.StreamConverters; -import akka.util.ByteString; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.model.headers.HttpEncodings; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.StreamConverters; +import org.apache.pekko.util.ByteString; /** * Unit test for {@link JsonValueSourceToHttpResponse}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/UriForLocationHeaderSupplierTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/UriForLocationHeaderSupplierTest.java index af43f2e1a2..a7f19915c4 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/UriForLocationHeaderSupplierTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/actors/UriForLocationHeaderSupplierTest.java @@ -22,9 +22,9 @@ import org.eclipse.ditto.things.model.ThingId; import org.junit.Test; -import akka.http.javadsl.model.HttpMethods; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.Uri; +import org.apache.pekko.http.javadsl.model.HttpMethods; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.Uri; /** * Unit test for {@link UriForLocationHeaderSupplier}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/directives/ContentTypeValidationDirectiveTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/directives/ContentTypeValidationDirectiveTest.java index 483606ad42..6077ea3fc6 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/directives/ContentTypeValidationDirectiveTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/directives/ContentTypeValidationDirectiveTest.java @@ -27,16 +27,16 @@ import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.junit.Test; -import akka.http.javadsl.model.ContentType; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.MediaTypes; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.server.RequestContext; -import akka.http.javadsl.server.Route; -import akka.http.javadsl.testkit.JUnitRouteTest; -import akka.http.javadsl.testkit.TestRouteResult; +import org.apache.pekko.http.javadsl.model.ContentType; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.MediaTypes; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.testkit.JUnitRouteTest; +import org.apache.pekko.http.javadsl.testkit.TestRouteResult; public final class ContentTypeValidationDirectiveTest extends JUnitRouteTest { @@ -133,7 +133,7 @@ public void testExceptionContainsDittoHeaders() { } /** - * When akka can't parse the content-type header, it appears as rawHeader and application/octet-streams is used + * When pekko can't parse the content-type header, it appears as rawHeader and application/octet-streams is used * as default, this behaviour is simulated here. */ @Test diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestLoggingFilterTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestLoggingFilterTest.java index fc0a0c0add..1faad55d2a 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestLoggingFilterTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestLoggingFilterTest.java @@ -20,8 +20,8 @@ import org.junit.Test; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.Uri; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.Uri; /** * Tests {@link org.eclipse.ditto.gateway.service.endpoints.directives.RequestLoggingFilter}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestTracingDirectiveTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestTracingDirectiveTest.java index c305310c13..d0726f9547 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestTracingDirectiveTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/directives/RequestTracingDirectiveTest.java @@ -29,7 +29,7 @@ import org.assertj.core.api.Assertions; import org.eclipse.ditto.base.model.correlationid.TestNameCorrelationId; import org.eclipse.ditto.base.model.headers.DittoHeaderDefinition; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.internal.utils.tracing.DittoTracing; import org.eclipse.ditto.internal.utils.tracing.DittoTracingInitResource; import org.eclipse.ditto.internal.utils.tracing.TraceInformationGenerator; @@ -42,14 +42,14 @@ import org.junit.Test; import org.mockito.Mockito; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpMethods; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.model.Uri; -import akka.http.javadsl.server.AllDirectives; -import akka.http.javadsl.server.Route; -import akka.http.javadsl.testkit.JUnitRouteTest; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpMethods; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.http.javadsl.server.AllDirectives; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.testkit.JUnitRouteTest; /** * Unit test for {@link RequestTracingDirective}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/DittoRuntimeExceptionToHttpResponseTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/DittoRuntimeExceptionToHttpResponseTest.java index 7d6e43b293..a756555d14 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/DittoRuntimeExceptionToHttpResponseTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/DittoRuntimeExceptionToHttpResponseTest.java @@ -32,10 +32,10 @@ import org.junit.Test; import org.junit.rules.TestName; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpResponse; -import akka.util.ByteString; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.util.ByteString; /** * Unit test for {@link DittoRuntimeExceptionToHttpResponse}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteExceptionHandlerTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteExceptionHandlerTest.java index 822aa8f0be..f2c52689a8 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteExceptionHandlerTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteExceptionHandlerTest.java @@ -36,16 +36,16 @@ import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.MediaTypes; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.server.Directives; -import akka.http.javadsl.server.ExceptionHandler; -import akka.http.javadsl.server.RejectionHandler; -import akka.http.javadsl.server.Route; -import akka.http.javadsl.testkit.JUnitRouteTest; -import akka.http.javadsl.testkit.TestRoute; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.MediaTypes; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.server.Directives; +import org.apache.pekko.http.javadsl.server.ExceptionHandler; +import org.apache.pekko.http.javadsl.server.RejectionHandler; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.testkit.JUnitRouteTest; +import org.apache.pekko.http.javadsl.testkit.TestRoute; /** * Unit test for {@link RootRouteExceptionHandler}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteTest.java index 5326c07475..0ad0544dd6 100755 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/RootRouteTest.java @@ -70,14 +70,14 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.model.headers.Location; -import akka.http.javadsl.model.headers.RawHeader; -import akka.http.javadsl.testkit.TestRoute; -import akka.http.javadsl.testkit.TestRouteResult; -import akka.stream.SystemMaterializer; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.model.headers.Location; +import org.apache.pekko.http.javadsl.model.headers.RawHeader; +import org.apache.pekko.http.javadsl.testkit.TestRoute; +import org.apache.pekko.http.javadsl.testkit.TestRouteResult; +import org.apache.pekko.stream.SystemMaterializer; /** * Tests {@link RootRoute}. @@ -366,7 +366,7 @@ public void getThingsUrlWithIdsWithNonExistingVersionNumber() { public void getThingWithResponseRequiredFalse() { final HttpRequest request = withHttps(withPreAuthenticatedAuthentication( HttpRequest.GET(THINGS_2_PATH + "/org.eclipse.ditto%3Adummy") - )).addHeader(akka.http.javadsl.model.HttpHeader.parse("response-required", "false")); + )).addHeader(org.apache.pekko.http.javadsl.model.HttpHeader.parse("response-required", "false")); final TestRouteResult result = rootTestRoute.run(request); result.assertStatusCode(StatusCodes.BAD_REQUEST); @@ -452,7 +452,7 @@ public void getExceptionForDuplicateHeaderFields() { public void getExceptionForDuplicationHeaderAndQueryParameter() { final String headerKey = DittoHeaderDefinition.TIMEOUT.getKey(); HttpRequest httpRequest = HttpRequest.GET(THINGS_2_PATH_WITH_IDS + "&" + headerKey + "=32s"); - httpRequest = httpRequest.addHeader(akka.http.javadsl.model.HttpHeader.parse(headerKey, "23s")); + httpRequest = httpRequest.addHeader(org.apache.pekko.http.javadsl.model.HttpHeader.parse(headerKey, "23s")); final GatewayDuplicateHeaderException expectedException = GatewayDuplicateHeaderException.newBuilder() .message(() -> MessageFormat.format( "<{0}> was provided as header as well as query parameter with divergent values!", headerKey)) @@ -497,7 +497,7 @@ public void getExceptionDueToLargeHeaders() { final HttpRequest request = withPreAuthenticatedAuthentication(withHttps(HttpRequest.GET(THING_SEARCH_2_PATH) .withHeaders(Collections.singleton( - akka.http.javadsl.model.HttpHeader.parse("x-correlation-id", largeString))))); + org.apache.pekko.http.javadsl.model.HttpHeader.parse("x-correlation-id", largeString))))); final TestRouteResult result = rootTestRoute.run(request); result.assertStatusCode(StatusCodes.REQUEST_HEADER_FIELDS_TOO_LARGE); @@ -508,16 +508,16 @@ public void getExceptionDueToLargeHeaders() { */ @Test public void getExceptionDueToInvalidHeaderKey() { - assertThatExceptionOfType(akka.http.scaladsl.model.IllegalHeaderException.class).isThrownBy(() -> { - akka.http.javadsl.model.HttpHeader.parse("(),/:;<=>?@[\\]{}", "lol"); + assertThatExceptionOfType(org.apache.pekko.http.scaladsl.model.IllegalHeaderException.class).isThrownBy(() -> { + org.apache.pekko.http.javadsl.model.HttpHeader.parse("(),/:;<=>?@[\\]{}", "lol"); } ); } @Test public void getExceptionDueToInvalidHeaderValue() { - assertThatExceptionOfType(akka.http.scaladsl.model.IllegalHeaderException.class).isThrownBy(() -> { - akka.http.javadsl.model.HttpHeader.parse("x-correlation-id", "\n"); + assertThatExceptionOfType(org.apache.pekko.http.scaladsl.model.IllegalHeaderException.class).isThrownBy(() -> { + org.apache.pekko.http.javadsl.model.HttpHeader.parse("x-correlation-id", "\n"); } ); } diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/connections/ConnectionsRouteTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/connections/ConnectionsRouteTest.java index 2ae1869a46..f979180958 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/connections/ConnectionsRouteTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/connections/ConnectionsRouteTest.java @@ -41,14 +41,14 @@ import org.junit.Test; import org.mockito.Mockito; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.server.Directives; -import akka.http.javadsl.server.ExceptionHandler; -import akka.http.javadsl.server.RejectionHandler; -import akka.http.javadsl.server.Route; -import akka.http.javadsl.testkit.TestRoute; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.server.Directives; +import org.apache.pekko.http.javadsl.server.ExceptionHandler; +import org.apache.pekko.http.javadsl.server.RejectionHandler; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.testkit.TestRoute; public final class ConnectionsRouteTest extends EndpointTestBase { diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/devops/DevOpsRouteTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/devops/DevOpsRouteTest.java index 84463a9ba6..0f3df31162 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/devops/DevOpsRouteTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/devops/DevOpsRouteTest.java @@ -28,13 +28,13 @@ import com.typesafe.config.ConfigFactory; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpEntities; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.RequestEntity; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.server.Route; -import akka.http.javadsl.testkit.TestRoute; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpEntities; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.RequestEntity; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.testkit.TestRoute; /** * Unit test for {@link DevOpsRoute}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/policies/PoliciesRouteTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/policies/PoliciesRouteTest.java index 0f9f8a9328..545340e40c 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/policies/PoliciesRouteTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/policies/PoliciesRouteTest.java @@ -12,7 +12,7 @@ */ package org.eclipse.ditto.gateway.service.endpoints.routes.policies; -import static akka.http.javadsl.model.ContentTypes.APPLICATION_JSON; +import static org.apache.pekko.http.javadsl.model.ContentTypes.APPLICATION_JSON; import java.util.List; @@ -39,9 +39,9 @@ import org.junit.Before; import org.junit.Test; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.testkit.TestRoute; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.testkit.TestRoute; /** * Tests {@link PoliciesRoute}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/ThingsSseRouteBuilderTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/ThingsSseRouteBuilderTest.java index f5c2a626ec..418f0c2e7c 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/ThingsSseRouteBuilderTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/sse/ThingsSseRouteBuilderTest.java @@ -49,20 +49,20 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.MediaTypes; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.server.Route; -import akka.http.javadsl.testkit.TestRoute; -import akka.http.javadsl.testkit.TestRouteResult; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.SourceQueueWithComplete; -import akka.stream.javadsl.StreamRefs; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.MediaTypes; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.testkit.TestRoute; +import org.apache.pekko.http.javadsl.testkit.TestRouteResult; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.SourceQueueWithComplete; +import org.apache.pekko.stream.javadsl.StreamRefs; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Unit test for the route built with {@link ThingsSseRouteBuilder}. @@ -315,7 +315,7 @@ public void getWithAcceptHeaderAndExtraFieldsParameterOpensSseConnection() { /* * Please change this method only if you know exactly what you do. - * The order of statements and everything else is crucial as SSE route testing is not provided by Akka HTTP + * The order of statements and everything else is crucial as SSE route testing is not provided by Pekko HTTP * route test kit. */ private void executeThingsRouteTest(final HttpRequest httpRequest, final StartStreaming expectedStartStreaming) { diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/stats/StatsRouteTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/stats/StatsRouteTest.java index 2bb3c7435c..a95a7ac762 100755 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/stats/StatsRouteTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/stats/StatsRouteTest.java @@ -33,11 +33,11 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.testkit.TestRoute; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.testkit.TestRoute; /** * Tests {@link StatsRoute}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/status/OverallStatusRouteTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/status/OverallStatusRouteTest.java index b877e8e289..7e9997eff8 100755 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/status/OverallStatusRouteTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/status/OverallStatusRouteTest.java @@ -28,10 +28,10 @@ import org.junit.Before; import org.junit.Test; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.testkit.TestRoute; -import akka.http.javadsl.testkit.TestRouteResult; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.testkit.TestRoute; +import org.apache.pekko.http.javadsl.testkit.TestRouteResult; /** * Tests {@link OverallStatusRoute}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/FeaturesRouteTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/FeaturesRouteTest.java index f225fc80bd..36d544b663 100755 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/FeaturesRouteTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/FeaturesRouteTest.java @@ -33,14 +33,14 @@ import org.junit.Before; import org.junit.Test; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpEntities; -import akka.http.javadsl.model.HttpMethods; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.MediaTypes; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.testkit.TestRoute; -import akka.http.javadsl.testkit.TestRouteResult; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpEntities; +import org.apache.pekko.http.javadsl.model.HttpMethods; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.MediaTypes; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.testkit.TestRoute; +import org.apache.pekko.http.javadsl.testkit.TestRouteResult; /** * Tests {@link FeaturesRoute}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/MessagesRouteTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/MessagesRouteTest.java index 2e720b266f..100cf72850 100755 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/MessagesRouteTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/MessagesRouteTest.java @@ -40,11 +40,11 @@ import org.junit.Before; import org.junit.Test; -import akka.actor.ActorRef; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.testkit.TestRoute; -import akka.http.javadsl.testkit.TestRouteResult; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.testkit.TestRoute; +import org.apache.pekko.http.javadsl.testkit.TestRouteResult; /** * Tests {@link MessagesRoute}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/ThingsRouteTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/ThingsRouteTest.java index fddd9483ee..70a3812e0d 100755 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/ThingsRouteTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/things/ThingsRouteTest.java @@ -29,15 +29,15 @@ import org.junit.Before; import org.junit.Test; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpEntities; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.MediaTypes; -import akka.http.javadsl.model.RequestEntity; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.server.Route; -import akka.http.javadsl.testkit.TestRoute; -import akka.http.scaladsl.model.HttpEntity; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpEntities; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.MediaTypes; +import org.apache.pekko.http.javadsl.model.RequestEntity; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.testkit.TestRoute; +import org.apache.pekko.http.scaladsl.model.HttpEntity; /** * Tests {@link ThingsRoute}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/whoami/WhoamiRouteTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/whoami/WhoamiRouteTest.java index d8171180eb..ca1897356c 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/whoami/WhoamiRouteTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/routes/whoami/WhoamiRouteTest.java @@ -27,11 +27,11 @@ import org.junit.Before; import org.junit.Test; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.server.Route; -import akka.http.javadsl.testkit.TestRoute; -import akka.http.javadsl.testkit.TestRouteResult; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.http.javadsl.testkit.TestRoute; +import org.apache.pekko.http.javadsl.testkit.TestRouteResult; /** * Unit test for {@link WhoamiRoute}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/utils/UriEncodingTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/utils/UriEncodingTest.java index dc93e1a8e0..262b71355a 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/utils/UriEncodingTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/endpoints/utils/UriEncodingTest.java @@ -20,8 +20,8 @@ import org.eclipse.ditto.base.service.UriEncoding; import org.junit.Test; -import akka.http.javadsl.model.Uri; -import akka.http.scaladsl.model.IllegalUriException; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.http.scaladsl.model.IllegalUriException; /** * Unit test for {@link org.eclipse.ditto.base.service.UriEncoding}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/proxy/actors/QueryThingsPerRequestActorTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/proxy/actors/QueryThingsPerRequestActorTest.java index af6fb831ca..dbacc0873a 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/proxy/actors/QueryThingsPerRequestActorTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/proxy/actors/QueryThingsPerRequestActorTest.java @@ -19,7 +19,7 @@ import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.eclipse.ditto.gateway.service.util.config.DittoGatewayConfig; import org.eclipse.ditto.gateway.service.util.config.GatewayConfig; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; import org.eclipse.ditto.json.JsonArray; @@ -41,11 +41,11 @@ import com.typesafe.config.ConfigFactory; -import akka.Done; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.Done; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link QueryThingsPerRequestActor}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/AuthenticationChainTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/AuthenticationChainTest.java index a7c53cf5c9..9881db161b 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/AuthenticationChainTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/AuthenticationChainTest.java @@ -46,7 +46,7 @@ import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * Unit test for {@link AuthenticationChain}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/AbstractJwtAuthenticationProviderTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/AbstractJwtAuthenticationProviderTest.java index e9091c51c7..a0677a29df 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/AbstractJwtAuthenticationProviderTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/AbstractJwtAuthenticationProviderTest.java @@ -42,9 +42,9 @@ import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * Provides tests for {@link JwtAuthenticationProvider}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DefaultJwtAuthenticationResultProviderTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DefaultJwtAuthenticationResultProviderTest.java index 1c03f8f194..19e3df3d37 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DefaultJwtAuthenticationResultProviderTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DefaultJwtAuthenticationResultProviderTest.java @@ -31,7 +31,7 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Unit test for {@link DefaultJwtAuthenticationResultProvider}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DefaultJwtExtractorTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DefaultJwtExtractorTest.java index 2ea800f80b..316a15c9c0 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DefaultJwtExtractorTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DefaultJwtExtractorTest.java @@ -25,9 +25,9 @@ import org.eclipse.ditto.jwt.model.JwtInvalidException; import org.junit.Test; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * Tests {@link DefaultJwtExtractor}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DittoJwtAuthorizationSubjectsProviderTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DittoJwtAuthorizationSubjectsProviderTest.java index 54d4a0fa8c..62fe0d1f60 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DittoJwtAuthorizationSubjectsProviderTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DittoJwtAuthorizationSubjectsProviderTest.java @@ -28,7 +28,7 @@ import org.junit.runner.RunWith; import org.mockito.junit.MockitoJUnitRunner; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Unit test for {@link DittoJwtAuthorizationSubjectsProvider}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DittoPublicKeyProviderTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DittoPublicKeyProviderTest.java index 8e8e51d353..8e4376ca10 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DittoPublicKeyProviderTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/DittoPublicKeyProviderTest.java @@ -48,10 +48,10 @@ import com.github.benmanes.caffeine.cache.AsyncCacheLoader; import com.github.benmanes.caffeine.cache.Caffeine; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.StatusCodes; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.StatusCodes; @RunWith(MockitoJUnitRunner.class) public final class DittoPublicKeyProviderTest { diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/WebSocketJwtAuthenticationProviderTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/WebSocketJwtAuthenticationProviderTest.java index 000fc5d79d..b429c1b4e5 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/WebSocketJwtAuthenticationProviderTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/WebSocketJwtAuthenticationProviderTest.java @@ -16,7 +16,7 @@ import org.junit.Before; import org.junit.Test; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * Tests {@link JwtAuthenticationProvider}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/WebSocketJwtExtractorTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/WebSocketJwtExtractorTest.java index fed0267451..a908497b0d 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/WebSocketJwtExtractorTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/jwt/WebSocketJwtExtractorTest.java @@ -26,9 +26,9 @@ import org.eclipse.ditto.jwt.model.JwtInvalidException; import org.junit.Test; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.server.RequestContext; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.server.RequestContext; /** * Tests {@link WebSocketJwtExtractor}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/preauth/PreAuthenticatedAuthenticationProviderTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/preauth/PreAuthenticatedAuthenticationProviderTest.java index aa5f77e25a..8c100fa787 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/preauth/PreAuthenticatedAuthenticationProviderTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/security/authentication/preauth/PreAuthenticatedAuthenticationProviderTest.java @@ -32,12 +32,12 @@ import org.junit.runner.RunWith; import org.mockito.junit.MockitoJUnitRunner; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.Query; -import akka.http.javadsl.model.Uri; -import akka.http.javadsl.server.RequestContext; -import akka.japi.Pair; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.Query; +import org.apache.pekko.http.javadsl.model.Uri; +import org.apache.pekko.http.javadsl.server.RequestContext; +import org.apache.pekko.japi.Pair; /** * Unit test {@link PreAuthenticatedAuthenticationProvider}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/starter/GatewayRootActorTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/starter/GatewayRootActorTest.java index 1bb7fef000..0d94e53a5f 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/starter/GatewayRootActorTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/starter/GatewayRootActorTest.java @@ -19,8 +19,8 @@ import org.eclipse.ditto.gateway.service.util.config.GatewayConfig; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; -import akka.actor.ActorSystem; -import akka.actor.Props; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; /** * Test {@link GatewayRootActor}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingSessionActorHeaderInteractionTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingSessionActorHeaderInteractionTest.java index b3f11decf0..283d2c2990 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingSessionActorHeaderInteractionTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingSessionActorHeaderInteractionTest.java @@ -61,19 +61,19 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.japi.pf.ReceiveBuilder; -import akka.stream.Attributes; -import akka.stream.OverflowStrategy; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.SourceQueueWithComplete; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.stream.OverflowStrategy; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.SourceQueueWithComplete; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.concurrent.duration.FiniteDuration; /** @@ -169,7 +169,7 @@ public void run() { final DittoHeaders receivedHeaders = receivedModifyThing.getDittoHeaders(); if (AcknowledgementAggregatorActorStarter.shouldStartForIncoming(modifyThing)) { assertThat(receivedHeaders.get(DittoHeaderDefinition.DITTO_ACKREGATOR_ADDRESS.getKey())) - .startsWith("akka:"); + .startsWith("pekko:"); receivedModifyThing = receivedModifyThing.setDittoHeaders( receivedHeaders.toBuilder() .removeHeader(DittoHeaderDefinition.DITTO_ACKREGATOR_ADDRESS.getKey()) diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingSessionActorTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingSessionActorTest.java index fd498c2dc4..0d3bb2c64f 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingSessionActorTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/streaming/actors/StreamingSessionActorTest.java @@ -51,7 +51,7 @@ import org.eclipse.ditto.gateway.service.streaming.signals.StartStreaming; import org.eclipse.ditto.gateway.service.streaming.signals.StreamingAck; import org.eclipse.ditto.gateway.service.util.config.streaming.DefaultStreamingConfig; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.internal.utils.pubsub.StreamingType; import org.eclipse.ditto.internal.utils.pubsubthings.DittoProtocolSub; import org.eclipse.ditto.internal.utils.tracing.DittoTracingInitResource; @@ -75,21 +75,21 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.Actor; -import akka.actor.ActorRef; -import akka.actor.PoisonPill; -import akka.actor.Props; -import akka.stream.KillSwitch; -import akka.stream.KillSwitches; -import akka.stream.OverflowStrategy; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.SourceQueueWithComplete; -import akka.stream.testkit.TestSubscriber; -import akka.stream.testkit.javadsl.TestSink; -import akka.testkit.TestActor; -import akka.testkit.TestProbe; +import org.apache.pekko.actor.Actor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.actor.Props; +import org.apache.pekko.stream.KillSwitch; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.OverflowStrategy; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.SourceQueueWithComplete; +import org.apache.pekko.stream.testkit.TestSubscriber; +import org.apache.pekko.stream.testkit.javadsl.TestSink; +import org.apache.pekko.testkit.TestActor; +import org.apache.pekko.testkit.TestProbe; /** * Tests {@link StreamingSessionActor}. diff --git a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/util/config/endpoints/GatewayHttpConfigTest.java b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/util/config/endpoints/GatewayHttpConfigTest.java index 1af9d495ca..42a3ace68d 100644 --- a/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/util/config/endpoints/GatewayHttpConfigTest.java +++ b/gateway/service/src/test/java/org/eclipse/ditto/gateway/service/util/config/endpoints/GatewayHttpConfigTest.java @@ -41,7 +41,7 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.http.javadsl.model.MediaTypes; +import org.apache.pekko.http.javadsl.model.MediaTypes; import nl.jqno.equalsverifier.EqualsVerifier; /** diff --git a/gateway/service/src/test/resources/test.conf b/gateway/service/src/test/resources/test.conf index 26d8244ec2..0cca17deb0 100755 --- a/gateway/service/src/test/resources/test.conf +++ b/gateway/service/src/test/resources/test.conf @@ -1,8 +1,8 @@ -akka { +pekko { remote.artery.canonical.port = 0 - loggers = ["akka.event.slf4j.Slf4jLogger"] + loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"] loglevel = "WARNING" - logging-filter = "akka.event.slf4j.Slf4jLoggingFilter" + logging-filter = "org.apache.pekko.event.slf4j.Slf4jLoggingFilter" log-dead-letters = 0 # for log messages during the actor system is starting up and shutting down: @@ -26,7 +26,7 @@ akka { lifecycle = on } - guardian-supervisor-strategy = "akka.actor.StoppingSupervisorStrategy" + guardian-supervisor-strategy = "org.apache.pekko.actor.StoppingSupervisorStrategy" deployment { } @@ -58,7 +58,7 @@ akka { json = "org.eclipse.ditto.internal.utils.cluster.JsonJsonifiableSerializer" cbor = "org.eclipse.ditto.internal.utils.cluster.CborJsonifiableSerializer" cbor-json-value = "org.eclipse.ditto.internal.utils.cluster.CborJsonValueSerializer" - jackson-cbor = "akka.serialization.jackson.JacksonCborSerializer" + jackson-cbor = "org.apache.pekko.serialization.jackson.JacksonCborSerializer" } serialization-bindings { @@ -68,16 +68,16 @@ akka { "org.eclipse.ditto.base.model.exceptions.DittoRuntimeException" = cbor "org.eclipse.ditto.base.api.devops.signals.commands.DevOpsCommandResponse" = json # to ensure readability "org.eclipse.ditto.json.JsonValue" = cbor-json-value - "org.eclipse.ditto.internal.utils.cluster.AkkaJacksonCborSerializable" = jackson-cbor + "org.eclipse.ditto.internal.utils.cluster.PekkoJacksonCborSerializable" = jackson-cbor } extensions = [ - "akka.cluster.pubsub.DistributedPubSub" + "org.apache.pekko.cluster.pubsub.DistributedPubSub" ] http { server { - server-header = "" # default: akka-http/${akka.http.version} + server-header = "" # default: pekko-http/${pekko.http.version} max-connections = 4096 # default: 1024 backlog = 100 # default: 100 request-timeout = 60s @@ -125,7 +125,7 @@ test { default-timeout = 5s calling-thread-dispatcher { - type = akka.testkit.CallingThreadDispatcherConfigurator + type = org.apache.pekko.testkit.CallingThreadDispatcherConfigurator } } @@ -304,7 +304,7 @@ authentication-dispatcher { type = Dispatcher executor = "thread-pool-executor" thread-pool-executor { - // or in Akka 2.4.2+ + // or in Pekko 2.4.2+ fixed-pool-size = 16 } throughput = 100 diff --git a/internal/models/signalenrichment/pom.xml b/internal/models/signalenrichment/pom.xml index 61775f474f..546413788c 100755 --- a/internal/models/signalenrichment/pom.xml +++ b/internal/models/signalenrichment/pom.xml @@ -40,7 +40,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko org.eclipse.ditto @@ -60,8 +60,8 @@ test - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test diff --git a/internal/models/signalenrichment/src/main/java/org/eclipse/ditto/internal/models/signalenrichment/ByRoundTripSignalEnrichmentFacade.java b/internal/models/signalenrichment/src/main/java/org/eclipse/ditto/internal/models/signalenrichment/ByRoundTripSignalEnrichmentFacade.java index 046b361c07..237ec09dbe 100644 --- a/internal/models/signalenrichment/src/main/java/org/eclipse/ditto/internal/models/signalenrichment/ByRoundTripSignalEnrichmentFacade.java +++ b/internal/models/signalenrichment/src/main/java/org/eclipse/ditto/internal/models/signalenrichment/ByRoundTripSignalEnrichmentFacade.java @@ -33,8 +33,8 @@ import org.eclipse.ditto.things.model.signals.commands.query.RetrieveThing; import org.eclipse.ditto.things.model.signals.commands.query.RetrieveThingResponse; -import akka.actor.ActorSelection; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.pattern.Patterns; /** * Retrieve fixed parts of things by asking an actor. diff --git a/internal/models/signalenrichment/src/main/java/org/eclipse/ditto/internal/models/signalenrichment/DittoCachingSignalEnrichmentFacade.java b/internal/models/signalenrichment/src/main/java/org/eclipse/ditto/internal/models/signalenrichment/DittoCachingSignalEnrichmentFacade.java index e4de6dcd80..1f8addd6ba 100644 --- a/internal/models/signalenrichment/src/main/java/org/eclipse/ditto/internal/models/signalenrichment/DittoCachingSignalEnrichmentFacade.java +++ b/internal/models/signalenrichment/src/main/java/org/eclipse/ditto/internal/models/signalenrichment/DittoCachingSignalEnrichmentFacade.java @@ -28,8 +28,8 @@ import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.eclipse.ditto.base.model.signals.Signal; import org.eclipse.ditto.base.model.signals.WithResource; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.cache.Cache; import org.eclipse.ditto.internal.utils.cache.CacheFactory; import org.eclipse.ditto.internal.utils.cache.config.CacheConfig; diff --git a/internal/models/signalenrichment/src/test/java/org/eclipse/ditto/internal/models/signalenrichment/AbstractSignalEnrichmentFacadeTest.java b/internal/models/signalenrichment/src/test/java/org/eclipse/ditto/internal/models/signalenrichment/AbstractSignalEnrichmentFacadeTest.java index a8b7a9c99c..5e53d16e2d 100644 --- a/internal/models/signalenrichment/src/test/java/org/eclipse/ditto/internal/models/signalenrichment/AbstractSignalEnrichmentFacadeTest.java +++ b/internal/models/signalenrichment/src/test/java/org/eclipse/ditto/internal/models/signalenrichment/AbstractSignalEnrichmentFacadeTest.java @@ -34,8 +34,8 @@ import org.eclipse.ditto.things.model.signals.events.ThingDeleted; import org.junit.Test; -import akka.pattern.AskTimeoutException; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.pattern.AskTimeoutException; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Abstract base test for different {@link SignalEnrichmentFacade} implementations. diff --git a/internal/models/signalenrichment/src/test/java/org/eclipse/ditto/internal/models/signalenrichment/ByRoundTripSignalEnrichmentFacadeTest.java b/internal/models/signalenrichment/src/test/java/org/eclipse/ditto/internal/models/signalenrichment/ByRoundTripSignalEnrichmentFacadeTest.java index 2ab0d4c100..abf8af289d 100644 --- a/internal/models/signalenrichment/src/test/java/org/eclipse/ditto/internal/models/signalenrichment/ByRoundTripSignalEnrichmentFacadeTest.java +++ b/internal/models/signalenrichment/src/test/java/org/eclipse/ditto/internal/models/signalenrichment/ByRoundTripSignalEnrichmentFacadeTest.java @@ -14,8 +14,8 @@ import java.time.Duration; -import akka.actor.ActorSelection; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link ByRoundTripSignalEnrichmentFacade} diff --git a/internal/models/signalenrichment/src/test/java/org/eclipse/ditto/internal/models/signalenrichment/DittoCachingSignalEnrichmentFacadeTest.java b/internal/models/signalenrichment/src/test/java/org/eclipse/ditto/internal/models/signalenrichment/DittoCachingSignalEnrichmentFacadeTest.java index 1bc7b58747..3cbc626125 100644 --- a/internal/models/signalenrichment/src/test/java/org/eclipse/ditto/internal/models/signalenrichment/DittoCachingSignalEnrichmentFacadeTest.java +++ b/internal/models/signalenrichment/src/test/java/org/eclipse/ditto/internal/models/signalenrichment/DittoCachingSignalEnrichmentFacadeTest.java @@ -43,8 +43,8 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSelection; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Unit tests for {@link DittoCachingSignalEnrichmentFacade}. diff --git a/internal/utils/cache-loaders/pom.xml b/internal/utils/cache-loaders/pom.xml index 8ccef2333f..ccca669843 100644 --- a/internal/utils/cache-loaders/pom.xml +++ b/internal/utils/cache-loaders/pom.xml @@ -27,7 +27,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko org.eclipse.ditto @@ -37,6 +37,11 @@ com.github.ben-manes.caffeine caffeine + + org.scala-lang.modules + scala-java8-compat_${scala.version} + + @@ -45,8 +50,8 @@ test - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test diff --git a/internal/utils/cache-loaders/src/main/java/org/eclipse/ditto/internal/utils/cacheloaders/ActorAskCacheLoader.java b/internal/utils/cache-loaders/src/main/java/org/eclipse/ditto/internal/utils/cacheloaders/ActorAskCacheLoader.java index dbaeef0441..2798d1c943 100644 --- a/internal/utils/cache-loaders/src/main/java/org/eclipse/ditto/internal/utils/cacheloaders/ActorAskCacheLoader.java +++ b/internal/utils/cache-loaders/src/main/java/org/eclipse/ditto/internal/utils/cacheloaders/ActorAskCacheLoader.java @@ -26,15 +26,15 @@ import org.eclipse.ditto.base.model.entity.id.EntityId; import org.eclipse.ditto.base.model.entity.type.EntityType; import org.eclipse.ditto.base.model.signals.commands.Command; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.cache.entry.Entry; import org.eclipse.ditto.internal.utils.cacheloaders.config.AskWithRetryConfig; import com.github.benmanes.caffeine.cache.AsyncCacheLoader; -import akka.actor.ActorRef; -import akka.actor.Scheduler; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Scheduler; /** * Asynchronous cache loader that loads a value by asking an actor provided by a "Entity-Region-Provider". diff --git a/internal/utils/cache-loaders/src/main/java/org/eclipse/ditto/internal/utils/cacheloaders/AskWithRetry.java b/internal/utils/cache-loaders/src/main/java/org/eclipse/ditto/internal/utils/cacheloaders/AskWithRetry.java index 9fd19c46b4..ee68dc5c8c 100644 --- a/internal/utils/cache-loaders/src/main/java/org/eclipse/ditto/internal/utils/cacheloaders/AskWithRetry.java +++ b/internal/utils/cache-loaders/src/main/java/org/eclipse/ditto/internal/utils/cacheloaders/AskWithRetry.java @@ -32,15 +32,15 @@ import org.eclipse.ditto.base.model.exceptions.DittoRuntimeExceptionBuilder; import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.eclipse.ditto.base.model.headers.WithDittoHeaders; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.cacheloaders.config.AskWithRetryConfig; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Scheduler; -import akka.pattern.AskTimeoutException; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Scheduler; +import org.apache.pekko.pattern.AskTimeoutException; +import org.apache.pekko.pattern.Patterns; import scala.compat.java8.FutureConverters; /** diff --git a/internal/utils/cache-loaders/src/main/java/org/eclipse/ditto/internal/utils/cacheloaders/EntityRegionMap.java b/internal/utils/cache-loaders/src/main/java/org/eclipse/ditto/internal/utils/cacheloaders/EntityRegionMap.java index 6c2aa67c2a..91fc5e4217 100644 --- a/internal/utils/cache-loaders/src/main/java/org/eclipse/ditto/internal/utils/cacheloaders/EntityRegionMap.java +++ b/internal/utils/cache-loaders/src/main/java/org/eclipse/ditto/internal/utils/cacheloaders/EntityRegionMap.java @@ -27,7 +27,7 @@ import org.eclipse.ditto.base.model.entity.type.EntityType; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Immutable sharable map from resource types to actor reference. diff --git a/internal/utils/cache-loaders/src/test/java/org/eclipse/ditto/internal/utils/cacheloaders/AskWithRetryTest.java b/internal/utils/cache-loaders/src/test/java/org/eclipse/ditto/internal/utils/cacheloaders/AskWithRetryTest.java index 213d6662ab..e6ce6f0553 100644 --- a/internal/utils/cache-loaders/src/test/java/org/eclipse/ditto/internal/utils/cacheloaders/AskWithRetryTest.java +++ b/internal/utils/cache-loaders/src/test/java/org/eclipse/ditto/internal/utils/cacheloaders/AskWithRetryTest.java @@ -39,9 +39,9 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Provides unit tests for {@link org.eclipse.ditto.internal.utils.cacheloaders.AskWithRetry} "pattern". diff --git a/internal/utils/cache-loaders/src/test/java/org/eclipse/ditto/internal/utils/cacheloaders/EntityRegionMapTest.java b/internal/utils/cache-loaders/src/test/java/org/eclipse/ditto/internal/utils/cacheloaders/EntityRegionMapTest.java index cbdcdb1d4d..6bc166abe5 100644 --- a/internal/utils/cache-loaders/src/test/java/org/eclipse/ditto/internal/utils/cacheloaders/EntityRegionMapTest.java +++ b/internal/utils/cache-loaders/src/test/java/org/eclipse/ditto/internal/utils/cacheloaders/EntityRegionMapTest.java @@ -24,9 +24,9 @@ import org.junit.AfterClass; import org.junit.Test; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.testkit.TestProbe; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.TestProbe; import nl.jqno.equalsverifier.EqualsVerifier; /** diff --git a/internal/utils/cache-loaders/src/test/resources/test.conf b/internal/utils/cache-loaders/src/test/resources/test.conf index 9d9386318a..c3d4ac0680 100644 --- a/internal/utils/cache-loaders/src/test/resources/test.conf +++ b/internal/utils/cache-loaders/src/test/resources/test.conf @@ -1,8 +1,8 @@ -akka { +pekko { - loggers = ["akka.event.slf4j.Slf4jLogger"] + loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"] loglevel = "INFO" - logging-filter = "akka.event.DefaultLoggingFilter" + logging-filter = "org.apache.pekko.event.DefaultLoggingFilter" logger-startup-timeout = 60s # for log messages during the actor system is starting up and shutting down: diff --git a/internal/utils/cluster/pom.xml b/internal/utils/cluster/pom.xml index c1db096107..ff46868b7b 100755 --- a/internal/utils/cluster/pom.xml +++ b/internal/utils/cluster/pom.xml @@ -37,7 +37,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko org.eclipse.ditto @@ -60,18 +60,17 @@ ditto-base-model - com.typesafe.akka - akka-cluster_${scala.version} + org.apache.pekko + pekko-cluster_${scala.version} - com.typesafe.akka - akka-cluster-sharding_${scala.version} + org.apache.pekko + pekko-cluster-sharding_${scala.version} - com.typesafe.akka - akka-serialization-jackson_${scala.version} + org.apache.pekko + pekko-serialization-jackson_${scala.version} - com.fasterxml.jackson.core @@ -93,7 +92,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko test-jar test @@ -104,8 +103,8 @@ test-jar - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/AbstractJsonifiableWithDittoHeadersSerializer.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/AbstractJsonifiableWithDittoHeadersSerializer.java index a6a9e63324..753e361234 100755 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/AbstractJsonifiableWithDittoHeadersSerializer.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/AbstractJsonifiableWithDittoHeadersSerializer.java @@ -57,11 +57,11 @@ import com.typesafe.config.ConfigFactory; import com.typesafe.config.ConfigValueFactory; -import akka.actor.ExtendedActorSystem; -import akka.io.BufferPool; -import akka.io.DirectByteBufferPool; -import akka.serialization.ByteBufferSerializer; -import akka.serialization.SerializerWithStringManifest; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.io.BufferPool; +import org.apache.pekko.io.DirectByteBufferPool; +import org.apache.pekko.serialization.ByteBufferSerializer; +import org.apache.pekko.serialization.SerializerWithStringManifest; /** * Abstract {@link SerializerWithStringManifest} which handles serializing and deserializing {@link Jsonifiable}s @@ -80,9 +80,9 @@ public abstract class AbstractJsonifiableWithDittoHeadersSerializer extends Seri private static final JsonFieldDefinition JSON_PAYLOAD = JsonFactory.newJsonValueFieldDefinition("payload"); - private static final String CONFIG_DIRECT_BUFFER_SIZE = "akka.actor.serializers-json.direct-buffer-size"; + private static final String CONFIG_DIRECT_BUFFER_SIZE = "pekko.actor.serializers-json.direct-buffer-size"; private static final String CONFIG_DIRECT_BUFFER_POOL_LIMIT = - "akka.actor.serializers-json.direct-buffer-pool-limit"; + "pekko.actor.serializers-json.direct-buffer-pool-limit"; private static final Config FALLBACK_CONF = ConfigFactory.empty() .withValue(CONFIG_DIRECT_BUFFER_SIZE, ConfigValueFactory.fromAnyRef("64 KiB")) diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/AbstractPubSubListenerActor.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/AbstractPubSubListenerActor.java index dab1f93c1a..506736de7f 100644 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/AbstractPubSubListenerActor.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/AbstractPubSubListenerActor.java @@ -16,13 +16,13 @@ import java.util.Set; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.event.DiagnosticLoggingAdapter; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Listens to events via PubSub and invokes the abstract {@link #handleEvents()} for each received event. diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/CborJsonValueSerializer.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/CborJsonValueSerializer.java index 165c85d58e..49486887ff 100644 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/CborJsonValueSerializer.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/CborJsonValueSerializer.java @@ -36,12 +36,12 @@ import com.typesafe.config.ConfigFactory; import com.typesafe.config.ConfigValueFactory; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.io.BufferPool; -import akka.io.DirectByteBufferPool; -import akka.serialization.ByteBufferSerializer; -import akka.serialization.SerializerWithStringManifest; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.io.BufferPool; +import org.apache.pekko.io.DirectByteBufferPool; +import org.apache.pekko.serialization.ByteBufferSerializer; +import org.apache.pekko.serialization.SerializerWithStringManifest; /** * Serializer of Eclipse Ditto for {@link JsonValue}s via CBOR. @@ -188,7 +188,7 @@ private JsonValue readJsonValueFromCborBinary(final ByteBuffer byteBuffer) { private static final class DirectBufferConfig { - private static final String KEY_PREFIX = "akka.actor.serializers-json"; + private static final String KEY_PREFIX = "pekko.actor.serializers-json"; private static final String KEY_SIZE = KEY_PREFIX + ".direct-buffer-size"; private static final String KEY_POOL_LIMIT = KEY_PREFIX + ".direct-buffer-pool-limit"; private static final String DEFAULT_KEY_SIZE = "64 KiB"; diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/CborJsonifiableSerializer.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/CborJsonifiableSerializer.java index 884c9dfe75..f78ddaa116 100644 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/CborJsonifiableSerializer.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/CborJsonifiableSerializer.java @@ -19,7 +19,7 @@ import org.eclipse.ditto.json.JsonObject; import org.eclipse.ditto.json.JsonValue; -import akka.actor.ExtendedActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; /** * Serializer of Eclipse Ditto for Jsonifiables via CBOR-based {@code ditto-json}. diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ClusterSingletonSupervisorActor.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ClusterSingletonSupervisorActor.java index d2546f20d2..d6aed953dd 100644 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ClusterSingletonSupervisorActor.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ClusterSingletonSupervisorActor.java @@ -18,18 +18,18 @@ import java.util.NoSuchElementException; import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; - -import akka.actor.AbstractActor; -import akka.actor.ActorKilledException; -import akka.actor.ActorRef; -import akka.actor.InvalidActorNameException; -import akka.actor.OneForOneStrategy; -import akka.actor.Props; -import akka.actor.SupervisorStrategy; -import akka.event.DiagnosticLoggingAdapter; -import akka.japi.pf.DeciderBuilder; -import akka.pattern.AskTimeoutException; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; + +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorKilledException; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.InvalidActorNameException; +import org.apache.pekko.actor.OneForOneStrategy; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.japi.pf.DeciderBuilder; +import org.apache.pekko.pattern.AskTimeoutException; /** * Supervisor actor for cluster singletons which accepts a {@link SupervisorStrategy} (e.g. the one from the root @@ -121,21 +121,21 @@ private void terminateActorSystem() { } /** - * Creates Akka configuration object Props for this Actor. + * Creates Pekko configuration object Props for this Actor. * * @param childProps the Props of the child to create (the actual singleton). - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final Props childProps) { return Props.create(ClusterSingletonSupervisorActor.class, childProps); } /** - * Creates Akka configuration object Props for this Actor. + * Creates Pekko configuration object Props for this Actor. * * @param childProps the Props of the child to create (the actual singleton). * @param supervisorStrategy the {@link SupervisorStrategy} to apply. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final Props childProps, final SupervisorStrategy supervisorStrategy) { diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ClusterStatusSupplier.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ClusterStatusSupplier.java index f064533b88..d7a31e631e 100755 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ClusterStatusSupplier.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ClusterStatusSupplier.java @@ -27,9 +27,9 @@ import org.eclipse.ditto.internal.utils.health.cluster.ClusterRoleStatus; import org.eclipse.ditto.internal.utils.health.cluster.ClusterStatus; -import akka.actor.Address; -import akka.cluster.Cluster; -import akka.cluster.Member; +import org.apache.pekko.actor.Address; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.Member; /** * Util class that helps to retrieve the cluster status. diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ClusterUtil.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ClusterUtil.java index 32bac4c651..d8225bee2e 100644 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ClusterUtil.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ClusterUtil.java @@ -14,20 +14,20 @@ import javax.annotation.concurrent.Immutable; -import akka.actor.ActorContext; -import akka.actor.ActorRef; -import akka.actor.ActorRefFactory; -import akka.actor.ActorSystem; -import akka.actor.PoisonPill; -import akka.actor.Props; -import akka.actor.SupervisorStrategy; -import akka.cluster.singleton.ClusterSingletonManager; -import akka.cluster.singleton.ClusterSingletonManagerSettings; -import akka.cluster.singleton.ClusterSingletonProxy; -import akka.cluster.singleton.ClusterSingletonProxySettings; +import org.apache.pekko.actor.ActorContext; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.cluster.singleton.ClusterSingletonManager; +import org.apache.pekko.cluster.singleton.ClusterSingletonManagerSettings; +import org.apache.pekko.cluster.singleton.ClusterSingletonProxy; +import org.apache.pekko.cluster.singleton.ClusterSingletonProxySettings; /** - * Convenience methods to operate an Akka cluster. + * Convenience methods to operate an Pekko cluster. */ @Immutable public final class ClusterUtil { diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/DistPubSubAccess.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/DistPubSubAccess.java index 3474fa12bb..a32237d5d2 100644 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/DistPubSubAccess.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/DistPubSubAccess.java @@ -16,11 +16,11 @@ import org.eclipse.ditto.base.model.common.ConditionChecker; -import akka.actor.ActorRef; -import akka.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; /** - * Helper class for accessing Akka's {@link DistributedPubSubMediator} messages (e.g. publishing, subscribing, etc.). + * Helper class for accessing Pekko's {@link DistributedPubSubMediator} messages (e.g. publishing, subscribing, etc.). */ @Immutable public final class DistPubSubAccess { diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/JsonJsonifiableSerializer.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/JsonJsonifiableSerializer.java index 8c4c5649ce..8ab2e04856 100644 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/JsonJsonifiableSerializer.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/JsonJsonifiableSerializer.java @@ -20,7 +20,7 @@ import org.eclipse.ditto.json.JsonObject; import org.eclipse.ditto.json.JsonValue; -import akka.actor.ExtendedActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; /** * Serializer of Eclipse Ditto for Jsonifiables via string-based {@code ditto-json}. diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/JsonValueSourceRef.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/JsonValueSourceRef.java index aaa69bef96..01802d8cb0 100644 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/JsonValueSourceRef.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/JsonValueSourceRef.java @@ -23,19 +23,19 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; -import akka.NotUsed; -import akka.stream.SourceRef; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.stream.SourceRef; +import org.apache.pekko.stream.javadsl.Source; /** * Wraps a {@link SourceRef} of {@link JsonValue}s. The purpose of this class is to make working with SourceRef type * safe. Rationale: Sending a plain SourceRef through the cluster works but it discards the type information, i.e. the * receiver does not know the actual type of the SourceRef's elements. - * @see Akka + * @see Pekko * documentation "Serialization of SourceRef and SinkRef" */ @Immutable -public final class JsonValueSourceRef implements AkkaJacksonCborSerializable { +public final class JsonValueSourceRef implements PekkoJacksonCborSerializable { private final SourceRef sourceRef; diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/MappingStrategies.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/MappingStrategies.java index 911a4f32b8..22c55910a9 100644 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/MappingStrategies.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/MappingStrategies.java @@ -24,12 +24,12 @@ import javax.annotation.concurrent.Immutable; import org.eclipse.ditto.base.model.json.Jsonifiable; -import org.eclipse.ditto.internal.utils.akka.AkkaClassLoader; +import org.eclipse.ditto.internal.utils.pekko.PekkoClassLoader; import org.eclipse.ditto.base.model.signals.JsonParsable; import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * An unmodifiable map of {@link JsonParsable} elements associated with the name of the type the strategy @@ -73,7 +73,7 @@ public static MappingStrategies loadMappingStrategies(final ActorSystem actorSys final Config config = settings.config(); final String mappingStrategyClass = config.getString(CONFIG_KEY_DITTO_MAPPING_STRATEGY_IMPLEMENTATION); - return AkkaClassLoader.instantiate(actorSystem, MappingStrategies.class, mappingStrategyClass); + return PekkoClassLoader.instantiate(actorSystem, MappingStrategies.class, mappingStrategyClass); } /** diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/MappingStrategiesBuilder.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/MappingStrategiesBuilder.java index a0c9cffa6d..5095e62da7 100755 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/MappingStrategiesBuilder.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/MappingStrategiesBuilder.java @@ -26,11 +26,11 @@ import org.eclipse.ditto.base.model.signals.JsonParsable; import org.eclipse.ditto.base.model.signals.JsonParsableRegistry; import org.eclipse.ditto.base.model.signals.ShardedMessageEnvelope; -import org.eclipse.ditto.internal.utils.akka.PingCommand; -import org.eclipse.ditto.internal.utils.akka.PingCommandResponse; -import org.eclipse.ditto.internal.utils.akka.SimpleCommand; -import org.eclipse.ditto.internal.utils.akka.SimpleCommandResponse; -import org.eclipse.ditto.internal.utils.akka.streaming.StreamAck; +import org.eclipse.ditto.internal.utils.pekko.PingCommand; +import org.eclipse.ditto.internal.utils.pekko.PingCommandResponse; +import org.eclipse.ditto.internal.utils.pekko.SimpleCommand; +import org.eclipse.ditto.internal.utils.pekko.SimpleCommandResponse; +import org.eclipse.ditto.internal.utils.pekko.streaming.StreamAck; import org.eclipse.ditto.internal.utils.health.StatusInfo; import org.eclipse.ditto.json.JsonObject; diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/AkkaJacksonCborSerializable.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/PekkoJacksonCborSerializable.java similarity index 92% rename from internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/AkkaJacksonCborSerializable.java rename to internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/PekkoJacksonCborSerializable.java index fe9472593f..f14bd3a1f4 100644 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/AkkaJacksonCborSerializable.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/PekkoJacksonCborSerializable.java @@ -15,7 +15,7 @@ /** * Marker interface for cluster messages that are serialized with Jackson CBOR serializer. */ -public interface AkkaJacksonCborSerializable { +public interface PekkoJacksonCborSerializable { // intentionally empty diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/RetrieveStatisticsDetailsResponseSupplier.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/RetrieveStatisticsDetailsResponseSupplier.java index f0046a58c4..4eb91f1e80 100644 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/RetrieveStatisticsDetailsResponseSupplier.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/RetrieveStatisticsDetailsResponseSupplier.java @@ -27,10 +27,10 @@ import org.eclipse.ditto.json.JsonObject; import org.eclipse.ditto.json.JsonValue; -import akka.actor.ActorRef; -import akka.cluster.sharding.ShardRegion; -import akka.event.DiagnosticLoggingAdapter; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.cluster.sharding.ShardRegion; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.pattern.Patterns; /** * Supplier of {@link RetrieveStatisticsDetailsResponse}s for a specific shard region - determines the "hot entities" diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/SerializerExceptions.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/SerializerExceptions.java index 9461180a54..3fefbef48c 100644 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/SerializerExceptions.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/SerializerExceptions.java @@ -18,7 +18,7 @@ import javax.annotation.concurrent.Immutable; /** - * This class is a mere namespace for exceptions that {@link akka.serialization.Serializer}s might throw. + * This class is a mere namespace for exceptions that {@link org.apache.pekko.serialization.Serializer}s might throw. */ @Immutable public final class SerializerExceptions { diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionCreator.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionCreator.java index 69280fbf19..2934164ab2 100644 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionCreator.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionCreator.java @@ -14,12 +14,12 @@ import javax.annotation.concurrent.NotThreadSafe; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.cluster.sharding.ClusterSharding; -import akka.cluster.sharding.ClusterShardingSettings; -import akka.cluster.sharding.ShardRegion; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.sharding.ClusterSharding; +import org.apache.pekko.cluster.sharding.ClusterShardingSettings; +import org.apache.pekko.cluster.sharding.ShardRegion; /** * Factory for creating shard regions. diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionExtractor.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionExtractor.java index 923d8c725d..6907440788 100755 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionExtractor.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionExtractor.java @@ -29,8 +29,8 @@ import org.eclipse.ditto.base.model.signals.ShardedMessageEnvelope; import org.eclipse.ditto.json.JsonObject; -import akka.actor.ActorSystem; -import akka.cluster.sharding.ShardRegion; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.cluster.sharding.ShardRegion; /** * Implementation of {@link ShardRegion.MessageExtractor} which does a {@code hashCode} based sharding with the diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionProxyActorFactory.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionProxyActorFactory.java index 6faf238a0c..214f608253 100644 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionProxyActorFactory.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionProxyActorFactory.java @@ -19,9 +19,9 @@ import org.eclipse.ditto.base.model.common.ConditionChecker; import org.eclipse.ditto.internal.utils.cluster.config.ClusterConfig; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.cluster.sharding.ClusterSharding; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.cluster.sharding.ClusterSharding; /** * Factory for creating shard region proxy actors. diff --git a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/StopShardedActor.java b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/StopShardedActor.java index 9848dc2202..65ea0f7211 100644 --- a/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/StopShardedActor.java +++ b/internal/utils/cluster/src/main/java/org/eclipse/ditto/internal/utils/cluster/StopShardedActor.java @@ -20,4 +20,4 @@ * @since 3.0.0 */ @Immutable -public record StopShardedActor() implements AkkaJacksonCborSerializable {} +public record StopShardedActor() implements PekkoJacksonCborSerializable {} diff --git a/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/CborJsonValueSerializerTest.java b/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/CborJsonValueSerializerTest.java index 4d8ba8171f..30ad3015a3 100644 --- a/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/CborJsonValueSerializerTest.java +++ b/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/CborJsonValueSerializerTest.java @@ -28,9 +28,9 @@ import org.junit.BeforeClass; import org.junit.Test; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.testkit.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.testkit.TestKit; import scala.concurrent.duration.FiniteDuration; /** diff --git a/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/JsonValueSourceRefTest.java b/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/JsonValueSourceRefTest.java index d5bc6a55ba..256c35ab9b 100644 --- a/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/JsonValueSourceRefTest.java +++ b/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/JsonValueSourceRefTest.java @@ -32,14 +32,14 @@ import com.typesafe.config.ConfigFactory; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.stream.Materializer; -import akka.stream.SourceRef; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.StreamRefs; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.SourceRef; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.StreamRefs; +import org.apache.pekko.testkit.javadsl.TestKit; import nl.jqno.equalsverifier.EqualsVerifier; import scala.concurrent.duration.FiniteDuration; diff --git a/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/MappingStrategiesBuilderTest.java b/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/MappingStrategiesBuilderTest.java index e90eccd898..39a9647265 100644 --- a/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/MappingStrategiesBuilderTest.java +++ b/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/MappingStrategiesBuilderTest.java @@ -21,11 +21,11 @@ import org.eclipse.ditto.base.model.json.Jsonifiable; import org.eclipse.ditto.base.model.signals.JsonParsableRegistry; import org.eclipse.ditto.base.model.signals.ShardedMessageEnvelope; -import org.eclipse.ditto.internal.utils.akka.PingCommand; -import org.eclipse.ditto.internal.utils.akka.PingCommandResponse; -import org.eclipse.ditto.internal.utils.akka.SimpleCommand; -import org.eclipse.ditto.internal.utils.akka.SimpleCommandResponse; -import org.eclipse.ditto.internal.utils.akka.streaming.StreamAck; +import org.eclipse.ditto.internal.utils.pekko.PingCommand; +import org.eclipse.ditto.internal.utils.pekko.PingCommandResponse; +import org.eclipse.ditto.internal.utils.pekko.SimpleCommand; +import org.eclipse.ditto.internal.utils.pekko.SimpleCommandResponse; +import org.eclipse.ditto.internal.utils.pekko.streaming.StreamAck; import org.eclipse.ditto.internal.utils.health.StatusInfo; import org.eclipse.ditto.json.JsonFactory; import org.eclipse.ditto.json.JsonObject; diff --git a/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionCreatorTest.java b/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionCreatorTest.java index 2b5e0e3e07..aa3ac9ea60 100644 --- a/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionCreatorTest.java +++ b/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionCreatorTest.java @@ -30,17 +30,17 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.actor.PoisonPill; -import akka.actor.Props; -import akka.cluster.Cluster; -import akka.cluster.sharding.ClusterSharding; -import akka.cluster.sharding.ShardRegion; -import akka.japi.pf.ReceiveBuilder; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.sharding.ClusterSharding; +import org.apache.pekko.cluster.sharding.ShardRegion; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link ShardRegionCreator}. diff --git a/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionProxyActorFactoryTest.java b/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionProxyActorFactoryTest.java index f9fbe2fc25..400f47d10a 100644 --- a/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionProxyActorFactoryTest.java +++ b/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/ShardRegionProxyActorFactoryTest.java @@ -18,7 +18,7 @@ import java.util.Map; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.internal.utils.cluster.config.ClusterConfig; import org.junit.Before; import org.junit.ClassRule; @@ -41,7 +41,7 @@ public final class ShardRegionProxyActorFactoryTest { ConfigFactory.parseMap(Map.ofEntries( Map.entry(MappingStrategies.CONFIG_KEY_DITTO_MAPPING_STRATEGY_IMPLEMENTATION, TestMappingStrategies.class.getName()), - Map.entry("akka.actor.provider", "cluster") + Map.entry("pekko.actor.provider", "cluster") )) ); diff --git a/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/SharedJsonifiableSerializerTest.java b/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/SharedJsonifiableSerializerTest.java index bfffbc1990..78c881061e 100644 --- a/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/SharedJsonifiableSerializerTest.java +++ b/internal/utils/cluster/src/test/java/org/eclipse/ditto/internal/utils/cluster/SharedJsonifiableSerializerTest.java @@ -47,8 +47,8 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ExtendedActorSystem; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Unit test for {@link JsonJsonifiableSerializer} and {@link CborJsonifiableSerializer}. diff --git a/internal/utils/cluster/src/test/resources/serialization-test.conf b/internal/utils/cluster/src/test/resources/serialization-test.conf index 8ec4137e77..1531c43a83 100644 --- a/internal/utils/cluster/src/test/resources/serialization-test.conf +++ b/internal/utils/cluster/src/test/resources/serialization-test.conf @@ -1,15 +1,15 @@ -akka { +pekko { actor { serialize-messages = on serializers { cbor-json-value = "org.eclipse.ditto.internal.utils.cluster.CborJsonValueSerializer" - jackson-cbor = "akka.serialization.jackson.JacksonCborSerializer" + jackson-cbor = "org.apache.pekko.serialization.jackson.JacksonCborSerializer" } serialization-bindings { "org.eclipse.ditto.json.JsonValue" = cbor-json-value - "org.eclipse.ditto.internal.utils.cluster.AkkaJacksonCborSerializable" = jackson-cbor + "org.eclipse.ditto.internal.utils.cluster.PekkoJacksonCborSerializable" = jackson-cbor } } } diff --git a/internal/utils/cluster/src/test/resources/shard-region-test.conf b/internal/utils/cluster/src/test/resources/shard-region-test.conf index 4356a64cb2..1da987bbc0 100755 --- a/internal/utils/cluster/src/test/resources/shard-region-test.conf +++ b/internal/utils/cluster/src/test/resources/shard-region-test.conf @@ -1,5 +1,5 @@ -akka { - loggers = ["akka.event.Logging$DefaultLogger"] +pekko { + loggers = ["org.apache.pekko.event.Logging$DefaultLogger"] stdout-loglevel = "WARNING" loglevel = "WARNING" enable-additional-serialization-bindings = on @@ -31,13 +31,13 @@ akka { serializers { cbor = "org.eclipse.ditto.internal.utils.cluster.CborJsonifiableSerializer" cbor-json-value = "org.eclipse.ditto.internal.utils.cluster.CborJsonValueSerializer" - jackson-cbor = "akka.serialization.jackson.JacksonCborSerializer" + jackson-cbor = "org.apache.pekko.serialization.jackson.JacksonCborSerializer" } serialization-bindings { "org.eclipse.ditto.base.model.json.Jsonifiable" = cbor "org.eclipse.ditto.base.model.exceptions.DittoRuntimeException" = cbor "org.eclipse.ditto.json.JsonValue" = cbor-json-value - "org.eclipse.ditto.internal.utils.cluster.AkkaJacksonCborSerializable" = jackson-cbor + "org.eclipse.ditto.internal.utils.cluster.PekkoJacksonCborSerializable" = jackson-cbor } } } diff --git a/internal/utils/config/pom.xml b/internal/utils/config/pom.xml index 492d33f58e..aebbdf6b16 100755 --- a/internal/utils/config/pom.xml +++ b/internal/utils/config/pom.xml @@ -47,16 +47,16 @@ slf4j-api - com.typesafe.akka - akka-actor_${scala.version} + org.apache.pekko + pekko-actor_${scala.version} - com.lightbend.akka.management - akka-lease-kubernetes_${scala.version} + org.apache.pekko + pekko-lease-kubernetes_${scala.version} - com.typesafe.akka - akka-coordination_${scala.version} + org.apache.pekko + pekko-coordination_${scala.version} diff --git a/internal/utils/config/src/main/resources/ditto-cluster-downing.conf b/internal/utils/config/src/main/resources/ditto-cluster-downing.conf index 577e0bff19..23e6c497ca 100644 --- a/internal/utils/config/src/main/resources/ditto-cluster-downing.conf +++ b/internal/utils/config/src/main/resources/ditto-cluster-downing.conf @@ -5,22 +5,22 @@ ditto.cluster { } } -akka.cluster { +pekko.cluster { - # Akka built-in split brain resolver + # Pekko built-in split brain resolver downing-provider-class = org.eclipse.ditto.base.service.cluster.DittoSplitBrainResolverProvider - # Akka built-in split brain resolver configuration + # Pekko built-in split brain resolver configuration split-brain-resolver { # Possible to switch to "lease-majority" when run in a kubernetes cluster, # so that the surviving minority does not down itself when a majority crashes. # Additional configuration required for Kubernetes: - # https://doc.akka.io/docs/akka/current/split-brain-resolver.html#lease + # https://pekko.apache.org/docs/pekko/current/split-brain-resolver.html#lease active-strategy = keep-majority active-strategy = ${?CLUSTER_DOWNING_ACTIVE_STRATEGY} # how to find the right value: - # https://doc.akka.io/docs/akka/current/split-brain-resolver.html + # https://pekko.apache.org/docs/pekko/current/split-brain-resolver.html stable-after = 8s stable-after = ${?CLUSTER_DOWNING_STABLE_AFTER} @@ -32,14 +32,14 @@ akka.cluster { lease-majority { # implementation of lease, see below - lease-implementation = "akka.coordination.lease.kubernetes" + lease-implementation = "pekko.coordination.lease.kubernetes" } } } -akka.coordination.lease.kubernetes { +pekko.coordination.lease.kubernetes { - lease-class = "akka.coordination.lease.kubernetes.KubernetesLease" + lease-class = "org.apache.pekko.coordination.lease.kubernetes.KubernetesLease" // Kubernetes mount these in pods api-ca-path = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" diff --git a/internal/utils/config/src/main/resources/ditto-mongo.conf b/internal/utils/config/src/main/resources/ditto-mongo.conf index a6121cf28d..6381c682af 100644 --- a/internal/utils/config/src/main/resources/ditto-mongo.conf +++ b/internal/utils/config/src/main/resources/ditto-mongo.conf @@ -8,9 +8,9 @@ # * mongo health checks: org.eclipse.ditto.internal.utils.persistence.mongo.MongoHealthChecker # # these settings are however NOT APPLIED to the following Ditto services: -# * things (persistence via akka-persistence) -# * policies (persistence via akka-persistence) -# * connectivity (persistence via akka-persistence) +# * things (persistence via pekko-persistence) +# * policies (persistence via pekko-persistence) +# * connectivity (persistence via pekko-persistence) ditto.mongodb { hostname = "localhost" hostname = ${?MONGO_DB_HOSTNAME} diff --git a/internal/utils/config/src/main/resources/ditto-akka-config.conf b/internal/utils/config/src/main/resources/ditto-pekko-config.conf similarity index 85% rename from internal/utils/config/src/main/resources/ditto-akka-config.conf rename to internal/utils/config/src/main/resources/ditto-pekko-config.conf index 51867008ea..f32d27946f 100644 --- a/internal/utils/config/src/main/resources/ditto-akka-config.conf +++ b/internal/utils/config/src/main/resources/ditto-pekko-config.conf @@ -1,7 +1,7 @@ -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" # for log messages during the actor system is starting up and shutting down: stdout-loglevel = "INFO" @@ -26,7 +26,7 @@ akka { discovery { # pick the discovery method you'd like to use: - method = akka-dns + method = pekko-dns method = ${?DISCOVERY_METHOD} kubernetes-api { @@ -45,7 +45,7 @@ akka { http { bind-hostname = "0.0.0.0" - # enable POST, PUT and DELETE operations on Akka Management API + # enable POST, PUT and DELETE operations on Pekko Management API # e.g. used to initiate full cluster shutdown via API route-providers-read-only = false } @@ -66,7 +66,7 @@ akka { service-namespace = ${?CLUSTER_BS_SERVICE_NAMESPACE} effective-name = ${?CLUSTER_BS_EFFECTIVE_NAME} - discovery-method = akka-dns + discovery-method = pekko-dns discovery-method = ${?DISCOVERY_METHOD} discovery-method = ${?BOOTSTRAP_DISCOVERY_METHOD} @@ -76,7 +76,7 @@ akka { } actor { - provider = "akka.cluster.ClusterActorRefProvider" + provider = "org.apache.pekko.cluster.ClusterActorRefProvider" enable-additional-serialization-bindings = on # this is only intended for testing. @@ -91,25 +91,25 @@ akka { json = "org.eclipse.ditto.internal.utils.cluster.JsonJsonifiableSerializer" cbor = "org.eclipse.ditto.internal.utils.cluster.CborJsonifiableSerializer" cbor-json-value = "org.eclipse.ditto.internal.utils.cluster.CborJsonValueSerializer" - jackson-cbor = "akka.serialization.jackson.JacksonCborSerializer" + jackson-cbor = "org.apache.pekko.serialization.jackson.JacksonCborSerializer" } # Ditto custom settings: serializers-json { # The number of bytes per direct buffer in the pool used to read or write messages during JSON serialization - direct-buffer-size = ${akka.remote.artery.advanced.maximum-frame-size} + direct-buffer-size = ${pekko.remote.artery.advanced.maximum-frame-size} # The maximal number of direct buffers kept in the direct buffer pool for reuse direct-buffer-pool-limit = 128 } serialization-bindings { - #"java.io.Serializable" = none # must not be set in order to get akka.cluster.sharding.ShardRegion$GetShardRegionStats$ serialized + #"java.io.Serializable" = none # must not be set in order to get org.apache.pekko.cluster.sharding.ShardRegion$GetShardRegionStats$ serialized # Serialize Jsonifiable events with custom JSON serializer: "org.eclipse.ditto.base.model.json.Jsonifiable" = cbor "org.eclipse.ditto.base.model.exceptions.DittoRuntimeException" = cbor "org.eclipse.ditto.json.JsonValue" = cbor-json-value - "org.eclipse.ditto.internal.utils.cluster.AkkaJacksonCborSerializable" = jackson-cbor + "org.eclipse.ditto.internal.utils.cluster.PekkoJacksonCborSerializable" = jackson-cbor } default-dispatcher { @@ -123,7 +123,7 @@ akka { } default-mailbox { - mailbox-type = "org.eclipse.ditto.internal.utils.akka.mailbox.MonitoredUnboundedMailboxType" + mailbox-type = "org.eclipse.ditto.internal.utils.pekko.mailbox.MonitoredUnboundedMailboxType" mailbox-type = ${?DEFAULT_MAILBOX} monitored-unbounded-mailbox { @@ -148,7 +148,7 @@ akka { } extensions = [ - "akka.cluster.pubsub.DistributedPubSub" + "org.apache.pekko.cluster.pubsub.DistributedPubSub" ] remote { @@ -230,13 +230,13 @@ akka { # Required for smooth rolling update in cluster sharding. app-version = ${ditto.version} - # Disable legacy metrics in akka-cluster. + # Disable legacy metrics in pekko-cluster. metrics.enabled = off # enable weakly up feature to allow members to join even if some members are unreachable allow-weakly-up-members = on - # required for akka-management-cluster-bootstrap (to be more robust): + # required for pekko-management-cluster-bootstrap (to be more robust): shutdown-after-unsuccessful-join-seed-nodes = 60s sharding { @@ -250,11 +250,11 @@ akka { # The lower of this and `rebalance-relative-limit` will be used. # only when configured >0 (which is the default), this new shard allocation strategy is used rebalance-absolute-limit = 20 - rebalance-absolute-limit = ${?AKKA_CLUSTER_SHARDING_LEAST_SHARD_ALLOCATION_STRATEGY_REBALANCE_ABSOLUTE_LIMIT} + rebalance-absolute-limit = ${?PEKKO_CLUSTER_SHARDING_LEAST_SHARD_ALLOCATION_STRATEGY_REBALANCE_ABSOLUTE_LIMIT} # must be <=1.0: with 100 active shards, a relative limit of 0.2 would result to "20" rebalance-relative-limit = 0.2 - rebalance-relative-limit = ${?AKKA_CLUSTER_SHARDING_LEAST_SHARD_ALLOCATION_STRATEGY_REBALANCE_RELATIVE_LIMIT} + rebalance-relative-limit = ${?PEKKO_CLUSTER_SHARDING_LEAST_SHARD_ALLOCATION_STRATEGY_REBALANCE_RELATIVE_LIMIT} } } } @@ -263,11 +263,11 @@ akka { phases { cluster-sharding-shutdown-region { timeout = 15s # default: 10s - timeout = ${?AKKA_COORDINATED_SHUTDOWN_PHASES_CLUSTER_SHARDING_SHUTDOWN_REGION} + timeout = ${?PEKKO_COORDINATED_SHUTDOWN_PHASES_CLUSTER_SHARDING_SHUTDOWN_REGION} } cluster-exiting { timeout = 15s # default: 10s - timeout = ${?AKKA_COORDINATED_SHUTDOWN_PHASES_CLUSTER_EXITING_TIMEOUT} + timeout = ${?PEKKO_COORDINATED_SHUTDOWN_PHASES_CLUSTER_EXITING_TIMEOUT} } } } @@ -295,23 +295,23 @@ sharding-dispatcher { throughput = ${?SHARDING_DISPATCHER_THROUGHPUT} } -akka.contrib.persistence.mongodb.mongo { - driver = "akka.contrib.persistence.mongodb.ScalaDriverPersistenceExtension" +pekko.contrib.persistence.mongodb.mongo { + driver = "pekko.contrib.persistence.mongodb.driver.ScalaDriverPersistenceExtension" # Write concerns are one of: Unacknowledged, Acknowledged, Journaled, ReplicaAcknowledged journal-write-concern = "Acknowledged" # By default was: "Journaled" - journal-write-concern = ${?AKKA_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN} + journal-write-concern = ${?PEKKO_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN} journal-wtimeout = 10000 - journal-wtimeout = ${?AKKA_PERSISTENCE_MONGO_JOURNAL_WRITE_TIMEOUT} + journal-wtimeout = ${?PEKKO_PERSISTENCE_MONGO_JOURNAL_WRITE_TIMEOUT} journal-fsync = false - journal-fsync = ${?AKKA_PERSISTENCE_MONGO_JOURNAL_FSYNC} + journal-fsync = ${?PEKKO_PERSISTENCE_MONGO_JOURNAL_FSYNC} snaps-write-concern = "Acknowledged" # By default was: "Journaled" - snaps-write-concern = ${?AKKA_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN} + snaps-write-concern = ${?PEKKO_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN} snaps-wtimeout = 5000 - snaps-wtimeout = ${?AKKA_PERSISTENCE_MONGO_SNAPS_WRITE_TIMEOUT} + snaps-wtimeout = ${?PEKKO_PERSISTENCE_MONGO_SNAPS_WRITE_TIMEOUT} snaps-fsync = false - snaps-fsync = ${?AKKA_PERSISTENCE_MONGO_SNAPS_FSYNC} + snaps-fsync = ${?PEKKO_PERSISTENCE_MONGO_SNAPS_FSYNC} realtime-enable-persistence = false diff --git a/internal/utils/config/src/main/resources/ditto-service-base.conf b/internal/utils/config/src/main/resources/ditto-service-base.conf index a0d04f6bfa..6afc40ca47 100644 --- a/internal/utils/config/src/main/resources/ditto-service-base.conf +++ b/internal/utils/config/src/main/resources/ditto-service-base.conf @@ -1,7 +1,7 @@ ditto.version = ${project.version} // Common configurations of Ditto services -include "ditto-akka-config.conf" +include "ditto-pekko-config.conf" include "ditto-cluster.conf" include "ditto-devops.conf" include "ditto-healthcheck.conf" diff --git a/internal/utils/ddata/pom.xml b/internal/utils/ddata/pom.xml index 9c72a5b4a6..6fbfeaf2d7 100755 --- a/internal/utils/ddata/pom.xml +++ b/internal/utils/ddata/pom.xml @@ -36,18 +36,18 @@ - com.typesafe.akka - akka-cluster_${scala.version} + org.apache.pekko + pekko-cluster_${scala.version} - com.typesafe.akka - akka-distributed-data_${scala.version} + org.apache.pekko + pekko-distributed-data_${scala.version} - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test diff --git a/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DefaultDistributedDataConfig.java b/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DefaultDistributedDataConfig.java index cf393eed74..255fb9db57 100644 --- a/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DefaultDistributedDataConfig.java +++ b/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DefaultDistributedDataConfig.java @@ -19,7 +19,7 @@ import com.typesafe.config.Config; -import akka.cluster.ddata.Replicator; +import org.apache.pekko.cluster.ddata.Replicator; /** * This class is the default implementation of the distributed data config. @@ -32,14 +32,14 @@ public final class DefaultDistributedDataConfig implements DistributedDataConfig private final Duration writeTimeout; private final Replicator.WriteConsistency subscriptionWriteConsistency; private final Duration subscriptionDelay; - private final AkkaReplicatorConfig akkaReplicatorConfig; + private final PekkoReplicatorConfig pekkoReplicatorConfig; private final int numberOfShards; private final int subscriberPoolSize; private DefaultDistributedDataConfig(final Config configWithFallback) { readTimeout = configWithFallback.getDuration(DistributedDataConfigValue.READ_TIMEOUT.getConfigPath()); writeTimeout = configWithFallback.getDuration(DistributedDataConfigValue.WRITE_TIMEOUT.getConfigPath()); - akkaReplicatorConfig = DefaultAkkaReplicatorConfig.of(configWithFallback); + pekkoReplicatorConfig = DefaultPekkoReplicatorConfig.of(configWithFallback); subscriptionWriteConsistency = toWriteConsistency(configWithFallback.getString( DistributedDataConfigValue.SUBSCRIPTION_WRITE_CONSISTENCY.getConfigPath()), configWithFallback.getDuration(DistributedDataConfigValue.WRITE_TIMEOUT.getConfigPath())); @@ -54,7 +54,7 @@ private DefaultDistributedDataConfig(final Config configWithFallback, final CharSequence replicatorRole) { readTimeout = configWithFallback.getDuration(DistributedDataConfigValue.READ_TIMEOUT.getConfigPath()); writeTimeout = configWithFallback.getDuration(DistributedDataConfigValue.WRITE_TIMEOUT.getConfigPath()); - akkaReplicatorConfig = DefaultAkkaReplicatorConfig.of(configWithFallback, replicatorName, replicatorRole); + pekkoReplicatorConfig = DefaultPekkoReplicatorConfig.of(configWithFallback, replicatorName, replicatorRole); subscriptionWriteConsistency = toWriteConsistency(configWithFallback.getString( DistributedDataConfigValue.SUBSCRIPTION_WRITE_CONSISTENCY.getConfigPath()), configWithFallback.getDuration(DistributedDataConfigValue.WRITE_TIMEOUT.getConfigPath())); @@ -116,8 +116,8 @@ public Duration getSubscriptionDelay() { } @Override - public AkkaReplicatorConfig getAkkaReplicatorConfig() { - return akkaReplicatorConfig; + public PekkoReplicatorConfig getPekkoReplicatorConfig() { + return pekkoReplicatorConfig; } @Override @@ -143,13 +143,13 @@ public boolean equals(final Object o) { Objects.equals(writeTimeout, that.writeTimeout) && Objects.equals(subscriptionWriteConsistency, that.subscriptionWriteConsistency) && Objects.equals(subscriptionDelay, that.subscriptionDelay) && - Objects.equals(akkaReplicatorConfig, that.akkaReplicatorConfig) && + Objects.equals(pekkoReplicatorConfig, that.pekkoReplicatorConfig) && subscriberPoolSize == that.subscriberPoolSize; } @Override public int hashCode() { - return Objects.hash(readTimeout, writeTimeout, akkaReplicatorConfig, subscriptionWriteConsistency, + return Objects.hash(readTimeout, writeTimeout, pekkoReplicatorConfig, subscriptionWriteConsistency, subscriptionDelay, numberOfShards, subscriberPoolSize); } @@ -160,7 +160,7 @@ public String toString() { ", writeTimeout=" + writeTimeout + ", subscriptionWriteConsistency=" + subscriptionWriteConsistency + ", subscriptionDelay" + subscriptionDelay + - ", akkaReplicatorConfig=" + akkaReplicatorConfig + + ", pekkoReplicatorConfig=" + pekkoReplicatorConfig + ", numberOfShards=" + numberOfShards + ", subscriberPoolSize=" + subscriberPoolSize + "]"; diff --git a/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DefaultAkkaReplicatorConfig.java b/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DefaultPekkoReplicatorConfig.java similarity index 69% rename from internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DefaultAkkaReplicatorConfig.java rename to internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DefaultPekkoReplicatorConfig.java index 9ba33521d7..8e48641821 100644 --- a/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DefaultAkkaReplicatorConfig.java +++ b/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DefaultPekkoReplicatorConfig.java @@ -26,11 +26,11 @@ import com.typesafe.config.ConfigRenderOptions; /** - * This class is the default implementation of Akka's {@link akka.cluster.ddata.Replicator} config. + * This class is the default implementation of Pekko's {@link org.apache.pekko.cluster.ddata.Replicator} config. */ -class DefaultAkkaReplicatorConfig implements AkkaReplicatorConfig { +class DefaultPekkoReplicatorConfig implements PekkoReplicatorConfig { - private static final String CONFIG_PATH = "akka-distributed-data"; + private static final String CONFIG_PATH = "pekko-distributed-data"; private final String name; private final String role; @@ -38,31 +38,31 @@ class DefaultAkkaReplicatorConfig implements AkkaReplicatorConfig { private final Duration gossipInterval; private final Config config; - private DefaultAkkaReplicatorConfig(final Config config) { - name = config.getString(AkkaReplicatorConfigValue.NAME.getConfigPath()); - role = config.getString(AkkaReplicatorConfigValue.ROLE.getConfigPath()); - gossipInterval = config.getDuration(AkkaReplicatorConfigValue.GOSSIP_INTERVAL.getConfigPath()); + private DefaultPekkoReplicatorConfig(final Config config) { + name = config.getString(PekkoReplicatorConfigValue.NAME.getConfigPath()); + role = config.getString(PekkoReplicatorConfigValue.ROLE.getConfigPath()); + gossipInterval = config.getDuration(PekkoReplicatorConfigValue.GOSSIP_INTERVAL.getConfigPath()); notifySubscribersInterval = - config.getDuration(AkkaReplicatorConfigValue.NOTIFY_SUBSCRIBERS_INTERVAL.getConfigPath()); + config.getDuration(PekkoReplicatorConfigValue.NOTIFY_SUBSCRIBERS_INTERVAL.getConfigPath()); this.config = config; } /** - * Returns an instance of {@code DefaultAkkaReplicatorConfig} based on the settings of the specified Config. + * Returns an instance of {@code DefaultPekkoReplicatorConfig} based on the settings of the specified Config. * * @param config is supposed to provide the settings of the Replicator config at {@value #CONFIG_PATH}. * @return the instance. * @throws org.eclipse.ditto.internal.utils.config.DittoConfigError if {@code config} is invalid. */ - public static DefaultAkkaReplicatorConfig of(final Config config) { + public static DefaultPekkoReplicatorConfig of(final Config config) { - return new DefaultAkkaReplicatorConfig(ConfigWithFallback.newInstance(config, CONFIG_PATH, - AkkaReplicatorConfigValue.values()) + return new DefaultPekkoReplicatorConfig(ConfigWithFallback.newInstance(config, CONFIG_PATH, + PekkoReplicatorConfigValue.values()) ); } /** - * Returns an instance of {@code DefaultAkkaReplicatorConfig} based on the settings of the specified Config. + * Returns an instance of {@code DefaultPekkoReplicatorConfig} based on the settings of the specified Config. * * @param name the name of the replicator. * @param role the cluster role of members with replicas of the distributed collection. @@ -70,20 +70,20 @@ public static DefaultAkkaReplicatorConfig of(final Config config) { * @return the instance. * @throws org.eclipse.ditto.internal.utils.config.DittoConfigError if {@code config} is invalid. */ - public static DefaultAkkaReplicatorConfig of(final Config config, final CharSequence name, + public static DefaultPekkoReplicatorConfig of(final Config config, final CharSequence name, final CharSequence role) { final Map specificConfig = new HashMap<>(2); - specificConfig.put(AkkaReplicatorConfigValue.NAME.getConfigPath(), checkNotNull(name, "name")); - specificConfig.put(AkkaReplicatorConfigValue.ROLE.getConfigPath(), checkNotNull(role, "role")); + specificConfig.put(PekkoReplicatorConfigValue.NAME.getConfigPath(), checkNotNull(name, "name")); + specificConfig.put(PekkoReplicatorConfigValue.ROLE.getConfigPath(), checkNotNull(role, "role")); // TODO Ditto issue #439: replace ConfigWithFallback - it breaks AbstractConfigValue.withFallback! // Workaround: re-parse my config final var configWithFallback = ConfigWithFallback.newInstance(config, CONFIG_PATH, - AkkaReplicatorConfigValue.values()); + PekkoReplicatorConfigValue.values()); final var fallback = ConfigFactory.parseString(configWithFallback.root().render(ConfigRenderOptions.concise())); - return new DefaultAkkaReplicatorConfig(ConfigFactory.parseMap(specificConfig) + return new DefaultPekkoReplicatorConfig(ConfigFactory.parseMap(specificConfig) .withFallback(fallback)); } @@ -120,7 +120,7 @@ public boolean equals(final Object o) { if (o == null || getClass() != o.getClass()) { return false; } - final DefaultAkkaReplicatorConfig that = (DefaultAkkaReplicatorConfig) o; + final DefaultPekkoReplicatorConfig that = (DefaultPekkoReplicatorConfig) o; return Objects.equals(config, that.config) && Objects.equals(name, that.name) && Objects.equals(role, that.role) && diff --git a/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DistributedData.java b/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DistributedData.java index 2b2d9f7fa8..36b9c5134b 100644 --- a/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DistributedData.java +++ b/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DistributedData.java @@ -24,17 +24,17 @@ import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; -import akka.actor.AbstractExtensionId; -import akka.actor.ActorRef; -import akka.actor.ActorRefFactory; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.actor.Extension; -import akka.cluster.ddata.Key; -import akka.cluster.ddata.ReplicatedData; -import akka.cluster.ddata.Replicator; -import akka.cluster.ddata.ReplicatorSettings; -import akka.pattern.Patterns; +import org.apache.pekko.actor.AbstractExtensionId; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.actor.Extension; +import org.apache.pekko.cluster.ddata.Key; +import org.apache.pekko.cluster.ddata.ReplicatedData; +import org.apache.pekko.cluster.ddata.Replicator; +import org.apache.pekko.cluster.ddata.ReplicatorSettings; +import org.apache.pekko.pattern.Patterns; import scala.concurrent.duration.FiniteDuration; /** @@ -94,13 +94,13 @@ protected DistributedData(final DistributedDataConfig config, final ActorRefFact */ private static ActorRef createReplicator(final DistributedDataConfig config, final ActorRefFactory factory) { - final AkkaReplicatorConfig akkaReplicatorConfig = config.getAkkaReplicatorConfig(); - return factory.actorOf(Replicator.props(ReplicatorSettings.apply(akkaReplicatorConfig.getCompleteConfig())), - akkaReplicatorConfig.getName()); + final PekkoReplicatorConfig pekkoReplicatorConfig = config.getPekkoReplicatorConfig(); + return factory.actorOf(Replicator.props(ReplicatorSettings.apply(pekkoReplicatorConfig.getCompleteConfig())), + pekkoReplicatorConfig.getName()); } /** - * Create a distributed data config with Akka's default options. + * Create a distributed data config with Pekko's default options. * * @param replicatorName the name of the replicator. * @param replicatorRole the cluster role of members with replicas of the distributed collection. diff --git a/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DistributedDataConfig.java b/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DistributedDataConfig.java index d726590a51..de358e1984 100644 --- a/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DistributedDataConfig.java +++ b/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/DistributedDataConfig.java @@ -18,7 +18,7 @@ import org.eclipse.ditto.internal.utils.config.KnownConfigValue; -import akka.cluster.ddata.Replicator; +import org.apache.pekko.cluster.ddata.Replicator; /** * Provides configuration settings for {@link DistributedData}. @@ -55,11 +55,11 @@ public interface DistributedDataConfig { Duration getSubscriptionDelay(); /** - * Returns the config to use for creating the {@link akka.cluster.ddata.Replicator}. + * Returns the config to use for creating the {@link org.apache.pekko.cluster.ddata.Replicator}. * - * @return the Akka replicator config to use. + * @return the Pekko replicator config to use. */ - AkkaReplicatorConfig getAkkaReplicatorConfig(); + PekkoReplicatorConfig getPekkoReplicatorConfig(); /** * The number of shards Ditto's ddata extension applies for Map keys. diff --git a/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/AkkaReplicatorConfig.java b/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/PekkoReplicatorConfig.java similarity index 77% rename from internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/AkkaReplicatorConfig.java rename to internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/PekkoReplicatorConfig.java index cef976e435..0059eca3b5 100644 --- a/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/AkkaReplicatorConfig.java +++ b/internal/utils/ddata/src/main/java/org/eclipse/ditto/internal/utils/ddata/PekkoReplicatorConfig.java @@ -21,10 +21,10 @@ import com.typesafe.config.Config; /** - * Provides configuration settings for the Akka {@link akka.cluster.ddata.Replicator}. + * Provides configuration settings for the Pekko {@link org.apache.pekko.cluster.ddata.Replicator}. */ @Immutable -public interface AkkaReplicatorConfig { +public interface PekkoReplicatorConfig { /** * Returns the name of the replicator. @@ -55,7 +55,7 @@ public interface AkkaReplicatorConfig { Duration getNotifySubscribersInterval(); /** - * Gets the complete Akka {@code distributed-data} config to use for the {@link akka.cluster.ddata.Replicator}. + * Gets the complete Pekko {@code distributed-data} config to use for the {@link org.apache.pekko.cluster.ddata.Replicator}. * * @return the complete config. */ @@ -63,17 +63,17 @@ public interface AkkaReplicatorConfig { /** * An enumeration of the known config path expressions and their associated default values for - * {@code AkkaReplicatorConfig}. + * {@code PekkoReplicatorConfig}. */ - enum AkkaReplicatorConfigValue implements KnownConfigValue { + enum PekkoReplicatorConfigValue implements KnownConfigValue { /** - * The name to be used for the {@link akka.cluster.ddata.Replicator}. + * The name to be used for the {@link org.apache.pekko.cluster.ddata.Replicator}. */ NAME("name", "ddataReplicator"), /** - * The role to be used for the {@link akka.cluster.ddata.Replicator}. + * The role to be used for the {@link org.apache.pekko.cluster.ddata.Replicator}. */ ROLE("role", ""), @@ -90,7 +90,7 @@ enum AkkaReplicatorConfigValue implements KnownConfigValue { private final String path; private final Object defaultValue; - AkkaReplicatorConfigValue(final String thePath, final Object theDefaultValue) { + PekkoReplicatorConfigValue(final String thePath, final Object theDefaultValue) { path = thePath; defaultValue = theDefaultValue; } diff --git a/internal/utils/ddata/src/main/resources/reference.conf b/internal/utils/ddata/src/main/resources/reference.conf index 1d4a388ffc..c176b45321 100644 --- a/internal/utils/ddata/src/main/resources/reference.conf +++ b/internal/utils/ddata/src/main/resources/reference.conf @@ -3,8 +3,8 @@ ditto { ddata { - akka-distributed-data = ${akka.cluster.distributed-data} - akka-distributed-data { + pekko-distributed-data = ${pekko.cluster.distributed-data} + pekko-distributed-data { // specific overrides come here # How often the Replicator should send out gossip information. @@ -15,7 +15,7 @@ ditto { # from which data size to start logging INFO messages about the ddata size of a *single ddata key* in - # akka.cluster.ddata.PayloadSizeAggregator (using logger "akka.cluster.ddata.Replicator): + # org.apache.pekko.cluster.ddata.PayloadSizeAggregator (using logger "org.apache.pekko.cluster.ddata.Replicator): # default: 10 KiB log-data-size-exceeding = 100 B log-data-size-exceeding = ${?DITTO_DDATA_LOG_DATA_SIZE_EXCEEDING} @@ -31,9 +31,9 @@ ditto { # default: 50 # If this is too low, full syncs of the ddata map will be triggered which may be larger than the configured # `max-frame-size` of the cluster, - # then we will see: Failed to serialize oversized message [akka.cluster.ddata.Replicator$Internal$Gossip]. + # then we will see: Failed to serialize oversized message [org.apache.pekko.cluster.ddata.Replicator$Internal$Gossip]. # If this is configured too high, - # we will see: Failed to serialize oversized message [ActorSelectionMessage(akka.cluster.ddata.Replicator$Internal$DeltaPropagation)] + # we will see: Failed to serialize oversized message [ActorSelectionMessage(org.apache.pekko.cluster.ddata.Replicator$Internal$DeltaPropagation)] delta-crdt.max-delta-size = 50 delta-crdt.max-delta-size = ${?DITTO_DDATA_DELTA_MAX_DELTA_SIZE} } @@ -58,13 +58,13 @@ ditto { number-of-shards = ${?DITTO_DDATA_NUMBER_OF_SHARDS} # The number of subscribers in each subscriber pool. - # Akka deserializes (remote) messages addressed to 1 actor sequentially, which makes deserialization throughput + # Pekko deserializes (remote) messages addressed to 1 actor sequentially, which makes deserialization throughput # unable to scale with the number of CPUs given to the instance. # Each instance starts a fixed number of `subscriber-pool-size` subscribers. # Published signals are sent to each subscriber according to the entity ID. # This allows signals to different things to be deserialized in parallel. subscriber-pool-size = 1 - subscriber-pool-size = ${?akka.remote.artery.advanced.inbound-lanes} + subscriber-pool-size = ${?pekko.remote.artery.advanced.inbound-lanes} subscriber-pool-size = ${?REMOTE_INBOUND_LANES} subscriber-pool-size = ${?DITTO_DDATA_SUBSCRIBER_POOL_SIZE} } diff --git a/internal/utils/ddata/src/test/java/org/eclipse/ditto/internal/utils/ddata/DefaultDistributedDataConfigTest.java b/internal/utils/ddata/src/test/java/org/eclipse/ditto/internal/utils/ddata/DefaultDistributedDataConfigTest.java index a18bec4f96..0ddaf94ddf 100644 --- a/internal/utils/ddata/src/test/java/org/eclipse/ditto/internal/utils/ddata/DefaultDistributedDataConfigTest.java +++ b/internal/utils/ddata/src/test/java/org/eclipse/ditto/internal/utils/ddata/DefaultDistributedDataConfigTest.java @@ -26,7 +26,7 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.cluster.ddata.Replicator; +import org.apache.pekko.cluster.ddata.Replicator; import nl.jqno.equalsverifier.EqualsVerifier; /** @@ -47,7 +47,7 @@ public static void initTestFixture() { @Test public void assertImmutability() { assertInstancesOf(DefaultDistributedDataConfig.class, areImmutable(), - AllowedReason.provided(DefaultAkkaReplicatorConfig.class, + AllowedReason.provided(DefaultPekkoReplicatorConfig.class, Replicator.WriteConsistency.class).areAlsoImmutable()); } diff --git a/internal/utils/ddata/src/test/java/org/eclipse/ditto/internal/utils/ddata/DefaultAkkaReplicatorConfigTest.java b/internal/utils/ddata/src/test/java/org/eclipse/ditto/internal/utils/ddata/DefaultPekkoReplicatorConfigTest.java similarity index 61% rename from internal/utils/ddata/src/test/java/org/eclipse/ditto/internal/utils/ddata/DefaultAkkaReplicatorConfigTest.java rename to internal/utils/ddata/src/test/java/org/eclipse/ditto/internal/utils/ddata/DefaultPekkoReplicatorConfigTest.java index 0a5013eab1..342ee7cbb9 100644 --- a/internal/utils/ddata/src/test/java/org/eclipse/ditto/internal/utils/ddata/DefaultAkkaReplicatorConfigTest.java +++ b/internal/utils/ddata/src/test/java/org/eclipse/ditto/internal/utils/ddata/DefaultPekkoReplicatorConfigTest.java @@ -30,9 +30,9 @@ import nl.jqno.equalsverifier.EqualsVerifier; /** - * Unit test for {@link DefaultAkkaReplicatorConfig}. + * Unit test for {@link DefaultPekkoReplicatorConfig}. */ -public final class DefaultAkkaReplicatorConfigTest { +public final class DefaultPekkoReplicatorConfigTest { private static Config testConfig; @@ -41,49 +41,49 @@ public final class DefaultAkkaReplicatorConfigTest { @BeforeClass public static void initTestFixture() { - testConfig = ConfigFactory.load("akka-replicator-ddata-test"); + testConfig = ConfigFactory.load("pekko-replicator-ddata-test"); } @Test public void assertImmutability() { - assertInstancesOf(DefaultAkkaReplicatorConfig.class, areImmutable(), + assertInstancesOf(DefaultPekkoReplicatorConfig.class, areImmutable(), AllowedReason.provided(Config.class).areAlsoImmutable()); } @Test public void testHashCodeAndEquals() { - EqualsVerifier.forClass(DefaultAkkaReplicatorConfig.class) + EqualsVerifier.forClass(DefaultPekkoReplicatorConfig.class) .usingGetClass() .verify(); } @Test public void underTestReturnsDefaultValuesIfBaseConfigWasEmpty() { - final DefaultAkkaReplicatorConfig underTest = DefaultAkkaReplicatorConfig.of(ConfigFactory.empty()); + final DefaultPekkoReplicatorConfig underTest = DefaultPekkoReplicatorConfig.of(ConfigFactory.empty()); softly.assertThat(underTest.getName()) - .as(AkkaReplicatorConfig.AkkaReplicatorConfigValue.NAME.getConfigPath()) - .isEqualTo(AkkaReplicatorConfig.AkkaReplicatorConfigValue.NAME.getDefaultValue()); + .as(PekkoReplicatorConfig.PekkoReplicatorConfigValue.NAME.getConfigPath()) + .isEqualTo(PekkoReplicatorConfig.PekkoReplicatorConfigValue.NAME.getDefaultValue()); softly.assertThat(underTest.getRole()) - .as(AkkaReplicatorConfig.AkkaReplicatorConfigValue.ROLE.getConfigPath()) - .isEqualTo(AkkaReplicatorConfig.AkkaReplicatorConfigValue.ROLE.getDefaultValue()); + .as(PekkoReplicatorConfig.PekkoReplicatorConfigValue.ROLE.getConfigPath()) + .isEqualTo(PekkoReplicatorConfig.PekkoReplicatorConfigValue.ROLE.getDefaultValue()); } @Test public void underTestReturnsValuesOfConfigFile() { - final DefaultAkkaReplicatorConfig underTest = DefaultAkkaReplicatorConfig.of(testConfig); + final DefaultPekkoReplicatorConfig underTest = DefaultPekkoReplicatorConfig.of(testConfig); softly.assertThat(underTest.getName()) - .as(AkkaReplicatorConfig.AkkaReplicatorConfigValue.NAME.getConfigPath()) + .as(PekkoReplicatorConfig.PekkoReplicatorConfigValue.NAME.getConfigPath()) .isEqualTo("the-name"); softly.assertThat(underTest.getRole()) - .as(AkkaReplicatorConfig.AkkaReplicatorConfigValue.ROLE.getConfigPath()) + .as(PekkoReplicatorConfig.PekkoReplicatorConfigValue.ROLE.getConfigPath()) .isEqualTo("a-role"); softly.assertThat(underTest.getGossipInterval()) - .as(AkkaReplicatorConfig.AkkaReplicatorConfigValue.GOSSIP_INTERVAL.getConfigPath()) + .as(PekkoReplicatorConfig.PekkoReplicatorConfigValue.GOSSIP_INTERVAL.getConfigPath()) .isEqualTo(Duration.ofMillis(1337)); softly.assertThat(underTest.getNotifySubscribersInterval()) - .as(AkkaReplicatorConfig.AkkaReplicatorConfigValue.NOTIFY_SUBSCRIBERS_INTERVAL.getConfigPath()) + .as(PekkoReplicatorConfig.PekkoReplicatorConfigValue.NOTIFY_SUBSCRIBERS_INTERVAL.getConfigPath()) .isEqualTo(Duration.ofSeconds(1)); } @@ -92,16 +92,16 @@ public void underTestReturnsValuesOfConfigFileWithOverwrites() { final String name = "nomen-est-omen"; final String role = "da-role"; - final DefaultAkkaReplicatorConfig underTest = DefaultAkkaReplicatorConfig.of(testConfig, name, role); + final DefaultPekkoReplicatorConfig underTest = DefaultPekkoReplicatorConfig.of(testConfig, name, role); softly.assertThat(underTest.getName()) - .as(AkkaReplicatorConfig.AkkaReplicatorConfigValue.NAME.getConfigPath()) + .as(PekkoReplicatorConfig.PekkoReplicatorConfigValue.NAME.getConfigPath()) .isEqualTo(name); softly.assertThat(underTest.getRole()) - .as(AkkaReplicatorConfig.AkkaReplicatorConfigValue.ROLE.getConfigPath()) + .as(PekkoReplicatorConfig.PekkoReplicatorConfigValue.ROLE.getConfigPath()) .isEqualTo(role); - // test that akka default config values are copied + // test that pekko default config values are copied final Config completeConfig = underTest.getCompleteConfig(); assertThat(completeConfig.getDuration("gossip-interval")).isEqualTo(Duration.ofMillis(1337L)); assertThat(completeConfig.getBoolean("delta-crdt.enabled")).isTrue(); diff --git a/internal/utils/ddata/src/test/resources/ditto-ddata-test.conf b/internal/utils/ddata/src/test/resources/ditto-ddata-test.conf index 8200ba5cf8..328158be7a 100644 --- a/internal/utils/ddata/src/test/resources/ditto-ddata-test.conf +++ b/internal/utils/ddata/src/test/resources/ditto-ddata-test.conf @@ -1,6 +1,6 @@ ddata { - akka-distributed-data = ${akka.cluster.distributed-data} - akka-distributed-data { + pekko-distributed-data = ${pekko.cluster.distributed-data} + pekko-distributed-data { name = "the-name" role = "a-role" notify-subscribers-interval = 1 s diff --git a/internal/utils/ddata/src/test/resources/akka-replicator-ddata-test.conf b/internal/utils/ddata/src/test/resources/pekko-replicator-ddata-test.conf similarity index 55% rename from internal/utils/ddata/src/test/resources/akka-replicator-ddata-test.conf rename to internal/utils/ddata/src/test/resources/pekko-replicator-ddata-test.conf index dd144913b2..d7593efa85 100644 --- a/internal/utils/ddata/src/test/resources/akka-replicator-ddata-test.conf +++ b/internal/utils/ddata/src/test/resources/pekko-replicator-ddata-test.conf @@ -1,5 +1,5 @@ -akka-distributed-data = ${akka.cluster.distributed-data} -akka-distributed-data { +pekko-distributed-data = ${pekko.cluster.distributed-data} +pekko-distributed-data { name = "the-name" role = "a-role" gossip-interval = 1337ms diff --git a/internal/utils/extension/pom.xml b/internal/utils/extension/pom.xml index 509942d86d..fc72f735a0 100644 --- a/internal/utils/extension/pom.xml +++ b/internal/utils/extension/pom.xml @@ -27,12 +27,12 @@ - com.typesafe.akka - akka-actor_2.13 + org.apache.pekko + pekko-actor_2.13 org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko diff --git a/internal/utils/extension/src/main/java/org/eclipse/ditto/internal/utils/extension/DittoExtensionIds.java b/internal/utils/extension/src/main/java/org/eclipse/ditto/internal/utils/extension/DittoExtensionIds.java index 3bae6ec72c..64205b44aa 100644 --- a/internal/utils/extension/src/main/java/org/eclipse/ditto/internal/utils/extension/DittoExtensionIds.java +++ b/internal/utils/extension/src/main/java/org/eclipse/ditto/internal/utils/extension/DittoExtensionIds.java @@ -17,13 +17,13 @@ import java.util.Map; import java.util.function.Function; -import org.eclipse.ditto.internal.utils.akka.AkkaClassLoader; +import org.eclipse.ditto.internal.utils.pekko.PekkoClassLoader; import org.eclipse.ditto.internal.utils.extension.DittoExtensionPoint.ExtensionId.ExtensionIdConfig; -import akka.actor.AbstractExtensionId; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.actor.Extension; +import org.apache.pekko.actor.AbstractExtensionId; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.actor.Extension; public final class DittoExtensionIds implements Extension { @@ -54,7 +54,7 @@ static final class ExtensionId extends AbstractExtensionId { @Override public DittoExtensionIds createExtension(final ExtendedActorSystem system) { - return AkkaClassLoader.instantiate(system, DittoExtensionIds.class, + return PekkoClassLoader.instantiate(system, DittoExtensionIds.class, DittoExtensionIds.class.getCanonicalName(), List.of(), List.of()); diff --git a/internal/utils/extension/src/main/java/org/eclipse/ditto/internal/utils/extension/DittoExtensionPoint.java b/internal/utils/extension/src/main/java/org/eclipse/ditto/internal/utils/extension/DittoExtensionPoint.java index dd4357d205..8e28135b21 100644 --- a/internal/utils/extension/src/main/java/org/eclipse/ditto/internal/utils/extension/DittoExtensionPoint.java +++ b/internal/utils/extension/src/main/java/org/eclipse/ditto/internal/utils/extension/DittoExtensionPoint.java @@ -19,7 +19,7 @@ import javax.annotation.Nullable; -import org.eclipse.ditto.internal.utils.akka.AkkaClassLoader; +import org.eclipse.ditto.internal.utils.pekko.PekkoClassLoader; import org.eclipse.ditto.internal.utils.config.DittoConfigError; import org.eclipse.ditto.internal.utils.config.ScopedConfig; @@ -28,13 +28,13 @@ import com.typesafe.config.ConfigValue; import com.typesafe.config.ConfigValueType; -import akka.actor.AbstractExtensionId; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.actor.Extension; +import org.apache.pekko.actor.AbstractExtensionId; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.actor.Extension; /** - * Extension Point for extending Ditto via Akka Extensions to provide custom functionality to different + * Extension Point for extending Ditto via Pekko Extensions to provide custom functionality to different * aspects of the service. * * @since 3.0.0 @@ -44,7 +44,7 @@ public interface DittoExtensionPoint extends Extension { /** * @param the class of the extension for which an implementation should be loaded. */ - abstract class ExtensionId extends AbstractExtensionId { + abstract class ExtensionId extends AbstractExtensionId { private final ExtensionIdConfig extensionIdConfig; @@ -59,7 +59,7 @@ protected ExtensionId(final ExtensionIdConfig extensionIdConfig) { @Override public T createExtension(final ExtendedActorSystem system) { - return AkkaClassLoader.instantiate(system, extensionIdConfig.parentClass(), + return PekkoClassLoader.instantiate(system, extensionIdConfig.parentClass(), getImplementation(system), List.of(ActorSystem.class, Config.class), List.of(system, extensionIdConfig.extensionConfig())); @@ -113,7 +113,7 @@ public record ExtensionIdConfig(Class parentClass, * @throws com.typesafe.config.ConfigException.WrongType in case neither an object nor a string is * configured at the config key of config. */ - public static ExtensionIdConfig of( + public static ExtensionIdConfig of( final Class parentClass, final Config config, final String configKey) { diff --git a/internal/utils/health/pom.xml b/internal/utils/health/pom.xml index 5726c0d62e..d49043fb5a 100755 --- a/internal/utils/health/pom.xml +++ b/internal/utils/health/pom.xml @@ -36,7 +36,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko org.eclipse.ditto @@ -46,23 +46,23 @@ - com.typesafe.akka - akka-actor_${scala.version} + org.apache.pekko + pekko-actor_${scala.version} - com.typesafe.akka - akka-cluster_${scala.version} + org.apache.pekko + pekko-cluster_${scala.version} - com.typesafe.akka - akka-http_${scala.version} + org.apache.pekko + pekko-http_${scala.version} provided - + - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test diff --git a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/AbstractBackgroundStreamingActorWithConfigWithStatusReport.java b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/AbstractBackgroundStreamingActorWithConfigWithStatusReport.java index 241d3490ff..abcd9bcba2 100644 --- a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/AbstractBackgroundStreamingActorWithConfigWithStatusReport.java +++ b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/AbstractBackgroundStreamingActorWithConfigWithStatusReport.java @@ -22,10 +22,10 @@ import org.eclipse.ditto.base.api.common.Shutdown; import org.eclipse.ditto.base.api.common.ShutdownResponse; -import org.eclipse.ditto.internal.utils.akka.actors.ModifyConfigBehavior; -import org.eclipse.ditto.internal.utils.akka.actors.RetrieveConfigBehavior; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.actors.ModifyConfigBehavior; +import org.eclipse.ditto.internal.utils.pekko.actors.RetrieveConfigBehavior; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.config.DittoConfigError; import org.eclipse.ditto.internal.utils.health.config.BackgroundStreamingConfig; import org.eclipse.ditto.json.JsonArray; @@ -40,17 +40,17 @@ import com.typesafe.config.ConfigFactory; import com.typesafe.config.ConfigRenderOptions; -import akka.Done; -import akka.actor.AbstractActorWithTimers; -import akka.japi.Pair; -import akka.japi.pf.ReceiveBuilder; -import akka.stream.KillSwitch; -import akka.stream.KillSwitches; -import akka.stream.Materializer; -import akka.stream.UniqueKillSwitch; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.Done; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.stream.KillSwitch; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.UniqueKillSwitch; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** * Common behavior for actors that stay alive for a long time running a stream over and over. diff --git a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/AbstractHealthCheckingActor.java b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/AbstractHealthCheckingActor.java index 840fe4024e..1e783554b3 100644 --- a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/AbstractHealthCheckingActor.java +++ b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/AbstractHealthCheckingActor.java @@ -15,12 +15,12 @@ import java.util.HashSet; import java.util.Set; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; -import akka.actor.AbstractActorWithTimers; -import akka.actor.ActorRef; -import akka.event.DiagnosticLoggingAdapter; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Abstract base implementations for actors which check the health of a subsystem. diff --git a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/CompositeCachingHealthCheckingActor.java b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/CompositeCachingHealthCheckingActor.java index 1f823d46fb..cb8adac3bf 100644 --- a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/CompositeCachingHealthCheckingActor.java +++ b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/CompositeCachingHealthCheckingActor.java @@ -22,10 +22,10 @@ import javax.annotation.concurrent.Immutable; -import akka.actor.ActorRef; -import akka.actor.Cancellable; -import akka.actor.Props; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Cancellable; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.pf.ReceiveBuilder; import scala.concurrent.duration.FiniteDuration; /** @@ -65,13 +65,13 @@ private CompositeCachingHealthCheckingActor(final Map childActorP } /** - * Creates Akka configuration object Props for this {@link CompositeCachingHealthCheckingActor}. + * Creates Pekko configuration object Props for this {@link CompositeCachingHealthCheckingActor}. * * @param childActorProps the Props for creating child actors, each providing health for a different subsystem. * @param updateInterval the duration between the updates of the health (sub systems will be queried for their * health in this interval). * @param enabled whether the health-check should be enabled. - * @return the Akka configuration Props object + * @return the Pekko configuration Props object */ public static Props props(final Map childActorProps, final Duration updateInterval, final boolean enabled) { diff --git a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/DefaultHealthCheckingActorFactory.java b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/DefaultHealthCheckingActorFactory.java index fde533a86a..d37c892193 100644 --- a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/DefaultHealthCheckingActorFactory.java +++ b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/DefaultHealthCheckingActorFactory.java @@ -16,7 +16,7 @@ import javax.annotation.Nullable; -import akka.actor.Props; +import org.apache.pekko.actor.Props; /** * Provides an actor for checking and caching the health of a ditto service. @@ -35,12 +35,12 @@ private DefaultHealthCheckingActorFactory() { private static final String PERSISTENCE_LABEL = "persistence"; /** - * Creates Akka configuration object Props for a health checking actor. + * Creates Pekko configuration object Props for a health checking actor. * * @param options the options to configure this actor. * @param persistenceCheckerProps props to create persistence health checkers. * @param otherProps props of other child actors. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final HealthCheckingActorOptions options, @Nullable final Props persistenceCheckerProps, final Props... otherProps) { diff --git a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/HealthRouteSupplier.java b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/HealthRouteSupplier.java index 8ac4053fae..27f3a37715 100755 --- a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/HealthRouteSupplier.java +++ b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/HealthRouteSupplier.java @@ -12,22 +12,22 @@ */ package org.eclipse.ditto.internal.utils.health; -import static akka.http.javadsl.server.Directives.completeWithFuture; +import static org.apache.pekko.http.javadsl.server.Directives.completeWithFuture; import java.time.Duration; import java.util.function.Supplier; import javax.annotation.Nullable; -import akka.actor.ActorRef; -import akka.event.LoggingAdapter; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.server.Route; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.event.LoggingAdapter; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.pattern.Patterns; /** - * Function for Akka HTTP Routes to transform a RequestContext into a RouteResult with the expected status code for + * Function for Pekko HTTP Routes to transform a RequestContext into a RouteResult with the expected status code for * health (200/503) and the required format. */ public class HealthRouteSupplier implements Supplier { diff --git a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/SingletonStatusReporter.java b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/SingletonStatusReporter.java index c4409dc2da..b5166fd494 100644 --- a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/SingletonStatusReporter.java +++ b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/SingletonStatusReporter.java @@ -12,10 +12,10 @@ */ package org.eclipse.ditto.internal.utils.health; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.cluster.Cluster; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Actor to report health status for a singleton on and only on the role leader of a cluster. diff --git a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/cluster/ClusterRoleStatus.java b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/cluster/ClusterRoleStatus.java index 0049cb0336..a9e937203b 100755 --- a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/cluster/ClusterRoleStatus.java +++ b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/cluster/ClusterRoleStatus.java @@ -30,7 +30,7 @@ import org.eclipse.ditto.base.model.json.Jsonifiable; /** - * Holds the status of a specific akka cluster role. + * Holds the status of a specific pekko cluster role. */ @Immutable public final class ClusterRoleStatus implements Jsonifiable { diff --git a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/cluster/ClusterStatus.java b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/cluster/ClusterStatus.java index 1cec8dbd28..5ecea208c2 100755 --- a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/cluster/ClusterStatus.java +++ b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/cluster/ClusterStatus.java @@ -33,7 +33,7 @@ import org.eclipse.ditto.base.model.json.Jsonifiable; /** - * Holds the status of the akka cluster. + * Holds the status of the pekko cluster. */ @Immutable public final class ClusterStatus implements Jsonifiable { diff --git a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/routes/StatusRoute.java b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/routes/StatusRoute.java index 24dc48dd85..57106c0458 100755 --- a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/routes/StatusRoute.java +++ b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/routes/StatusRoute.java @@ -12,12 +12,12 @@ */ package org.eclipse.ditto.internal.utils.health.routes; -import static akka.http.javadsl.server.Directives.complete; -import static akka.http.javadsl.server.Directives.get; -import static akka.http.javadsl.server.Directives.path; -import static akka.http.javadsl.server.Directives.pathEndOrSingleSlash; -import static akka.http.javadsl.server.Directives.pathPrefix; -import static akka.http.javadsl.server.Directives.route; +import static org.apache.pekko.http.javadsl.server.Directives.complete; +import static org.apache.pekko.http.javadsl.server.Directives.get; +import static org.apache.pekko.http.javadsl.server.Directives.path; +import static org.apache.pekko.http.javadsl.server.Directives.pathEndOrSingleSlash; +import static org.apache.pekko.http.javadsl.server.Directives.pathPrefix; +import static org.apache.pekko.http.javadsl.server.Directives.route; import java.util.function.Supplier; @@ -25,15 +25,15 @@ import org.eclipse.ditto.internal.utils.health.cluster.ClusterStatus; import org.eclipse.ditto.internal.utils.health.status.Status; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.server.Route; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.server.Route; /** - * Builder for creating Akka HTTP route for {@code /status}. + * Builder for creating Pekko HTTP route for {@code /status}. */ public final class StatusRoute { @@ -49,7 +49,7 @@ public final class StatusRoute { * * @param clusterStateSupplier the supplier to get the cluster state. * @param healthCheckingActor the HealthCheckingActor to use. - * @param actorSystem the Akka ActorSystem. + * @param actorSystem the Pekko ActorSystem. */ public StatusRoute(final Supplier clusterStateSupplier, final ActorRef healthCheckingActor, final ActorSystem actorSystem) { diff --git a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/status/StatusSupplierActor.java b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/status/StatusSupplierActor.java index 320be4c040..5bce67d269 100755 --- a/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/status/StatusSupplierActor.java +++ b/internal/utils/health/src/main/java/org/eclipse/ditto/internal/utils/health/status/StatusSupplierActor.java @@ -14,19 +14,19 @@ import java.time.Duration; -import org.eclipse.ditto.internal.utils.akka.SimpleCommand; -import org.eclipse.ditto.internal.utils.akka.SimpleCommandResponse; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.SimpleCommand; +import org.eclipse.ditto.internal.utils.pekko.SimpleCommandResponse; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.health.AbstractHealthCheckingActor; import org.eclipse.ditto.internal.utils.health.RetrieveHealth; import org.eclipse.ditto.internal.utils.health.StatusInfo; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.event.DiagnosticLoggingAdapter; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; /** * Actor supplying "status" and "health" information of an ActorSystem. Has to be started as "root" actor so that @@ -59,11 +59,11 @@ private StatusSupplierActor(final String rootActorName) { } /** - * Creates Akka configuration object Props for this StatusSupplierActor. + * Creates Pekko configuration object Props for this StatusSupplierActor. * * @param rootActorName sets the name of the root actor (e.g. "thingsRoot") which is used as the parent of * {@link org.eclipse.ditto.internal.utils.health.AbstractHealthCheckingActor#ACTOR_NAME}. - * @return the Akka configuration Props object + * @return the Pekko configuration Props object */ public static Props props(final String rootActorName) { diff --git a/internal/utils/http/pom.xml b/internal/utils/http/pom.xml index c0a4d142a4..cfc98dded5 100755 --- a/internal/utils/http/pom.xml +++ b/internal/utils/http/pom.xml @@ -31,12 +31,12 @@ - com.typesafe.akka - akka-actor_${scala.version} + org.apache.pekko + pekko-actor_${scala.version} - com.typesafe.akka - akka-http_${scala.version} + org.apache.pekko + pekko-http_${scala.version} diff --git a/internal/utils/http/src/main/java/org/eclipse/ditto/internal/utils/http/DefaultHttpClientFacade.java b/internal/utils/http/src/main/java/org/eclipse/ditto/internal/utils/http/DefaultHttpClientFacade.java index e3e053d31d..b0719d9787 100644 --- a/internal/utils/http/src/main/java/org/eclipse/ditto/internal/utils/http/DefaultHttpClientFacade.java +++ b/internal/utils/http/src/main/java/org/eclipse/ditto/internal/utils/http/DefaultHttpClientFacade.java @@ -18,11 +18,11 @@ import org.eclipse.ditto.base.service.config.http.HttpProxyConfig; -import akka.actor.ActorSystem; -import akka.http.javadsl.Http; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.settings.ConnectionPoolSettings; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.Http; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.settings.ConnectionPoolSettings; /** * Default implementation of {@link HttpClientFacade}. diff --git a/internal/utils/http/src/main/java/org/eclipse/ditto/internal/utils/http/HttpClientFacade.java b/internal/utils/http/src/main/java/org/eclipse/ditto/internal/utils/http/HttpClientFacade.java index aeaad5a64c..ea4056794b 100644 --- a/internal/utils/http/src/main/java/org/eclipse/ditto/internal/utils/http/HttpClientFacade.java +++ b/internal/utils/http/src/main/java/org/eclipse/ditto/internal/utils/http/HttpClientFacade.java @@ -14,12 +14,12 @@ import java.util.concurrent.CompletionStage; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; /** - * Provides a pre-configured Akka HTTP client. + * Provides a pre-configured Pekko HTTP client. */ public interface HttpClientFacade { @@ -32,7 +32,7 @@ public interface HttpClientFacade { CompletionStage createSingleHttpRequest(HttpRequest request); /** - * @return an {@link akka.actor.ActorSystem} instance which can be used for stream execution. + * @return an {@link org.apache.pekko.actor.ActorSystem} instance which can be used for stream execution. */ ActorSystem getActorSystem(); diff --git a/internal/utils/metrics/pom.xml b/internal/utils/metrics/pom.xml index 00d3cdb4fe..8086c514ad 100644 --- a/internal/utils/metrics/pom.xml +++ b/internal/utils/metrics/pom.xml @@ -46,12 +46,12 @@ kamon-executors_${scala.version} - com.typesafe.akka - akka-actor_${scala.version} + org.apache.pekko + pekko-actor_${scala.version} - com.typesafe.akka - akka-http_${scala.version} + org.apache.pekko + pekko-http_${scala.version} provided @@ -59,9 +59,15 @@ com.github.scullxbones - akka-persistence-mongo-common_${scala.version} + pekko-persistence-mongodb_${scala.version} provided + + + nl.grons + metrics4-scala_${scala.version} + diff --git a/internal/utils/metrics/src/main/java/org/eclipse/ditto/internal/utils/metrics/executor/InstrumentedForkJoinExecutorServiceConfigurator.java b/internal/utils/metrics/src/main/java/org/eclipse/ditto/internal/utils/metrics/executor/InstrumentedForkJoinExecutorServiceConfigurator.java index 0c246dbf2a..c6df458e43 100644 --- a/internal/utils/metrics/src/main/java/org/eclipse/ditto/internal/utils/metrics/executor/InstrumentedForkJoinExecutorServiceConfigurator.java +++ b/internal/utils/metrics/src/main/java/org/eclipse/ditto/internal/utils/metrics/executor/InstrumentedForkJoinExecutorServiceConfigurator.java @@ -16,10 +16,10 @@ import com.typesafe.config.Config; -import akka.dispatch.DispatcherPrerequisites; -import akka.dispatch.ExecutorServiceConfigurator; -import akka.dispatch.ExecutorServiceFactory; -import akka.dispatch.ForkJoinExecutorConfigurator; +import org.apache.pekko.dispatch.DispatcherPrerequisites; +import org.apache.pekko.dispatch.ExecutorServiceConfigurator; +import org.apache.pekko.dispatch.ExecutorServiceFactory; +import org.apache.pekko.dispatch.ForkJoinExecutorConfigurator; import kamon.instrumentation.executor.ExecutorInstrumentation; /** diff --git a/internal/utils/metrics/src/main/java/org/eclipse/ditto/internal/utils/metrics/executor/InstrumentedThreadPoolExecutorServiceConfigurator.java b/internal/utils/metrics/src/main/java/org/eclipse/ditto/internal/utils/metrics/executor/InstrumentedThreadPoolExecutorServiceConfigurator.java index 200e197336..47467e4b08 100644 --- a/internal/utils/metrics/src/main/java/org/eclipse/ditto/internal/utils/metrics/executor/InstrumentedThreadPoolExecutorServiceConfigurator.java +++ b/internal/utils/metrics/src/main/java/org/eclipse/ditto/internal/utils/metrics/executor/InstrumentedThreadPoolExecutorServiceConfigurator.java @@ -16,10 +16,10 @@ import com.typesafe.config.Config; -import akka.dispatch.DispatcherPrerequisites; -import akka.dispatch.ExecutorServiceConfigurator; -import akka.dispatch.ExecutorServiceFactory; -import akka.dispatch.ThreadPoolExecutorConfigurator; +import org.apache.pekko.dispatch.DispatcherPrerequisites; +import org.apache.pekko.dispatch.ExecutorServiceConfigurator; +import org.apache.pekko.dispatch.ExecutorServiceFactory; +import org.apache.pekko.dispatch.ThreadPoolExecutorConfigurator; import kamon.instrumentation.executor.ExecutorInstrumentation; /** diff --git a/internal/utils/metrics/src/main/java/org/eclipse/ditto/internal/utils/metrics/mongo/MongoMetricsBuilder.java b/internal/utils/metrics/src/main/java/org/eclipse/ditto/internal/utils/metrics/mongo/MongoMetricsBuilder.java index d1ed55d368..1b236b3ae0 100644 --- a/internal/utils/metrics/src/main/java/org/eclipse/ditto/internal/utils/metrics/mongo/MongoMetricsBuilder.java +++ b/internal/utils/metrics/src/main/java/org/eclipse/ditto/internal/utils/metrics/mongo/MongoMetricsBuilder.java @@ -19,12 +19,12 @@ import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; import org.eclipse.ditto.internal.utils.metrics.instruments.timer.StartedTimer; -import akka.contrib.persistence.mongodb.MetricsBuilder; -import akka.contrib.persistence.mongodb.MongoHistogram; -import akka.contrib.persistence.mongodb.MongoTimer; +import pekko.contrib.persistence.mongodb.MetricsBuilder; +import pekko.contrib.persistence.mongodb.MongoHistogram; +import pekko.contrib.persistence.mongodb.MongoTimer; /** - * An akka-persistence-mongodb {@link MetricsBuilder} which uses {@link DittoMetrics} in order to provide timers and + * An pekko-persistence-mongodb {@link MetricsBuilder} which uses {@link DittoMetrics} in order to provide timers and * histograms. */ @Immutable diff --git a/internal/utils/metrics/src/main/java/org/eclipse/ditto/internal/utils/metrics/prometheus/PrometheusReporterRoute.java b/internal/utils/metrics/src/main/java/org/eclipse/ditto/internal/utils/metrics/prometheus/PrometheusReporterRoute.java index 3e98adbc14..bb8163089c 100644 --- a/internal/utils/metrics/src/main/java/org/eclipse/ditto/internal/utils/metrics/prometheus/PrometheusReporterRoute.java +++ b/internal/utils/metrics/src/main/java/org/eclipse/ditto/internal/utils/metrics/prometheus/PrometheusReporterRoute.java @@ -12,15 +12,15 @@ */ package org.eclipse.ditto.internal.utils.metrics.prometheus; -import static akka.http.javadsl.server.Directives.complete; -import static akka.http.javadsl.server.Directives.get; +import static org.apache.pekko.http.javadsl.server.Directives.complete; +import static org.apache.pekko.http.javadsl.server.Directives.get; -import akka.http.javadsl.model.ContentType; -import akka.http.javadsl.model.ContentTypes; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.StatusCodes; -import akka.http.javadsl.server.Route; -import akka.util.ByteString; +import org.apache.pekko.http.javadsl.model.ContentType; +import org.apache.pekko.http.javadsl.model.ContentTypes; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.StatusCodes; +import org.apache.pekko.http.javadsl.server.Route; +import org.apache.pekko.util.ByteString; import kamon.prometheus.PrometheusReporter; /** diff --git a/internal/utils/metrics/src/test/resources/reference.conf b/internal/utils/metrics/src/test/resources/reference.conf index 5faa8f4772..9e19c6354e 100644 --- a/internal/utils/metrics/src/test/resources/reference.conf +++ b/internal/utils/metrics/src/test/resources/reference.conf @@ -1,6 +1,6 @@ # Defined to avoid substitution error during tests -akka.stream{ - blocking-io-dispatcher = "akka.stream.default-blocking-io-dispatcher" +pekko.stream{ + blocking-io-dispatcher = "pekko.stream.default-blocking-io-dispatcher" default-blocking-io-dispatcher { type = Dispatcher diff --git a/internal/utils/namespaces/pom.xml b/internal/utils/namespaces/pom.xml index 8baf0d3eb1..862d1208c0 100755 --- a/internal/utils/namespaces/pom.xml +++ b/internal/utils/namespaces/pom.xml @@ -27,7 +27,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko org.eclipse.ditto @@ -38,13 +38,13 @@ ditto-internal-utils-cluster - com.typesafe.akka - akka-cluster-tools_${scala.version} + org.apache.pekko + pekko-cluster-tools_${scala.version} - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test diff --git a/internal/utils/namespaces/src/main/java/org/eclipse/ditto/internal/utils/namespaces/BlockedNamespaces.java b/internal/utils/namespaces/src/main/java/org/eclipse/ditto/internal/utils/namespaces/BlockedNamespaces.java index eeb0f52b98..677d6b015e 100644 --- a/internal/utils/namespaces/src/main/java/org/eclipse/ditto/internal/utils/namespaces/BlockedNamespaces.java +++ b/internal/utils/namespaces/src/main/java/org/eclipse/ditto/internal/utils/namespaces/BlockedNamespaces.java @@ -17,14 +17,14 @@ import org.eclipse.ditto.internal.utils.ddata.DistributedData; import org.eclipse.ditto.internal.utils.ddata.DistributedDataConfig; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.cluster.Cluster; -import akka.cluster.ddata.Key; -import akka.cluster.ddata.ORSet; -import akka.cluster.ddata.ORSetKey; -import akka.cluster.ddata.Replicator; -import akka.cluster.ddata.SelfUniqueAddress; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.ddata.Key; +import org.apache.pekko.cluster.ddata.ORSet; +import org.apache.pekko.cluster.ddata.ORSetKey; +import org.apache.pekko.cluster.ddata.Replicator; +import org.apache.pekko.cluster.ddata.SelfUniqueAddress; /** * Distributed data for blocking of messages addressed entities in certain namespaces. @@ -56,7 +56,7 @@ private BlockedNamespaces(final DistributedDataConfig config, final ActorSystem } /** - * Get an instance of this distributed data with the default configuration. The provided Akka system must be a + * Get an instance of this distributed data with the default configuration. The provided Pekko system must be a * cluster member with the role {@code blocked-namespaces-aware}. * * @param system the actor system where the replicator actor will be created. diff --git a/internal/utils/namespaces/src/main/java/org/eclipse/ditto/internal/utils/namespaces/BlockedNamespacesUpdater.java b/internal/utils/namespaces/src/main/java/org/eclipse/ditto/internal/utils/namespaces/BlockedNamespacesUpdater.java index 992b807943..e2931b6e45 100644 --- a/internal/utils/namespaces/src/main/java/org/eclipse/ditto/internal/utils/namespaces/BlockedNamespacesUpdater.java +++ b/internal/utils/namespaces/src/main/java/org/eclipse/ditto/internal/utils/namespaces/BlockedNamespacesUpdater.java @@ -19,15 +19,15 @@ import org.eclipse.ditto.base.model.namespaces.signals.commands.UnblockNamespace; import org.eclipse.ditto.base.model.namespaces.signals.commands.UnblockNamespaceResponse; import org.eclipse.ditto.base.model.signals.commands.Command; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.event.DiagnosticLoggingAdapter; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Actor which updates the distributed cache of blocked namespaces. diff --git a/internal/utils/namespaces/src/test/java/org/eclipse/ditto/internal/utils/namespaces/BlockedNamespacesTest.java b/internal/utils/namespaces/src/test/java/org/eclipse/ditto/internal/utils/namespaces/BlockedNamespacesTest.java index b5853fb0f9..a423fbe16e 100644 --- a/internal/utils/namespaces/src/test/java/org/eclipse/ditto/internal/utils/namespaces/BlockedNamespacesTest.java +++ b/internal/utils/namespaces/src/test/java/org/eclipse/ditto/internal/utils/namespaces/BlockedNamespacesTest.java @@ -24,11 +24,11 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; -import akka.cluster.ddata.ORSet; -import akka.cluster.ddata.Replicator; -import akka.stream.Attributes; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.cluster.ddata.ORSet; +import org.apache.pekko.cluster.ddata.Replicator; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Unit test for {@link BlockedNamespaces}. diff --git a/internal/utils/namespaces/src/test/resources/test.conf b/internal/utils/namespaces/src/test/resources/test.conf index 37d89e1f4f..ee38f10b65 100644 --- a/internal/utils/namespaces/src/test/resources/test.conf +++ b/internal/utils/namespaces/src/test/resources/test.conf @@ -1,4 +1,4 @@ -akka { +pekko { actor.provider = "cluster" cluster.roles = ["blocked-namespaces-aware"] diff --git a/internal/utils/akka/pom.xml b/internal/utils/pekko/pom.xml similarity index 83% rename from internal/utils/akka/pom.xml rename to internal/utils/pekko/pom.xml index 602798e219..875df7a1cc 100755 --- a/internal/utils/akka/pom.xml +++ b/internal/utils/pekko/pom.xml @@ -21,8 +21,8 @@ ${revision} - ditto-internal-utils-akka - Eclipse Ditto :: Internal :: Utils :: Akka + ditto-internal-utils-pekko + Eclipse Ditto :: Internal :: Utils :: Pekko @@ -43,18 +43,18 @@ - com.typesafe.akka - akka-actor_${scala.version} + org.apache.pekko + pekko-actor_${scala.version} - com.typesafe.akka - akka-persistence_${scala.version} + org.apache.pekko + pekko-persistence_${scala.version} provided - com.typesafe.akka - akka-stream_${scala.version} + org.apache.pekko + pekko-stream_${scala.version} @@ -66,13 +66,13 @@ ditto-internal-models-streaming - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test - com.typesafe.akka - akka-stream-testkit_${scala.version} + org.apache.pekko + pekko-stream-testkit_${scala.version} test @@ -127,9 +127,9 @@ maven-javadoc-plugin - org.eclipse.ditto.internal.utils.akka.logging; - org.eclipse.ditto.internal.utils.akka.controlflow; - org.eclipse.ditto.internal.utils.akka.actors + org.eclipse.ditto.internal.utils.pekko.logging; + org.eclipse.ditto.internal.utils.pekko.controlflow; + org.eclipse.ditto.internal.utils.pekko.actors @@ -144,7 +144,7 @@ - org/eclipse/ditto/internal/utils/akka/* + org/eclipse/ditto/internal/utils/pekko/* diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/PingCommand.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/PingCommand.java similarity index 99% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/PingCommand.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/PingCommand.java index 9ae9977890..acafb55110 100755 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/PingCommand.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/PingCommand.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka; +package org.eclipse.ditto.internal.utils.pekko; import java.util.Objects; import java.util.Optional; diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/PingCommandResponse.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/PingCommandResponse.java similarity index 99% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/PingCommandResponse.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/PingCommandResponse.java index eaac8dc8e4..88348f102f 100755 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/PingCommandResponse.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/PingCommandResponse.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka; +package org.eclipse.ditto.internal.utils.pekko; import java.util.Objects; import java.util.Optional; diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/SimpleCommand.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/SimpleCommand.java similarity index 99% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/SimpleCommand.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/SimpleCommand.java index bd7c33c203..61336afee9 100755 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/SimpleCommand.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/SimpleCommand.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka; +package org.eclipse.ditto.internal.utils.pekko; import java.util.Objects; import java.util.Optional; diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/SimpleCommandResponse.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/SimpleCommandResponse.java similarity index 99% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/SimpleCommandResponse.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/SimpleCommandResponse.java index d40c81a6a9..12fac9afd1 100755 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/SimpleCommandResponse.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/SimpleCommandResponse.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka; +package org.eclipse.ditto.internal.utils.pekko; import java.util.Objects; import java.util.Optional; diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/AbstractActorWithLock.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/AbstractActorWithLock.java similarity index 95% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/AbstractActorWithLock.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/AbstractActorWithLock.java index 6874ed3b82..fd33e98627 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/AbstractActorWithLock.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/AbstractActorWithLock.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.actors; +package org.eclipse.ditto.internal.utils.pekko.actors; import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull; @@ -18,9 +18,9 @@ import javax.annotation.Nullable; -import akka.actor.ActorRef; -import akka.actor.Cancellable; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Cancellable; +import org.apache.pekko.japi.pf.ReceiveBuilder; import scala.PartialFunction; /** diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/AbstractActorWithShutdownBehavior.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/AbstractActorWithShutdownBehavior.java similarity index 94% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/AbstractActorWithShutdownBehavior.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/AbstractActorWithShutdownBehavior.java index 3e148cd3b2..e127724a6b 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/AbstractActorWithShutdownBehavior.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/AbstractActorWithShutdownBehavior.java @@ -10,14 +10,14 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.actors; +package org.eclipse.ditto.internal.utils.pekko.actors; import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull; import java.time.Duration; -import akka.actor.AbstractActor; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.japi.pf.ReceiveBuilder; import scala.PartialFunction; /** diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/AbstractActorWithShutdownBehaviorAndRequestCounting.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/AbstractActorWithShutdownBehaviorAndRequestCounting.java similarity index 91% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/AbstractActorWithShutdownBehaviorAndRequestCounting.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/AbstractActorWithShutdownBehaviorAndRequestCounting.java index 434ca40dd9..f081d25a80 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/AbstractActorWithShutdownBehaviorAndRequestCounting.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/AbstractActorWithShutdownBehaviorAndRequestCounting.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.actors; +package org.eclipse.ditto.internal.utils.pekko.actors; import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull; @@ -18,12 +18,12 @@ import javax.annotation.Nullable; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; -import akka.Done; -import akka.actor.ActorRef; -import akka.event.DiagnosticLoggingAdapter; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.Done; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.japi.pf.ReceiveBuilder; import scala.PartialFunction; /** diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/ModifyConfigBehavior.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/ModifyConfigBehavior.java similarity index 90% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/ModifyConfigBehavior.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/ModifyConfigBehavior.java index 205792daf2..e2afda13fc 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/ModifyConfigBehavior.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/ModifyConfigBehavior.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.actors; +package org.eclipse.ditto.internal.utils.pekko.actors; import org.eclipse.ditto.base.api.common.ModifyConfig; import org.eclipse.ditto.base.api.common.ModifyConfigResponse; @@ -20,9 +20,9 @@ import com.typesafe.config.ConfigFactory; import com.typesafe.config.ConfigRenderOptions; -import akka.actor.AbstractActor; -import akka.actor.Actor; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.Actor; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Behavior to modify this actor's config. diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/RetrieveConfigBehavior.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/RetrieveConfigBehavior.java similarity index 93% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/RetrieveConfigBehavior.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/RetrieveConfigBehavior.java index 47dd1805c4..c2628c7625 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/RetrieveConfigBehavior.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/RetrieveConfigBehavior.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.actors; +package org.eclipse.ditto.internal.utils.pekko.actors; import org.eclipse.ditto.json.JsonFactory; import org.eclipse.ditto.json.JsonObject; @@ -25,9 +25,9 @@ import com.typesafe.config.ConfigRenderOptions; import com.typesafe.config.ConfigValue; -import akka.actor.AbstractActor; -import akka.actor.Actor; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.Actor; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Behavior to respond to {@code RetrieveConfig}. diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/package-info.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/package-info.java similarity index 90% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/package-info.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/package-info.java index 0645ef054f..03dadb27a7 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/actors/package-info.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/actors/package-info.java @@ -15,4 +15,4 @@ * Common actor behaviors. */ @org.eclipse.ditto.utils.jsr305.annotations.AllParametersAndReturnValuesAreNonnullByDefault -package org.eclipse.ditto.internal.utils.akka.actors; +package org.eclipse.ditto.internal.utils.pekko.actors; diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/AbstractDittoGraphStageLogic.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/AbstractDittoGraphStageLogic.java similarity index 88% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/AbstractDittoGraphStageLogic.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/AbstractDittoGraphStageLogic.java index a206ccb35b..14a4c85e55 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/AbstractDittoGraphStageLogic.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/AbstractDittoGraphStageLogic.java @@ -10,19 +10,19 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.controlflow; +package org.eclipse.ditto.internal.utils.pekko.controlflow; import java.util.function.Function; -import akka.japi.function.Effect; -import akka.stream.Inlet; -import akka.stream.Outlet; -import akka.stream.Shape; -import akka.stream.stage.AbstractInHandler; -import akka.stream.stage.GraphStageLogicWithLogging; +import org.apache.pekko.japi.function.Effect; +import org.apache.pekko.stream.Inlet; +import org.apache.pekko.stream.Outlet; +import org.apache.pekko.stream.Shape; +import org.apache.pekko.stream.stage.AbstractInHandler; +import org.apache.pekko.stream.stage.GraphStageLogicWithLogging; /** - * Extension of {@code akka.stream.stage.GraphStageLogic} with Ditto-specific functions. + * Extension of {@link org.apache.pekko.stream.stage.GraphStageLogic} with Ditto-specific functions. * * @since 1.1.0 */ diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/AbstractGraphActor.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/AbstractGraphActor.java similarity index 91% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/AbstractGraphActor.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/AbstractGraphActor.java index 1f36fd0d55..53c3146441 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/AbstractGraphActor.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/AbstractGraphActor.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.controlflow; +package org.eclipse.ditto.internal.utils.pekko.controlflow; import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull; @@ -22,29 +22,29 @@ import org.eclipse.ditto.base.model.exceptions.DittoInternalErrorException; import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; import org.eclipse.ditto.base.model.headers.WithDittoHeaders; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; import org.eclipse.ditto.internal.utils.metrics.instruments.counter.Counter; import org.eclipse.ditto.internal.utils.metrics.instruments.tag.Tag; import org.eclipse.ditto.internal.utils.metrics.instruments.tag.TagSet; -import akka.actor.AbstractActor; -import akka.japi.pf.ReceiveBuilder; -import akka.stream.ActorAttributes; -import akka.stream.Attributes; -import akka.stream.Materializer; -import akka.stream.OverflowStrategy; -import akka.stream.QueueOfferResult; -import akka.stream.Supervision; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.SourceQueue; -import akka.stream.javadsl.SourceQueueWithComplete; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.stream.ActorAttributes; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.OverflowStrategy; +import org.apache.pekko.stream.QueueOfferResult; +import org.apache.pekko.stream.Supervision; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.SourceQueue; +import org.apache.pekko.stream.javadsl.SourceQueueWithComplete; /** - * Actor whose behavior is defined entirely by an Akka stream graph. + * Actor whose behavior is defined entirely by an Pekko stream graph. * * @param the type of the messages this actor processes in the stream graph. * @param the type of the incoming messages which is translated to a message of type {@code } in diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/Consume.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/Consume.java similarity index 87% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/Consume.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/Consume.java index 8ebce6fd8a..678f47f507 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/Consume.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/Consume.java @@ -10,21 +10,21 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.controlflow; +package org.eclipse.ditto.internal.utils.pekko.controlflow; import java.util.function.BiConsumer; import java.util.function.Consumer; import org.eclipse.ditto.base.model.headers.WithDittoHeaders; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.stream.Graph; -import akka.stream.SinkShape; -import akka.stream.javadsl.Sink; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.stream.Graph; +import org.apache.pekko.stream.SinkShape; +import org.apache.pekko.stream.javadsl.Sink; /** - * An Akka stream sink from a consumer of messages with sender. + * An Pekko stream sink from a consumer of messages with sender. */ public final class Consume { diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/ControlFlowFactory.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/ControlFlowFactory.java similarity index 91% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/ControlFlowFactory.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/ControlFlowFactory.java index 577d59d3cb..ab6e35c9bd 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/ControlFlowFactory.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/ControlFlowFactory.java @@ -10,11 +10,11 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.controlflow; +package org.eclipse.ditto.internal.utils.pekko.controlflow; import org.eclipse.ditto.base.model.headers.WithDittoHeaders; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Factory for building "controlflow" objects. diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/Filter.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/Filter.java similarity index 91% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/Filter.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/Filter.java index 9bd471fecc..cd1107b9fb 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/Filter.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/Filter.java @@ -10,19 +10,19 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.controlflow; +package org.eclipse.ditto.internal.utils.pekko.controlflow; import java.util.Optional; import java.util.function.Function; -import akka.NotUsed; -import akka.stream.FanOutShape2; -import akka.stream.FlowShape; -import akka.stream.Graph; -import akka.stream.UniformFanOutShape; -import akka.stream.javadsl.Broadcast; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.GraphDSL; +import org.apache.pekko.NotUsed; +import org.apache.pekko.stream.FanOutShape2; +import org.apache.pekko.stream.FlowShape; +import org.apache.pekko.stream.Graph; +import org.apache.pekko.stream.UniformFanOutShape; +import org.apache.pekko.stream.javadsl.Broadcast; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.GraphDSL; import scala.util.Either; import scala.util.Left; import scala.util.Right; diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/ImmutableWithSender.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/ImmutableWithSender.java similarity index 94% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/ImmutableWithSender.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/ImmutableWithSender.java index 3a2b8d72ff..1c29238909 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/ImmutableWithSender.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/ImmutableWithSender.java @@ -10,13 +10,13 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.controlflow; +package org.eclipse.ditto.internal.utils.pekko.controlflow; import java.util.Objects; import javax.annotation.concurrent.Immutable; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Immutable implementation of {@link WithSender}. diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/LazyZip.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/LazyZip.java similarity index 83% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/LazyZip.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/LazyZip.java index 0ba3239c26..303e66b0e7 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/LazyZip.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/LazyZip.java @@ -10,18 +10,18 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.controlflow; - -import akka.japi.Pair; -import akka.stream.Attributes; -import akka.stream.FanInShape2; -import akka.stream.Inlet; -import akka.stream.Outlet; -import akka.stream.Shape; -import akka.stream.stage.AbstractInHandler; -import akka.stream.stage.AbstractOutHandler; -import akka.stream.stage.GraphStage; -import akka.stream.stage.GraphStageLogic; +package org.eclipse.ditto.internal.utils.pekko.controlflow; + +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.stream.FanInShape2; +import org.apache.pekko.stream.Inlet; +import org.apache.pekko.stream.Outlet; +import org.apache.pekko.stream.Shape; +import org.apache.pekko.stream.stage.AbstractInHandler; +import org.apache.pekko.stream.stage.AbstractOutHandler; +import org.apache.pekko.stream.stage.GraphStage; +import org.apache.pekko.stream.stage.GraphStageLogic; /** * A copy of {@code Zip} that is lazy in the second inlet. diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/LimitRateByRejection.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/LimitRateByRejection.java similarity index 89% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/LimitRateByRejection.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/LimitRateByRejection.java index 02564bd9f4..50a0a13ea3 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/LimitRateByRejection.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/LimitRateByRejection.java @@ -10,17 +10,17 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.controlflow; +package org.eclipse.ditto.internal.utils.pekko.controlflow; import java.time.Duration; import java.util.Collections; import java.util.function.Function; -import akka.NotUsed; -import akka.japi.function.Creator; -import akka.stream.FanOutShape2; -import akka.stream.Graph; -import akka.stream.javadsl.Flow; +import org.apache.pekko.NotUsed; +import org.apache.pekko.japi.function.Creator; +import org.apache.pekko.stream.FanOutShape2; +import org.apache.pekko.stream.Graph; +import org.apache.pekko.stream.javadsl.Flow; import scala.util.Either; import scala.util.Left; import scala.util.Right; @@ -74,7 +74,7 @@ public static Graph, NotUsed> of( ); } - private static final class Logic implements akka.japi.function.Function>> { + private static final class Logic implements org.apache.pekko.japi.function.Function>> { private final long windowSizeMillis; private final int maxElements; @@ -92,7 +92,7 @@ private Logic(final long windowSizeMillis, final int maxElements, enabled = maxElements > 0 && windowSizeMillis > 0; } - private static Creator>>> creator( + private static Creator>>> creator( final Duration timeWindow, final int maxElements, final Function errorReporter) { final long timeWindowMillis = timeWindow.toMillis(); diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/MergeSortedAsPair.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/MergeSortedAsPair.java similarity index 94% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/MergeSortedAsPair.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/MergeSortedAsPair.java index 5b00dfb5a4..f109be5c92 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/MergeSortedAsPair.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/MergeSortedAsPair.java @@ -10,23 +10,23 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.controlflow; +package org.eclipse.ditto.internal.utils.pekko.controlflow; import java.util.Comparator; import java.util.List; -import akka.NotUsed; -import akka.japi.Pair; -import akka.stream.Attributes; -import akka.stream.FanInShape2; -import akka.stream.Graph; -import akka.stream.Inlet; -import akka.stream.Outlet; -import akka.stream.SourceShape; -import akka.stream.javadsl.GraphDSL; -import akka.stream.javadsl.Source; -import akka.stream.stage.GraphStage; -import akka.stream.stage.GraphStageLogic; +import org.apache.pekko.NotUsed; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.stream.FanInShape2; +import org.apache.pekko.stream.Graph; +import org.apache.pekko.stream.Inlet; +import org.apache.pekko.stream.Outlet; +import org.apache.pekko.stream.SourceShape; +import org.apache.pekko.stream.javadsl.GraphDSL; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.stage.GraphStage; +import org.apache.pekko.stream.stage.GraphStageLogic; /** * Performs a merge on 2 sorted streams but instead of delivering the sort result, delivers the tuple before @@ -34,7 +34,7 @@ *

          * Behavior definition: *

          {@code
          - * akka.stream.scaladsl.MergeSorted
          + * org.apache.pekko.stream.scaladsl.MergeSorted
            * }
          * is behaviorally equivalent as stream component with *
          {@code
          @@ -173,7 +173,7 @@ public FanInShape2> shape() {
           
               /**
                * GraphStageLogic for MergeSortedAsPair.
          -     * Adapted from {@code akka.stream.scaladsl.MergeSorted}.
          +     * Adapted from {@code org.apache.pekko.stream.scaladsl.MergeSorted}.
                */
               private final class MergeSortAsPairLogic extends AbstractDittoGraphStageLogic {
           
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/Pipe.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/Pipe.java
          similarity index 90%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/Pipe.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/Pipe.java
          index 836b99c681..45758e663f 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/Pipe.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/Pipe.java
          @@ -10,20 +10,20 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.controlflow;
          +package org.eclipse.ditto.internal.utils.pekko.controlflow;
           
           import java.util.Collection;
           
          -import akka.NotUsed;
          -import akka.stream.FanOutShape2;
          -import akka.stream.FlowShape;
          -import akka.stream.Graph;
          -import akka.stream.SinkShape;
          -import akka.stream.javadsl.Flow;
          -import akka.stream.javadsl.GraphDSL;
          +import org.apache.pekko.NotUsed;
          +import org.apache.pekko.stream.FanOutShape2;
          +import org.apache.pekko.stream.FlowShape;
          +import org.apache.pekko.stream.Graph;
          +import org.apache.pekko.stream.SinkShape;
          +import org.apache.pekko.stream.javadsl.Flow;
          +import org.apache.pekko.stream.javadsl.GraphDSL;
           
           /**
          - * Combinators to join Akka stream processors.
          + * Combinators to join Pekko stream processors.
            */
           public final class Pipe {
           
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/ResumeSource.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/ResumeSource.java
          similarity index 93%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/ResumeSource.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/ResumeSource.java
          index ae13fa2f27..ff69e34fee 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/ResumeSource.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/ResumeSource.java
          @@ -10,12 +10,12 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.controlflow;
          +package org.eclipse.ditto.internal.utils.pekko.controlflow;
           
          -import static akka.stream.Attributes.logLevelDebug;
          -import static akka.stream.Attributes.logLevelInfo;
          -import static akka.stream.Attributes.logLevelWarning;
          -import static akka.stream.Attributes.logLevels;
          +import static org.apache.pekko.stream.Attributes.logLevelDebug;
          +import static org.apache.pekko.stream.Attributes.logLevelInfo;
          +import static org.apache.pekko.stream.Attributes.logLevelWarning;
          +import static org.apache.pekko.stream.Attributes.logLevels;
           
           import java.time.Duration;
           import java.time.Instant;
          @@ -26,25 +26,25 @@
           import java.util.Optional;
           import java.util.function.Function;
           
          -import akka.NotUsed;
          -import akka.japi.Pair;
          -import akka.japi.pf.PFBuilder;
          -import akka.stream.Attributes;
          -import akka.stream.FanOutShape2;
          -import akka.stream.FlowShape;
          -import akka.stream.Graph;
          -import akka.stream.Inlet;
          -import akka.stream.Outlet;
          -import akka.stream.OverflowStrategy;
          -import akka.stream.SourceShape;
          -import akka.stream.StreamLimitReachedException;
          -import akka.stream.javadsl.Flow;
          -import akka.stream.javadsl.GraphDSL;
          -import akka.stream.javadsl.Source;
          -import akka.stream.stage.AbstractInHandler;
          -import akka.stream.stage.AbstractOutHandler;
          -import akka.stream.stage.GraphStage;
          -import akka.stream.stage.GraphStageLogic;
          +import org.apache.pekko.NotUsed;
          +import org.apache.pekko.japi.Pair;
          +import org.apache.pekko.japi.pf.PFBuilder;
          +import org.apache.pekko.stream.Attributes;
          +import org.apache.pekko.stream.FanOutShape2;
          +import org.apache.pekko.stream.FlowShape;
          +import org.apache.pekko.stream.Graph;
          +import org.apache.pekko.stream.Inlet;
          +import org.apache.pekko.stream.Outlet;
          +import org.apache.pekko.stream.OverflowStrategy;
          +import org.apache.pekko.stream.SourceShape;
          +import org.apache.pekko.stream.StreamLimitReachedException;
          +import org.apache.pekko.stream.javadsl.Flow;
          +import org.apache.pekko.stream.javadsl.GraphDSL;
          +import org.apache.pekko.stream.javadsl.Source;
          +import org.apache.pekko.stream.stage.AbstractInHandler;
          +import org.apache.pekko.stream.stage.AbstractOutHandler;
          +import org.apache.pekko.stream.stage.GraphStage;
          +import org.apache.pekko.stream.stage.GraphStageLogic;
           import scala.util.Either;
           import scala.util.Left;
           import scala.util.Right;
          @@ -420,7 +420,7 @@ public String toString() {
                * @param  type of errors.
                */
               private static final class StatefulBackoffFunction
          -            implements akka.japi.function.Function>> {
          +            implements org.apache.pekko.japi.function.Function>> {
           
                   private final Duration minBackoff;
                   private final Duration maxBackoff;
          @@ -465,7 +465,7 @@ public Iterable> apply(final E element) {
                * @param  Type of elements.
                */
               private static final class StatefulLookBehindFunction implements
          -            akka.japi.function.Function, Iterable, E>>> {
          +            org.apache.pekko.japi.function.Function, Iterable, E>>> {
           
                   private final int lookBehind;
                   private final ArrayDeque finalElements;
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/ResumeSourceBuilder.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/ResumeSourceBuilder.java
          similarity index 97%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/ResumeSourceBuilder.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/ResumeSourceBuilder.java
          index 6bee593762..590a4635a8 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/ResumeSourceBuilder.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/ResumeSourceBuilder.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.controlflow;
          +package org.eclipse.ditto.internal.utils.pekko.controlflow;
           
           import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull;
           
          @@ -19,8 +19,8 @@
           import java.util.Optional;
           import java.util.function.Function;
           
          -import akka.NotUsed;
          -import akka.stream.javadsl.Source;
          +import org.apache.pekko.NotUsed;
          +import org.apache.pekko.stream.javadsl.Source;
           
           /**
            * Builder of the resume source.
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/TimeoutFlow.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/TimeoutFlow.java
          similarity index 87%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/TimeoutFlow.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/TimeoutFlow.java
          index c12f2ab067..272657b263 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/TimeoutFlow.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/TimeoutFlow.java
          @@ -10,21 +10,21 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.controlflow;
          +package org.eclipse.ditto.internal.utils.pekko.controlflow;
           
           import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull;
           
           import java.time.Duration;
           
          -import akka.NotUsed;
          -import akka.japi.function.Function;
          -import akka.stream.FlowShape;
          -import akka.stream.SourceShape;
          -import akka.stream.UniformFanInShape;
          -import akka.stream.javadsl.Flow;
          -import akka.stream.javadsl.GraphDSL;
          -import akka.stream.javadsl.Merge;
          -import akka.stream.javadsl.Source;
          +import org.apache.pekko.NotUsed;
          +import org.apache.pekko.japi.function.Function;
          +import org.apache.pekko.stream.FlowShape;
          +import org.apache.pekko.stream.SourceShape;
          +import org.apache.pekko.stream.UniformFanInShape;
          +import org.apache.pekko.stream.javadsl.Flow;
          +import org.apache.pekko.stream.javadsl.GraphDSL;
          +import org.apache.pekko.stream.javadsl.Merge;
          +import org.apache.pekko.stream.javadsl.Source;
           
           /**
            * Factory to create flows that emit a timeout element if it took longer than the given timeout to process an input
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/Transistor.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/Transistor.java
          similarity index 90%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/Transistor.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/Transistor.java
          index 6bf06416ed..5933fba2f9 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/Transistor.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/Transistor.java
          @@ -10,20 +10,20 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.controlflow;
          +package org.eclipse.ditto.internal.utils.pekko.controlflow;
           
           import java.util.LinkedList;
           import java.util.Queue;
           
          -import akka.stream.Attributes;
          -import akka.stream.FanInShape2;
          -import akka.stream.Inlet;
          -import akka.stream.Outlet;
          -import akka.stream.stage.AbstractInHandler;
          -import akka.stream.stage.AbstractOutHandler;
          -import akka.stream.stage.GraphStage;
          -import akka.stream.stage.GraphStageLogic;
          -import akka.stream.stage.GraphStageLogicWithLogging;
          +import org.apache.pekko.stream.Attributes;
          +import org.apache.pekko.stream.FanInShape2;
          +import org.apache.pekko.stream.Inlet;
          +import org.apache.pekko.stream.Outlet;
          +import org.apache.pekko.stream.stage.AbstractInHandler;
          +import org.apache.pekko.stream.stage.AbstractOutHandler;
          +import org.apache.pekko.stream.stage.GraphStage;
          +import org.apache.pekko.stream.stage.GraphStageLogic;
          +import org.apache.pekko.stream.stage.GraphStageLogicWithLogging;
           
           /**
            * Flow of elements regulated by credits arriving at a side channel.
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/WithSender.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/WithSender.java
          similarity index 92%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/WithSender.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/WithSender.java
          index 548bd66a23..0f344c1019 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/WithSender.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/WithSender.java
          @@ -10,11 +10,11 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.controlflow;
          +package org.eclipse.ditto.internal.utils.pekko.controlflow;
           
           import org.eclipse.ditto.base.model.headers.WithDittoHeaders;
           
          -import akka.actor.ActorRef;
          +import org.apache.pekko.actor.ActorRef;
           
           /**
            * A message packed together with sender.
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/package-info.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/package-info.java
          similarity index 77%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/package-info.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/package-info.java
          index bad03121b3..2f3ef9799a 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/controlflow/package-info.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/controlflow/package-info.java
          @@ -12,7 +12,7 @@
            */
           
           /**
          - * Encode control flow as data flow through akka streams for modular actor decomposition.
          + * Encode control flow as data flow through pekko streams for modular actor decomposition.
            */
           @org.eclipse.ditto.utils.jsr305.annotations.AllParametersAndReturnValuesAreNonnullByDefault
          -package org.eclipse.ditto.internal.utils.akka.controlflow;
          +package org.eclipse.ditto.internal.utils.pekko.controlflow;
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/AutoCloseableSlf4jLogger.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/AutoCloseableSlf4jLogger.java
          similarity index 98%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/AutoCloseableSlf4jLogger.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/AutoCloseableSlf4jLogger.java
          index b297137ece..a4ee4c1645 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/AutoCloseableSlf4jLogger.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/AutoCloseableSlf4jLogger.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
           
           import javax.annotation.Nullable;
           import javax.annotation.concurrent.NotThreadSafe;
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/AutoClosingSlf4jLogger.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/AutoClosingSlf4jLogger.java
          similarity index 99%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/AutoClosingSlf4jLogger.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/AutoClosingSlf4jLogger.java
          index 065239fd52..f490a67350 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/AutoClosingSlf4jLogger.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/AutoClosingSlf4jLogger.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
           
           import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull;
           
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/AutoDiscardingDiagnosticLoggingAdapter.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/AutoDiscardingDiagnosticLoggingAdapter.java
          similarity index 98%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/AutoDiscardingDiagnosticLoggingAdapter.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/AutoDiscardingDiagnosticLoggingAdapter.java
          index 1eac151240..02ed959c4e 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/AutoDiscardingDiagnosticLoggingAdapter.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/AutoDiscardingDiagnosticLoggingAdapter.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
           
           import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull;
           
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/CommonMdcEntryKey.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/CommonMdcEntryKey.java
          similarity index 95%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/CommonMdcEntryKey.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/CommonMdcEntryKey.java
          index 1773c11359..b4597a5924 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/CommonMdcEntryKey.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/CommonMdcEntryKey.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
           
           /**
            * An enumeration of commonly known MDC entry keys.
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultAutoCloseableSlf4jLogger.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultAutoCloseableSlf4jLogger.java
          similarity index 99%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultAutoCloseableSlf4jLogger.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultAutoCloseableSlf4jLogger.java
          index 887864a056..8fd7095605 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultAutoCloseableSlf4jLogger.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultAutoCloseableSlf4jLogger.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
           
           import static org.eclipse.ditto.base.model.common.ConditionChecker.argumentNotEmpty;
           import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull;
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDiagnosticLoggingAdapter.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDiagnosticLoggingAdapter.java
          similarity index 98%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDiagnosticLoggingAdapter.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDiagnosticLoggingAdapter.java
          index ef1d6c8805..45132b969d 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDiagnosticLoggingAdapter.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDiagnosticLoggingAdapter.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
           
           import static org.eclipse.ditto.base.model.common.ConditionChecker.argumentNotEmpty;
           import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull;
          @@ -22,7 +22,7 @@
           import javax.annotation.Nullable;
           import javax.annotation.concurrent.NotThreadSafe;
           
          -import akka.event.DiagnosticLoggingAdapter;
          +import org.apache.pekko.event.DiagnosticLoggingAdapter;
           
           /**
            * Wraps and delegates to a {@link DiagnosticLoggingAdapter}.
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDittoDiagnosticLoggingAdapter.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDittoDiagnosticLoggingAdapter.java
          similarity index 98%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDittoDiagnosticLoggingAdapter.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDittoDiagnosticLoggingAdapter.java
          index 7e9f707e15..d38376690a 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDittoDiagnosticLoggingAdapter.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDittoDiagnosticLoggingAdapter.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
           
           import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull;
           
          @@ -23,7 +23,7 @@
           import org.eclipse.ditto.base.model.headers.DittoHeaders;
           import org.eclipse.ditto.base.model.headers.WithDittoHeaders;
           
          -import akka.event.DiagnosticLoggingAdapter;
          +import org.apache.pekko.event.DiagnosticLoggingAdapter;
           import scala.collection.JavaConverters;
           import scala.collection.immutable.Seq;
           
          @@ -49,7 +49,7 @@ private DefaultDittoDiagnosticLoggingAdapter(final AbstractDiagnosticLoggingAdap
               /**
                * Returns an instance of the default Ditto DiagnosticLoggingAdapter.
                *
          -     * @param diagnosticLoggingAdapter the Akka DiagnosticLoggingAdapter which performs the actual logging.
          +     * @param diagnosticLoggingAdapter the Pekko DiagnosticLoggingAdapter which performs the actual logging.
                * @param loggerName the name of the returned logger.
                * @return the instance.
                * @throws NullPointerException if any argument is {@code null}.
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDittoLogger.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDittoLogger.java
          similarity index 99%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDittoLogger.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDittoLogger.java
          index 8a6fff494b..86e9461372 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDittoLogger.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDittoLogger.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
           
           import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull;
           
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultMdcEntry.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultMdcEntry.java
          similarity index 97%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultMdcEntry.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultMdcEntry.java
          index 249d0f4193..fdfaf83862 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultMdcEntry.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultMdcEntry.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
           
           import static org.eclipse.ditto.base.model.common.ConditionChecker.argumentNotEmpty;
           
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DittoLogger.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DittoLogger.java
          similarity index 99%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DittoLogger.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DittoLogger.java
          index ef1f97088b..12ec9a5d23 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DittoLogger.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DittoLogger.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
           
           import javax.annotation.Nullable;
           import javax.annotation.concurrent.NotThreadSafe;
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DittoLoggerFactory.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DittoLoggerFactory.java
          similarity index 91%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DittoLoggerFactory.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DittoLoggerFactory.java
          index 15ede4a8ef..89fa58baaf 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/DittoLoggerFactory.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/DittoLoggerFactory.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
           
           import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull;
           
          @@ -20,18 +20,18 @@
           
           import org.slf4j.LoggerFactory;
           
          -import akka.actor.Actor;
          -import akka.actor.ActorContext;
          -import akka.actor.ExtendedActorSystem;
          -import akka.actor.Props;
          -import akka.event.DiagnosticLoggingAdapter;
          -import akka.event.EventStream;
          -import akka.event.LogSource;
          -import akka.event.Logging;
          -import akka.event.LoggingFilter;
          +import org.apache.pekko.actor.Actor;
          +import org.apache.pekko.actor.ActorContext;
          +import org.apache.pekko.actor.ExtendedActorSystem;
          +import org.apache.pekko.actor.Props;
          +import org.apache.pekko.event.DiagnosticLoggingAdapter;
          +import org.apache.pekko.event.EventStream;
          +import org.apache.pekko.event.LogSource;
          +import org.apache.pekko.event.Logging;
          +import org.apache.pekko.event.LoggingFilter;
           
           /**
          - * Factory for obtaining instances of {@link DittoLogger} and {@link akka.event.LoggingAdapter}.
          + * Factory for obtaining instances of {@link DittoLogger} and {@link org.apache.pekko.event.LoggingAdapter}.
            */
           @Immutable
           public final class DittoLoggerFactory {
          @@ -128,7 +128,7 @@ private static String getActorClassName(final Actor logSource) {
               }
           
               /**
          -     * Returns a thread-safe {@link akka.event.LoggingAdapter} with MDC support for the given actor.
          +     * Returns a thread-safe {@link org.apache.pekko.event.LoggingAdapter} with MDC support for the given actor.
                *
                * @param actor the Actor used as logSource
                * @return the thread-safe logging adapter.
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/ImmutableDittoLogger.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/ImmutableDittoLogger.java
          similarity index 99%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/ImmutableDittoLogger.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/ImmutableDittoLogger.java
          index 61f99b3a5a..631519a006 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/ImmutableDittoLogger.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/ImmutableDittoLogger.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
           
           import static org.eclipse.ditto.base.model.common.ConditionChecker.argumentNotEmpty;
           import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull;
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/ImmutableDittoLoggingAdapter.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/ImmutableDittoLoggingAdapter.java
          similarity index 98%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/ImmutableDittoLoggingAdapter.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/ImmutableDittoLoggingAdapter.java
          index e7862b571e..d68b07fd14 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/ImmutableDittoLoggingAdapter.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/ImmutableDittoLoggingAdapter.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
           
           import static org.eclipse.ditto.base.model.common.ConditionChecker.argumentNotEmpty;
           import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull;
          @@ -25,7 +25,7 @@
           import org.eclipse.ditto.base.model.headers.DittoHeaders;
           import org.eclipse.ditto.base.model.headers.WithDittoHeaders;
           
          -import akka.event.DiagnosticLoggingAdapter;
          +import org.apache.pekko.event.DiagnosticLoggingAdapter;
           import scala.collection.immutable.Seq;
           
           /**
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/LoggingFactory.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/LoggingFactory.java
          similarity index 94%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/LoggingFactory.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/LoggingFactory.java
          index 2ec8be2069..d6162f9d4a 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/LoggingFactory.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/LoggingFactory.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
           
           import javax.annotation.Nullable;
           import javax.annotation.concurrent.Immutable;
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/MdcEntry.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/MdcEntry.java
          similarity index 96%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/MdcEntry.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/MdcEntry.java
          index 4610897958..64d7e97b0d 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/MdcEntry.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/MdcEntry.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
           
           import javax.annotation.Nullable;
           import javax.annotation.concurrent.Immutable;
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/ThreadSafeDittoLogger.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/ThreadSafeDittoLogger.java
          similarity index 98%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/ThreadSafeDittoLogger.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/ThreadSafeDittoLogger.java
          index 3915f24534..8bf408288e 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/ThreadSafeDittoLogger.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/ThreadSafeDittoLogger.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
           
           import javax.annotation.Nullable;
           import javax.annotation.concurrent.ThreadSafe;
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/WithMdcEntry.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/WithMdcEntry.java
          similarity index 98%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/WithMdcEntry.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/WithMdcEntry.java
          index 37a325e388..74d5b1fb8e 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/WithMdcEntry.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/WithMdcEntry.java
          @@ -10,7 +10,7 @@
            *
            * SPDX-License-Identifier: EPL-2.0
            */
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
           
           import javax.annotation.Nullable;
           
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/package-info.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/package-info.java
          similarity index 89%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/package-info.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/package-info.java
          index f1969a5794..86d138b583 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/logging/package-info.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/logging/package-info.java
          @@ -11,4 +11,4 @@
            * SPDX-License-Identifier: EPL-2.0
            */
           @org.eclipse.ditto.utils.jsr305.annotations.AllParametersAndReturnValuesAreNonnullByDefault
          -package org.eclipse.ditto.internal.utils.akka.logging;
          +package org.eclipse.ditto.internal.utils.pekko.logging;
          diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/mailbox/MonitoredUnboundedMailboxType.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/mailbox/MonitoredUnboundedMailboxType.java
          similarity index 90%
          rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/mailbox/MonitoredUnboundedMailboxType.java
          rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/mailbox/MonitoredUnboundedMailboxType.java
          index 43b08d8906..5ba79c395a 100644
          --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/mailbox/MonitoredUnboundedMailboxType.java
          +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/mailbox/MonitoredUnboundedMailboxType.java
          @@ -10,7 +10,7 @@
             *
             * SPDX-License-Identifier: EPL-2.0
             */
          - package org.eclipse.ditto.internal.utils.akka.mailbox;
          + package org.eclipse.ditto.internal.utils.pekko.mailbox;
           
            import java.util.Optional;
            import java.util.Queue;
          @@ -25,23 +25,23 @@
           
            import com.typesafe.config.Config;
           
          - import akka.actor.ActorPath;
          - import akka.actor.ActorRef;
          - import akka.actor.ActorRefWithCell;
          - import akka.actor.ActorSystem;
          - import akka.dispatch.Envelope;
          - import akka.dispatch.MailboxType;
          - import akka.dispatch.MessageQueue;
          - import akka.dispatch.ProducesMessageQueue;
          - import akka.dispatch.UnboundedMailbox;
          - import akka.event.Logging;
          - import akka.event.LoggingAdapter;
          + import org.apache.pekko.actor.ActorPath;
          + import org.apache.pekko.actor.ActorRef;
          + import org.apache.pekko.actor.ActorRefWithCell;
          + import org.apache.pekko.actor.ActorSystem;
          + import org.apache.pekko.dispatch.Envelope;
          + import org.apache.pekko.dispatch.MailboxType;
          + import org.apache.pekko.dispatch.MessageQueue;
          + import org.apache.pekko.dispatch.ProducesMessageQueue;
          + import org.apache.pekko.dispatch.UnboundedMailbox;
          + import org.apache.pekko.event.Logging;
          + import org.apache.pekko.event.LoggingAdapter;
            import scala.Option;
           
            /**
             * MonitoredUnboundedMailboxType is a regular unbounded mailbox, which in addition monitors the size of the
             * mailbox/queue.
          -  * It is backed by a {@link ConcurrentLinkedQueue}, like the default {@link UnboundedMailbox} of Akka. Therefore it can be
          +  * It is backed by a {@link ConcurrentLinkedQueue}, like the default {@link UnboundedMailbox} of Pekko. Therefore it can be
             * used to replace the default unbounded mailbox.
             * 

          * This mailbox has two additional monitoring features: Logging the size of the mailbox when a given @@ -64,7 +64,7 @@ public final class MonitoredUnboundedMailboxType /** * Creates a new {@code MonitoredUnboundedMailboxType}. - * This constructor signature must exist, it will be called by Akka. + * This constructor signature must exist, it will be called by Pekko. * * @param settings the ActorSystem settings. * @param config the config. @@ -96,7 +96,7 @@ public MessageQueue create(final Option owner, final Option or system <{}> not available", owner, system); } - // Use akka default unbounded mailbox as fallback + // Use pekko default unbounded mailbox as fallback return new UnboundedMailbox.MessageQueue(); } @@ -120,7 +120,7 @@ private boolean shouldTrackActor(final ActorPath path) { * A {@code MessageQueue} implementation which keeps track of its size. The size is tracked separately, to avoid * {@link Queue#size} complexity of O(n). The size will be reported via logging and a gauge metric. */ - static final class InstrumentedMessageQueue implements MessageQueue, akka.dispatch.UnboundedMessageQueueSemantics { + static final class InstrumentedMessageQueue implements MessageQueue, org.apache.pekko.dispatch.UnboundedMessageQueueSemantics { private final LoggingAdapter log; private final ActorPath path; @@ -144,7 +144,7 @@ static final class InstrumentedMessageQueue implements MessageQueue, akka.dispat } /** - * Uses internal akka API to retrieve the Class of the owner Actor. + * Uses internal pekko API to retrieve the Class of the owner Actor. * * @param owner actor reference of the owner. * @return the name of the actor class or empty. diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/package-info.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/package-info.java similarity index 78% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/package-info.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/package-info.java index 181997c95b..b80553e058 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/package-info.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/package-info.java @@ -12,7 +12,7 @@ */ /** - * Encode control flow as data flow through akka streams for modular actor decomposition. + * Encode control flow as data flow through pekko streams for modular actor decomposition. */ @org.eclipse.ditto.utils.jsr305.annotations.AllParametersAndReturnValuesAreNonnullByDefault -package org.eclipse.ditto.internal.utils.akka; +package org.eclipse.ditto.internal.utils.pekko; diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/streaming/AbstractStreamingActor.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/streaming/AbstractStreamingActor.java similarity index 87% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/streaming/AbstractStreamingActor.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/streaming/AbstractStreamingActor.java index 521fb7f24d..2de4fc8f11 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/streaming/AbstractStreamingActor.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/streaming/AbstractStreamingActor.java @@ -10,20 +10,20 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.streaming; +package org.eclipse.ditto.internal.utils.pekko.streaming; import java.time.Duration; import java.util.List; -import akka.NotUsed; -import akka.actor.AbstractActor; -import akka.event.DiagnosticLoggingAdapter; -import akka.event.Logging; -import akka.japi.pf.ReceiveBuilder; -import akka.stream.Materializer; -import akka.stream.SourceRef; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.StreamRefs; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.event.Logging; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.SourceRef; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.StreamRefs; /** * Abstract actor that responds to each command by streaming elements from a source to the sender of the command. @@ -36,7 +36,7 @@ public abstract class AbstractStreamingActor extends AbstractActor { /** * Logger for this actor. * Intentionally _NOT_ instantiated with DittoLoggerFactory as this would lead to scala-java compile problems within - * the "ditto-internal-utils-akka" module: + * the "ditto-internal-utils-pekko" module: */ protected final DiagnosticLoggingAdapter log = Logging.apply(this); diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/streaming/StreamAck.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/streaming/StreamAck.java similarity index 99% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/streaming/StreamAck.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/streaming/StreamAck.java index 5834dd884c..78a53386f4 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/streaming/StreamAck.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/streaming/StreamAck.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.streaming; +package org.eclipse.ditto.internal.utils.pekko.streaming; import java.util.Objects; import java.util.stream.Stream; diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/streaming/StreamConstants.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/streaming/StreamConstants.java similarity index 94% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/streaming/StreamConstants.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/streaming/StreamConstants.java index 3d431dbfb3..df08330304 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/streaming/StreamConstants.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/streaming/StreamConstants.java @@ -10,9 +10,9 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.streaming; +package org.eclipse.ditto.internal.utils.pekko.streaming; -import akka.actor.Status; +import org.apache.pekko.actor.Status; /** * Constants used for streaming utils. diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/streaming/StreamTrigger.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/streaming/StreamTrigger.java similarity index 98% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/streaming/StreamTrigger.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/streaming/StreamTrigger.java index ff426ef778..f3bc91226e 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/streaming/StreamTrigger.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/streaming/StreamTrigger.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.streaming; +package org.eclipse.ditto.internal.utils.pekko.streaming; import java.time.Duration; import java.time.Instant; diff --git a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/streaming/TimestampPersistence.java b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/streaming/TimestampPersistence.java similarity index 88% rename from internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/streaming/TimestampPersistence.java rename to internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/streaming/TimestampPersistence.java index 6f7b6a8dd1..d32d0de856 100644 --- a/internal/utils/akka/src/main/java/org/eclipse/ditto/internal/utils/akka/streaming/TimestampPersistence.java +++ b/internal/utils/pekko/src/main/java/org/eclipse/ditto/internal/utils/pekko/streaming/TimestampPersistence.java @@ -10,17 +10,17 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.streaming; +package org.eclipse.ditto.internal.utils.pekko.streaming; import java.time.Instant; import java.util.Optional; import javax.annotation.Nullable; -import akka.Done; -import akka.NotUsed; -import akka.japi.Pair; -import akka.stream.javadsl.Source; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.javadsl.Source; /** * Defines operations for managing metadata of streams. diff --git a/internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/AkkaClassLoader.scala b/internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/PekkoClassLoader.scala similarity index 93% rename from internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/AkkaClassLoader.scala rename to internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/PekkoClassLoader.scala index e0aff6be88..42e4a9b0fd 100644 --- a/internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/AkkaClassLoader.scala +++ b/internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/PekkoClassLoader.scala @@ -10,9 +10,9 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka +package org.eclipse.ditto.internal.utils.pekko -import akka.actor.{ActorSystem, DynamicAccess, ExtendedActorSystem} +import org.apache.pekko.actor.{ActorSystem, DynamicAccess, ExtendedActorSystem} import java.util.Collections import scala.collection.JavaConverters.asScalaBuffer @@ -20,7 +20,7 @@ import scala.collection.immutable import scala.reflect.ClassTag /** Java-friendly interface to load and instantiate classes inside an actor system. */ -object AkkaClassLoader { +object PekkoClassLoader { /** Dynamically instantiate a class with its zero-argument public constructor. * diff --git a/internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/actors/AbstractActorWithStashWithTimers.scala b/internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/actors/AbstractActorWithStashWithTimers.scala similarity index 82% rename from internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/actors/AbstractActorWithStashWithTimers.scala rename to internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/actors/AbstractActorWithStashWithTimers.scala index 6aae60f753..eb77ab4bf2 100644 --- a/internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/actors/AbstractActorWithStashWithTimers.scala +++ b/internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/actors/AbstractActorWithStashWithTimers.scala @@ -10,9 +10,9 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.actors +package org.eclipse.ditto.internal.utils.pekko.actors -import akka.actor.{AbstractActorWithTimers, Stash} +import org.apache.pekko.actor.{AbstractActorWithTimers, Stash} /** * Java's `Actor with Stash with Timers`. diff --git a/internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/logging/AbstractDiagnosticLoggingAdapter.scala b/internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/logging/AbstractDiagnosticLoggingAdapter.scala similarity index 95% rename from internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/logging/AbstractDiagnosticLoggingAdapter.scala rename to internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/logging/AbstractDiagnosticLoggingAdapter.scala index 4d1a20dcf4..c54ec3dce5 100644 --- a/internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/logging/AbstractDiagnosticLoggingAdapter.scala +++ b/internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/logging/AbstractDiagnosticLoggingAdapter.scala @@ -10,9 +10,9 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.logging +package org.eclipse.ditto.internal.utils.pekko.logging -import akka.event.DiagnosticLoggingAdapter +import org.apache.pekko.event.DiagnosticLoggingAdapter import javax.annotation.Nullable import javax.annotation.concurrent.NotThreadSafe diff --git a/internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/logging/DiagnosticBusLogging.scala b/internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/logging/DiagnosticBusLogging.scala similarity index 83% rename from internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/logging/DiagnosticBusLogging.scala rename to internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/logging/DiagnosticBusLogging.scala index 0167244aa3..c7559bf602 100644 --- a/internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/logging/DiagnosticBusLogging.scala +++ b/internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/logging/DiagnosticBusLogging.scala @@ -10,9 +10,9 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.logging +package org.eclipse.ditto.internal.utils.pekko.logging -import akka.event.{BusLogging, DiagnosticLoggingAdapter, LoggingBus, LoggingFilter} +import org.apache.pekko.event.{BusLogging, DiagnosticLoggingAdapter, LoggingBus, LoggingFilter} /** This class combines [[BusLogging]] with [[DiagnosticLoggingAdapter]] for usage in Java. * diff --git a/internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/logging/DittoDiagnosticLoggingAdapter.scala b/internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/logging/DittoDiagnosticLoggingAdapter.scala similarity index 98% rename from internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/logging/DittoDiagnosticLoggingAdapter.scala rename to internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/logging/DittoDiagnosticLoggingAdapter.scala index 397b909b7e..bdab0b8e18 100644 --- a/internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/logging/DittoDiagnosticLoggingAdapter.scala +++ b/internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/logging/DittoDiagnosticLoggingAdapter.scala @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.logging +package org.eclipse.ditto.internal.utils.pekko.logging import org.eclipse.ditto.base.model.headers.{DittoHeaders, WithDittoHeaders} @@ -18,7 +18,7 @@ import javax.annotation.Nullable import javax.annotation.concurrent.NotThreadSafe import scala.annotation.varargs -/** An Akka [[akka.event.DiagnosticLoggingAdapter]] with additional functionality. +/** An Pekko [[org.apache.pekko.event.DiagnosticLoggingAdapter]] with additional functionality. * * The main purpose of DittoDiagnosticLoggingAdapter is to provide an API for easily setting a correlation ID to the * logging MDC. diff --git a/internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/logging/MdcEntrySettable.scala b/internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/logging/MdcEntrySettable.scala similarity index 98% rename from internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/logging/MdcEntrySettable.scala rename to internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/logging/MdcEntrySettable.scala index 93d6adfa2b..0d2dde2344 100644 --- a/internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/logging/MdcEntrySettable.scala +++ b/internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/logging/MdcEntrySettable.scala @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.logging +package org.eclipse.ditto.internal.utils.pekko.logging import javax.annotation.Nullable diff --git a/internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/logging/ThreadSafeDittoLoggingAdapter.scala b/internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/logging/ThreadSafeDittoLoggingAdapter.scala similarity index 96% rename from internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/logging/ThreadSafeDittoLoggingAdapter.scala rename to internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/logging/ThreadSafeDittoLoggingAdapter.scala index 9dc8631431..89a578601c 100644 --- a/internal/utils/akka/src/main/scala/org/eclipse/ditto/internal/utils/akka/logging/ThreadSafeDittoLoggingAdapter.scala +++ b/internal/utils/pekko/src/main/scala/org/eclipse/ditto/internal/utils/pekko/logging/ThreadSafeDittoLoggingAdapter.scala @@ -10,15 +10,15 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.logging +package org.eclipse.ditto.internal.utils.pekko.logging -import akka.event.LoggingAdapter +import org.apache.pekko.event.LoggingAdapter import org.eclipse.ditto.base.model.headers.{DittoHeaders, WithDittoHeaders} import javax.annotation.Nullable import javax.annotation.concurrent.ThreadSafe -/** A [[akka.event.LoggingAdapter]] with additional functionality. +/** A [[org.apache.pekko.event.LoggingAdapter]] with additional functionality. * * The main purpose of ThreadSafeDittoLoggingAdapter is to provide an API for easily setting a correlation ID * or other arbitrary values to the logging diff --git a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/ActorSystemResource.java b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/ActorSystemResource.java similarity index 94% rename from internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/ActorSystemResource.java rename to internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/ActorSystemResource.java index 68d6772882..252361437b 100644 --- a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/ActorSystemResource.java +++ b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/ActorSystemResource.java @@ -10,14 +10,13 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka; +package org.eclipse.ditto.internal.utils.pekko; import static org.eclipse.ditto.base.model.common.ConditionChecker.argumentNotEmpty; import static org.eclipse.ditto.base.model.common.ConditionChecker.argumentNotNull; import static org.eclipse.ditto.base.model.common.ConditionChecker.checkNotNull; import java.text.MessageFormat; -import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; import javax.annotation.concurrent.NotThreadSafe; @@ -29,13 +28,12 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.stream.Materializer; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; -import scala.concurrent.duration.Duration; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Starts an {@link ActorSystem} for the test and stops it afterwards. diff --git a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/controlflow/LazyZipTest.java b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/controlflow/LazyZipTest.java similarity index 79% rename from internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/controlflow/LazyZipTest.java rename to internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/controlflow/LazyZipTest.java index 42d4995b83..962fdd5f2e 100644 --- a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/controlflow/LazyZipTest.java +++ b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/controlflow/LazyZipTest.java @@ -10,25 +10,25 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.controlflow; +package org.eclipse.ditto.internal.utils.pekko.controlflow; import org.junit.After; import org.junit.Test; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.japi.Pair; -import akka.stream.FanInShape2; -import akka.stream.Graph; -import akka.stream.SourceShape; -import akka.stream.javadsl.GraphDSL; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Source; -import akka.stream.testkit.TestPublisher; -import akka.stream.testkit.TestSubscriber; -import akka.stream.testkit.javadsl.TestSink; -import akka.stream.testkit.javadsl.TestSource; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.FanInShape2; +import org.apache.pekko.stream.Graph; +import org.apache.pekko.stream.SourceShape; +import org.apache.pekko.stream.javadsl.GraphDSL; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.testkit.TestPublisher; +import org.apache.pekko.stream.testkit.TestSubscriber; +import org.apache.pekko.stream.testkit.javadsl.TestSink; +import org.apache.pekko.stream.testkit.javadsl.TestSource; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link LazyZip}. diff --git a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/controlflow/MergeSortedAsPairTest.java b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/controlflow/MergeSortedAsPairTest.java similarity index 93% rename from internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/controlflow/MergeSortedAsPairTest.java rename to internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/controlflow/MergeSortedAsPairTest.java index 5b6eb04730..75eff1b56b 100644 --- a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/controlflow/MergeSortedAsPairTest.java +++ b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/controlflow/MergeSortedAsPairTest.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.controlflow; +package org.eclipse.ditto.internal.utils.pekko.controlflow; import static org.assertj.core.api.Java6Assertions.assertThat; @@ -22,21 +22,21 @@ import org.junit.BeforeClass; import org.junit.Test; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.japi.Pair; -import akka.stream.FanInShape2; -import akka.stream.Graph; -import akka.stream.SourceShape; -import akka.stream.javadsl.GraphDSL; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.stream.testkit.TestPublisher; -import akka.stream.testkit.TestSubscriber; -import akka.stream.testkit.javadsl.TestSink; -import akka.stream.testkit.javadsl.TestSource; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.FanInShape2; +import org.apache.pekko.stream.Graph; +import org.apache.pekko.stream.SourceShape; +import org.apache.pekko.stream.javadsl.GraphDSL; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.testkit.TestPublisher; +import org.apache.pekko.stream.testkit.TestSubscriber; +import org.apache.pekko.stream.testkit.javadsl.TestSink; +import org.apache.pekko.stream.testkit.javadsl.TestSource; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.concurrent.duration.FiniteDuration; /** diff --git a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/controlflow/ResumeSourceTest.java b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/controlflow/ResumeSourceTest.java similarity index 89% rename from internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/controlflow/ResumeSourceTest.java rename to internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/controlflow/ResumeSourceTest.java index 2f4fb860b7..d6c9ad9682 100644 --- a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/controlflow/ResumeSourceTest.java +++ b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/controlflow/ResumeSourceTest.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.controlflow; +package org.eclipse.ditto.internal.utils.pekko.controlflow; import static org.assertj.core.api.Assertions.assertThat; @@ -20,20 +20,20 @@ import org.junit.Before; import org.junit.Test; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.japi.Pair; -import akka.pattern.Patterns; -import akka.stream.Attributes; -import akka.stream.StreamLimitReachedException; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.stream.testkit.TestPublisher; -import akka.stream.testkit.TestSubscriber; -import akka.stream.testkit.javadsl.TestSink; -import akka.stream.testkit.javadsl.TestSource; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.stream.StreamLimitReachedException; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.testkit.TestPublisher; +import org.apache.pekko.stream.testkit.TestSubscriber; +import org.apache.pekko.stream.testkit.javadsl.TestSink; +import org.apache.pekko.stream.testkit.javadsl.TestSource; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link ResumeSource}. diff --git a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/controlflow/TimeoutFlowTest.java b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/controlflow/TimeoutFlowTest.java similarity index 88% rename from internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/controlflow/TimeoutFlowTest.java rename to internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/controlflow/TimeoutFlowTest.java index 864c95ba26..03f6ded6e3 100644 --- a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/controlflow/TimeoutFlowTest.java +++ b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/controlflow/TimeoutFlowTest.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.controlflow; +package org.eclipse.ditto.internal.utils.pekko.controlflow; import java.time.Duration; @@ -18,16 +18,16 @@ import org.junit.Before; import org.junit.Test; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.japi.Pair; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.stream.testkit.TestSubscriber; -import akka.stream.testkit.javadsl.TestSink; -import akka.stream.testkit.javadsl.TestSource; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.testkit.TestSubscriber; +import org.apache.pekko.stream.testkit.javadsl.TestSink; +import org.apache.pekko.stream.testkit.javadsl.TestSource; +import org.apache.pekko.testkit.javadsl.TestKit; public final class TimeoutFlowTest { diff --git a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/controlflow/TransistorTest.java b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/controlflow/TransistorTest.java similarity index 91% rename from internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/controlflow/TransistorTest.java rename to internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/controlflow/TransistorTest.java index cb562468ac..3171f06353 100644 --- a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/controlflow/TransistorTest.java +++ b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/controlflow/TransistorTest.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.controlflow; +package org.eclipse.ditto.internal.utils.pekko.controlflow; import java.util.ArrayList; import java.util.Arrays; @@ -26,19 +26,19 @@ import org.junit.runner.RunWith; import org.junit.runners.Parameterized; -import akka.actor.ActorSystem; -import akka.japi.Pair; -import akka.stream.Graph; -import akka.stream.SourceShape; -import akka.stream.javadsl.GraphDSL$; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.stream.testkit.TestPublisher; -import akka.stream.testkit.TestSubscriber; -import akka.stream.testkit.javadsl.TestSink; -import akka.stream.testkit.javadsl.TestSource; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.Graph; +import org.apache.pekko.stream.SourceShape; +import org.apache.pekko.stream.javadsl.GraphDSL$; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.testkit.TestPublisher; +import org.apache.pekko.stream.testkit.TestSubscriber; +import org.apache.pekko.stream.testkit.javadsl.TestSink; +import org.apache.pekko.stream.testkit.javadsl.TestSource; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link Transistor} with all combinations of activation orders diff --git a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/CapturingMdcAdapterObserver.java b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/CapturingMdcAdapterObserver.java similarity index 96% rename from internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/CapturingMdcAdapterObserver.java rename to internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/CapturingMdcAdapterObserver.java index 854b12c7d3..d1b71de867 100644 --- a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/CapturingMdcAdapterObserver.java +++ b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/CapturingMdcAdapterObserver.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.logging; +package org.eclipse.ditto.internal.utils.pekko.logging; import static org.assertj.core.api.Assertions.entry; diff --git a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultAutoCloseableSlf4jLoggerTest.java b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultAutoCloseableSlf4jLoggerTest.java similarity index 99% rename from internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultAutoCloseableSlf4jLoggerTest.java rename to internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultAutoCloseableSlf4jLoggerTest.java index ded7f5666a..93141e4998 100644 --- a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultAutoCloseableSlf4jLoggerTest.java +++ b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultAutoCloseableSlf4jLoggerTest.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.logging; +package org.eclipse.ditto.internal.utils.pekko.logging; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatNullPointerException; diff --git a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDiagnosticLoggingAdapterTest.java b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDiagnosticLoggingAdapterTest.java similarity index 98% rename from internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDiagnosticLoggingAdapterTest.java rename to internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDiagnosticLoggingAdapterTest.java index bc2a9dfc00..003cab7f4e 100644 --- a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDiagnosticLoggingAdapterTest.java +++ b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDiagnosticLoggingAdapterTest.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.logging; +package org.eclipse.ditto.internal.utils.pekko.logging; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; @@ -27,7 +27,7 @@ import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; -import akka.event.DiagnosticLoggingAdapter; +import org.apache.pekko.event.DiagnosticLoggingAdapter; /** * Unit test for {@link DefaultDiagnosticLoggingAdapter}. diff --git a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDittoDiagnosticLoggingAdapterTest.java b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDittoDiagnosticLoggingAdapterTest.java similarity index 99% rename from internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDittoDiagnosticLoggingAdapterTest.java rename to internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDittoDiagnosticLoggingAdapterTest.java index 2f6c3c439b..adffaae9c8 100644 --- a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDittoDiagnosticLoggingAdapterTest.java +++ b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDittoDiagnosticLoggingAdapterTest.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.logging; +package org.eclipse.ditto.internal.utils.pekko.logging; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; @@ -28,7 +28,7 @@ import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; -import akka.event.DiagnosticLoggingAdapter; +import org.apache.pekko.event.DiagnosticLoggingAdapter; /** * Unit test for {@link DefaultDittoDiagnosticLoggingAdapter}. diff --git a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDittoLoggerTest.java b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDittoLoggerTest.java similarity index 99% rename from internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDittoLoggerTest.java rename to internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDittoLoggerTest.java index bbaf4e1c82..1895f336dd 100644 --- a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultDittoLoggerTest.java +++ b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultDittoLoggerTest.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.logging; +package org.eclipse.ditto.internal.utils.pekko.logging; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatNullPointerException; diff --git a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultMdcEntryTest.java b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultMdcEntryTest.java similarity index 97% rename from internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultMdcEntryTest.java rename to internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultMdcEntryTest.java index af9eaef54b..27eccb5ad8 100644 --- a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/DefaultMdcEntryTest.java +++ b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/DefaultMdcEntryTest.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.logging; +package org.eclipse.ditto.internal.utils.pekko.logging; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/ImmutableDittoLoggerTest.java b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/ImmutableDittoLoggerTest.java similarity index 99% rename from internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/ImmutableDittoLoggerTest.java rename to internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/ImmutableDittoLoggerTest.java index 76f5b2135e..653772f322 100644 --- a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/ImmutableDittoLoggerTest.java +++ b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/ImmutableDittoLoggerTest.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.logging; +package org.eclipse.ditto.internal.utils.pekko.logging; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatNullPointerException; diff --git a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/ImmutableDittoLoggingAdapterTest.java b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/ImmutableDittoLoggingAdapterTest.java similarity index 99% rename from internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/ImmutableDittoLoggingAdapterTest.java rename to internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/ImmutableDittoLoggingAdapterTest.java index cd9235746c..99d58a8ee4 100644 --- a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/logging/ImmutableDittoLoggingAdapterTest.java +++ b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/logging/ImmutableDittoLoggingAdapterTest.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.logging; +package org.eclipse.ditto.internal.utils.pekko.logging; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatNullPointerException; @@ -29,7 +29,7 @@ import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; -import akka.event.DiagnosticLoggingAdapter; +import org.apache.pekko.event.DiagnosticLoggingAdapter; /** * Unit test for {@link ImmutableDittoLoggingAdapter}. diff --git a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/mailbox/MonitoredUnboundedMailboxTypeTest.java b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/mailbox/MonitoredUnboundedMailboxTypeTest.java similarity index 88% rename from internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/mailbox/MonitoredUnboundedMailboxTypeTest.java rename to internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/mailbox/MonitoredUnboundedMailboxTypeTest.java index 5cd08f6069..f5cc0e06ea 100644 --- a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/mailbox/MonitoredUnboundedMailboxTypeTest.java +++ b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/mailbox/MonitoredUnboundedMailboxTypeTest.java @@ -10,9 +10,9 @@ * * SPDX-License-Identifier: EPL-2.0 */ - package org.eclipse.ditto.internal.utils.akka.mailbox; + package org.eclipse.ditto.internal.utils.pekko.mailbox; - import static akka.Done.done; + import static org.apache.pekko.Done.done; import static org.assertj.core.api.Assertions.assertThat; import java.util.concurrent.CountDownLatch; @@ -26,16 +26,16 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; - import akka.actor.AbstractActor; - import akka.actor.ActorRef; - import akka.actor.ActorSystem; - import akka.actor.Props; - import akka.dispatch.MessageQueue; - import akka.dispatch.UnboundedMailbox; - import akka.event.Logging; - import akka.event.LoggingAdapter; - import akka.testkit.javadsl.EventFilter; - import akka.testkit.javadsl.TestKit; + import org.apache.pekko.actor.AbstractActor; + import org.apache.pekko.actor.ActorRef; + import org.apache.pekko.actor.ActorSystem; + import org.apache.pekko.actor.Props; + import org.apache.pekko.dispatch.MessageQueue; + import org.apache.pekko.dispatch.UnboundedMailbox; + import org.apache.pekko.event.Logging; + import org.apache.pekko.event.LoggingAdapter; + import org.apache.pekko.testkit.javadsl.EventFilter; + import org.apache.pekko.testkit.javadsl.TestKit; import scala.Option; public final class MonitoredUnboundedMailboxTypeTest { diff --git a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/streaming/StreamAckTest.java b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/streaming/StreamAckTest.java similarity index 97% rename from internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/streaming/StreamAckTest.java rename to internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/streaming/StreamAckTest.java index 64f881f2b0..6fd17ca58c 100644 --- a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/streaming/StreamAckTest.java +++ b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/streaming/StreamAckTest.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.streaming; +package org.eclipse.ditto.internal.utils.pekko.streaming; import static org.assertj.core.api.Assertions.assertThat; import static org.mutabilitydetector.unittesting.MutabilityAssert.assertInstancesOf; diff --git a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/streaming/StreamTriggerTest.java b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/streaming/StreamTriggerTest.java similarity index 98% rename from internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/streaming/StreamTriggerTest.java rename to internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/streaming/StreamTriggerTest.java index 5f079c3330..85aa7689b9 100644 --- a/internal/utils/akka/src/test/java/org/eclipse/ditto/internal/utils/akka/streaming/StreamTriggerTest.java +++ b/internal/utils/pekko/src/test/java/org/eclipse/ditto/internal/utils/pekko/streaming/StreamTriggerTest.java @@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 */ -package org.eclipse.ditto.internal.utils.akka.streaming; +package org.eclipse.ditto.internal.utils.pekko.streaming; import static org.assertj.core.api.Assertions.assertThat; import static org.mutabilitydetector.unittesting.MutabilityAssert.assertInstancesOf; diff --git a/internal/utils/akka/src/test/java/org/slf4j/impl/ObservableMdcAdapter.java b/internal/utils/pekko/src/test/java/org/slf4j/impl/ObservableMdcAdapter.java similarity index 100% rename from internal/utils/akka/src/test/java/org/slf4j/impl/ObservableMdcAdapter.java rename to internal/utils/pekko/src/test/java/org/slf4j/impl/ObservableMdcAdapter.java diff --git a/internal/utils/akka/src/test/java/org/slf4j/impl/StaticMDCBinder.java b/internal/utils/pekko/src/test/java/org/slf4j/impl/StaticMDCBinder.java similarity index 100% rename from internal/utils/akka/src/test/java/org/slf4j/impl/StaticMDCBinder.java rename to internal/utils/pekko/src/test/java/org/slf4j/impl/StaticMDCBinder.java diff --git a/internal/utils/akka/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/internal/utils/pekko/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker similarity index 100% rename from internal/utils/akka/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker rename to internal/utils/pekko/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker diff --git a/internal/utils/akka/src/test/resources/monitored-mailbox-test.conf b/internal/utils/pekko/src/test/resources/monitored-mailbox-test.conf similarity index 66% rename from internal/utils/akka/src/test/resources/monitored-mailbox-test.conf rename to internal/utils/pekko/src/test/resources/monitored-mailbox-test.conf index 1e7dad001e..0311fab320 100644 --- a/internal/utils/akka/src/test/resources/monitored-mailbox-test.conf +++ b/internal/utils/pekko/src/test/resources/monitored-mailbox-test.conf @@ -1,6 +1,6 @@ -akka.loggers = [akka.testkit.TestEventListener] +pekko.loggers = [org.apache.pekko.testkit.TestEventListener] test-monitored-unbounded-mailbox { - mailbox-type = "org.eclipse.ditto.internal.utils.akka.mailbox.MonitoredUnboundedMailboxType" + mailbox-type = "org.eclipse.ditto.internal.utils.pekko.mailbox.MonitoredUnboundedMailboxType" monitored-unbounded-mailbox { threshold-for-logging = 2 diff --git a/internal/utils/persistence/pom.xml b/internal/utils/persistence/pom.xml index eb2ace121a..579190bcba 100755 --- a/internal/utils/persistence/pom.xml +++ b/internal/utils/persistence/pom.xml @@ -27,7 +27,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko org.eclipse.ditto @@ -59,12 +59,12 @@ - com.typesafe.akka - akka-actor_${scala.version} + org.apache.pekko + pekko-actor_${scala.version} - com.typesafe.akka - akka-cluster-tools_${scala.version} + org.apache.pekko + pekko-cluster-tools_${scala.version} org.mongodb @@ -72,18 +72,26 @@ com.github.scullxbones - akka-persistence-mongo-common_${scala.version} + pekko-persistence-mongodb_${scala.version} - com.github.scullxbones - akka-persistence-mongo-scala_${scala.version} + org.mongodb.scala + mongo-scala-driver_2.13 + com.github.ben-manes.caffeine caffeine + + + org.scala-lang.modules + scala-java8-compat_2.13 + + + io.netty netty-buffer @@ -105,7 +113,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko test test-jar @@ -130,18 +138,18 @@ test - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test - com.typesafe.akka - akka-stream-testkit_${scala.version} + org.apache.pekko + pekko-stream-testkit_${scala.version} test - com.typesafe.akka - akka-slf4j_${scala.version} + org.apache.pekko + pekko-slf4j_${scala.version} test @@ -151,8 +159,8 @@ test - com.typesafe.akka - akka-persistence-query_${scala.version} + org.apache.pekko + pekko-persistence-query_${scala.version} diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/SafeRecovery.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/SafeRecovery.java index e7497b4f8e..7cfc8cd464 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/SafeRecovery.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/SafeRecovery.java @@ -15,12 +15,12 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -import akka.actor.AbstractActor; -import akka.event.DiagnosticLoggingAdapter; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** - * A wrapper of the result of {@link akka.japi.pf.ReceiveBuilder} that never fails. + * A wrapper of the result of {@link org.apache.pekko.japi.pf.ReceiveBuilder} that never fails. */ public final class SafeRecovery { @@ -28,7 +28,7 @@ public final class SafeRecovery { * Creates a Receive for recovery such that exceptions are logged as warnings * and not thrown. Recovery messages causing exceptions have no effect. * - * @param log The Akka logger to write warnings to. + * @param log The Pekko logger to write warnings to. * @param receiveRecover The Receive to wrap around. * * @return the created Receive. diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/SnapshotAdapter.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/SnapshotAdapter.java index a219acf0c0..fb34c4992c 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/SnapshotAdapter.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/SnapshotAdapter.java @@ -21,15 +21,15 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; -import akka.persistence.SelectedSnapshot; -import akka.persistence.SnapshotOffer; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.persistence.SelectedSnapshot; +import org.apache.pekko.persistence.SnapshotOffer; /** - * Adapter capable of transforming Snapshots (in {@link #toSnapshotStore(Object)}) done in an Akka PersistentActor to + * Adapter capable of transforming Snapshots (in {@link #toSnapshotStore(Object)}) done in an Pekko PersistentActor to * another representation before persisting to the Snapshot-Store. * Also intercepts loading a Database's Snapshot representation (in {@link #fromSnapshotStore(SnapshotOffer)}) - * and is able to transform the Snapshot object before offering it to the Akka PersistentActor. + * and is able to transform the Snapshot object before offering it to the Pekko PersistentActor. * Implement this interface for persisting Snapshots in a DB-optimized way (e.g. in BSON format for MongoDB). * * @param the domain model type to do a Snapshot for. @@ -47,7 +47,7 @@ public interface SnapshotAdapter extends DittoExtensionPoint { /** * Converts a "database snapshot" (directly loaded from the database) type to a domain model snapshot type. * - * @param snapshotOffer the SnapshotOffer as offered from Akka Persistence including the db snapshot. + * @param snapshotOffer the SnapshotOffer as offered from Pekko Persistence including the db snapshot. * @return the transformed domain model type which is offered to the PersistentActor or {@code null}. */ @Nullable @@ -56,7 +56,7 @@ public interface SnapshotAdapter extends DittoExtensionPoint { /** * Converts a "database selected snapshot" (directly loaded from the database) type to a domain model snapshot type. * - * @param selectedSnapshot the SelectedSnapshot as offered from Akka Persistence including the db snapshot. + * @param selectedSnapshot the SelectedSnapshot as offered from Pekko Persistence including the db snapshot. * @return the transformed domain model type which is offered to the PersistentActor or {@code null}. */ @Nullable diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/AbstractMongoEventAdapter.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/AbstractMongoEventAdapter.java index 41e34a8462..bb9710521c 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/AbstractMongoEventAdapter.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/AbstractMongoEventAdapter.java @@ -34,10 +34,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.actor.ExtendedActorSystem; -import akka.persistence.journal.EventAdapter; -import akka.persistence.journal.EventSeq; -import akka.persistence.journal.Tagged; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.persistence.journal.EventAdapter; +import org.apache.pekko.persistence.journal.EventSeq; +import org.apache.pekko.persistence.journal.Tagged; /** * Abstract event adapter for persisting Ditto {@link Event}s. diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/AbstractMongoSnapshotAdapter.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/AbstractMongoSnapshotAdapter.java index 633ddeb421..5b68106216 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/AbstractMongoSnapshotAdapter.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/AbstractMongoSnapshotAdapter.java @@ -31,8 +31,8 @@ import org.eclipse.ditto.json.JsonParseException; import org.slf4j.Logger; -import akka.persistence.SelectedSnapshot; -import akka.persistence.SnapshotOffer; +import org.apache.pekko.persistence.SelectedSnapshot; +import org.apache.pekko.persistence.SnapshotOffer; /** * Abstract implementation of a MongoDB specific {@link SnapshotAdapter} for a {@link Jsonifiable}. diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/AbstractPersistenceStreamingActor.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/AbstractPersistenceStreamingActor.java index 5d2b095c84..b463d391ad 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/AbstractPersistenceStreamingActor.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/AbstractPersistenceStreamingActor.java @@ -21,7 +21,7 @@ import org.eclipse.ditto.internal.models.streaming.BatchedEntityIdWithRevisions; import org.eclipse.ditto.internal.models.streaming.EntityIdWithRevision; import org.eclipse.ditto.internal.models.streaming.SudoStreamPids; -import org.eclipse.ditto.internal.utils.akka.streaming.AbstractStreamingActor; +import org.eclipse.ditto.internal.utils.pekko.streaming.AbstractStreamingActor; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; import org.eclipse.ditto.internal.utils.persistence.mongo.config.DefaultMongoDbConfig; import org.eclipse.ditto.internal.utils.persistence.mongo.config.MongoDbConfig; @@ -29,8 +29,8 @@ import org.eclipse.ditto.internal.utils.persistence.mongo.streaming.PidWithSeqNr; import org.eclipse.ditto.utils.jsr305.annotations.AllValuesAreNonnullByDefault; -import akka.NotUsed; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.stream.javadsl.Source; /** * Abstract implementation of an Actor that streams information about persisted entities modified in a time window in diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/DefaultPersistenceStreamingActor.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/DefaultPersistenceStreamingActor.java index 248f27f391..8c1fad74b2 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/DefaultPersistenceStreamingActor.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/DefaultPersistenceStreamingActor.java @@ -19,7 +19,7 @@ import org.eclipse.ditto.internal.utils.persistence.mongo.streaming.PidWithSeqNr; import org.eclipse.ditto.utils.jsr305.annotations.AllValuesAreNonnullByDefault; -import akka.actor.Props; +import org.apache.pekko.actor.Props; /** * Configurable default implementation of {@link AbstractPersistenceStreamingActor}. @@ -50,7 +50,7 @@ private DefaultPersistenceStreamingActor(final Class elementClass, } /** - * Creates Akka configuration object Props for this PersistenceStreamingActor. + * Creates Pekko configuration object Props for this PersistenceStreamingActor. * * @param type of messages to stream. * @param elementClass class of the elements. @@ -58,7 +58,7 @@ private DefaultPersistenceStreamingActor(final Class elementClass, * {@link org.eclipse.ditto.internal.utils.persistence.mongo.streaming.PidWithSeqNr} to {@code T}. * The resulting entity will be streamed to the recipient actor. * @param entityUnmapper the inverse of {@code entityMapper}. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static > Props props(final Class elementClass, final Function entityMapper, diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/DittoMongoCollectionCache.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/DittoMongoCollectionCache.java index 670a732952..01fbcbb695 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/DittoMongoCollectionCache.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/DittoMongoCollectionCache.java @@ -24,7 +24,7 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigException; -import akka.contrib.persistence.mongodb.MongoCollectionCache; +import pekko.contrib.persistence.mongodb.MongoCollectionCache; import scala.Function1; import scala.concurrent.Future; diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/MongoHealthChecker.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/MongoHealthChecker.java index f138e963ef..3b03a5478a 100755 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/MongoHealthChecker.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/MongoHealthChecker.java @@ -33,12 +33,12 @@ import com.mongodb.client.result.DeleteResult; import com.mongodb.reactivestreams.client.MongoCollection; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.japi.pf.ReceiveBuilder; -import akka.stream.Materializer; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** * Actor for handling calls to the mongodb. @@ -85,9 +85,9 @@ public void postStop() { } /** - * Creates Akka configuration object Props for this MongoClientActor. + * Creates Pekko configuration object Props for this MongoClientActor. * - * @return the Akka configuration Props object + * @return the Pekko configuration Props object * @throws NullPointerException if {@code mongoDbConfig} is {@code null}. */ public static Props props() { diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/SnapshotStreamingActor.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/SnapshotStreamingActor.java index 1c8f727957..c4764d53c7 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/SnapshotStreamingActor.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/SnapshotStreamingActor.java @@ -25,9 +25,9 @@ import org.eclipse.ditto.base.model.entity.type.EntityType; import org.eclipse.ditto.internal.models.streaming.StreamedSnapshot; import org.eclipse.ditto.internal.models.streaming.SudoStreamSnapshots; -import org.eclipse.ditto.internal.utils.akka.actors.AbstractActorWithShutdownBehavior; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.actors.AbstractActorWithShutdownBehavior; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; import org.eclipse.ditto.internal.utils.persistence.mongo.config.DefaultMongoDbConfig; @@ -38,21 +38,21 @@ import org.eclipse.ditto.json.JsonValue; import org.eclipse.ditto.utils.jsr305.annotations.AllValuesAreNonnullByDefault; -import akka.Done; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.CoordinatedShutdown; -import akka.actor.Props; -import akka.cluster.pubsub.DistributedPubSub; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; -import akka.stream.KillSwitches; -import akka.stream.Materializer; -import akka.stream.SharedKillSwitch; -import akka.stream.SourceRef; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.StreamRefs; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.CoordinatedShutdown; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.pubsub.DistributedPubSub; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.SharedKillSwitch; +import org.apache.pekko.stream.SourceRef; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.StreamRefs; /** @@ -108,7 +108,7 @@ private SnapshotStreamingActor(final Function pid2EntityId, } /** - * Create Akka Props object for this actor. + * Create Pekko Props object for this actor. * * @param pid2EntityId function mapping PID to entity ID. * @param entityId2Pid function mapping entity ID to PID. @@ -121,7 +121,7 @@ public static Props props(final Function pid2EntityId, } /** - * Create Akka Props object for this actor with given Mongo client and read journal. + * Create Pekko Props object for this actor with given Mongo client and read journal. * This is useful for unit tests with a mocked MongoDB. * * @param pid2EntityId function mapping PID to entity ID. diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/config/SuffixBuilderConfig.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/config/SuffixBuilderConfig.java index d91146f5c4..bcc283e487 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/config/SuffixBuilderConfig.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/config/SuffixBuilderConfig.java @@ -20,7 +20,7 @@ import org.eclipse.ditto.internal.utils.config.KnownConfigValue; /** - * Provides the configuration settings of the MongoDB suffix builder for the Akka persistence plugin. + * Provides the configuration settings of the MongoDB suffix builder for the Pekko persistence plugin. */ @Immutable public interface SuffixBuilderConfig { diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/indices/IndexInitializer.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/indices/IndexInitializer.java index ffb91abd35..b7a64e4957 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/indices/IndexInitializer.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/indices/IndexInitializer.java @@ -28,11 +28,11 @@ import com.mongodb.reactivestreams.client.MongoDatabase; -import akka.Done; -import akka.NotUsed; -import akka.stream.Materializer; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** * Initializes indexes on a MongoDB collection. @@ -54,7 +54,7 @@ private IndexInitializer(final MongoDatabase db, final Materializer materializer * Returns a new {@code MongoIndexInitializer}. * * @param db the mongo client to use for creating indexes. - * @param materializer the materializer for akka streams. + * @param materializer the materializer for pekko streams. * @return the index initializer. */ public static IndexInitializer of(final MongoDatabase db, diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/indices/IndexOperations.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/indices/IndexOperations.java index 742fd0c4f0..f5744ba9dd 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/indices/IndexOperations.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/indices/IndexOperations.java @@ -28,10 +28,10 @@ import com.mongodb.reactivestreams.client.MongoCollection; import com.mongodb.reactivestreams.client.MongoDatabase; -import akka.Done; -import akka.NotUsed; -import akka.japi.pf.PFBuilder; -import akka.stream.javadsl.Source; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.stream.javadsl.Source; import scala.PartialFunction; /** diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/MongoOpsUtil.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/MongoOpsUtil.java index 7ce10aa489..615ca9214b 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/MongoOpsUtil.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/MongoOpsUtil.java @@ -30,9 +30,9 @@ import com.mongodb.client.model.WriteModel; import com.mongodb.reactivestreams.client.MongoCollection; -import akka.NotUsed; -import akka.japi.pf.PFBuilder; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.stream.javadsl.Source; /** * Util for Mongo persistence ops. diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/eventsource/MongoEntitiesPersistenceOperations.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/eventsource/MongoEntitiesPersistenceOperations.java index 5cdd394fa5..47d3d1d299 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/eventsource/MongoEntitiesPersistenceOperations.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/eventsource/MongoEntitiesPersistenceOperations.java @@ -25,8 +25,8 @@ import com.mongodb.reactivestreams.client.MongoCollection; import com.mongodb.reactivestreams.client.MongoDatabase; -import akka.NotUsed; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.stream.javadsl.Source; /** * Entities Ops on MongoDB EventSource persistence. diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/eventsource/MongoNamespacePersistenceOperations.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/eventsource/MongoNamespacePersistenceOperations.java index 2bf21a8d22..c0caacd832 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/eventsource/MongoNamespacePersistenceOperations.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/eventsource/MongoNamespacePersistenceOperations.java @@ -24,8 +24,8 @@ import com.mongodb.reactivestreams.client.MongoCollection; import com.mongodb.reactivestreams.client.MongoDatabase; -import akka.NotUsed; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.stream.javadsl.Source; /** * Namespace Ops on MongoDB EventSource persistence. diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/eventsource/MongoPersistenceOperationsSelectionProvider.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/eventsource/MongoPersistenceOperationsSelectionProvider.java index dba2ba84f8..8a1b2de85a 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/eventsource/MongoPersistenceOperationsSelectionProvider.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/eventsource/MongoPersistenceOperationsSelectionProvider.java @@ -25,7 +25,7 @@ import org.bson.Document; import org.eclipse.ditto.base.model.entity.id.EntityId; -import akka.contrib.persistence.mongodb.JournallingFieldNames$; +import pekko.contrib.persistence.mongodb.JournallingFieldNames$; /** * Provides {@link MongoPersistenceOperationsSelection}s for selecting/deleting documents in a MongoDB EventSource diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/MongoReadJournal.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/MongoReadJournal.java index 1d4d2ed8ba..bf5cd38d8d 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/MongoReadJournal.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/MongoReadJournal.java @@ -53,36 +53,37 @@ import com.mongodb.reactivestreams.client.MongoCollection; import com.typesafe.config.Config; -import akka.Done; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.contrib.persistence.mongodb.JavaDslMongoReadJournal; -import akka.contrib.persistence.mongodb.JournallingFieldNames$; -import akka.contrib.persistence.mongodb.SnapshottingFieldNames$; -import akka.japi.Pair; -import akka.persistence.query.EventEnvelope; -import akka.persistence.query.Offset; -import akka.persistence.query.PersistenceQuery; -import akka.persistence.query.javadsl.CurrentEventsByPersistenceIdQuery; -import akka.persistence.query.javadsl.CurrentEventsByTagQuery; -import akka.persistence.query.javadsl.CurrentPersistenceIdsQuery; -import akka.persistence.query.javadsl.EventsByPersistenceIdQuery; -import akka.persistence.query.javadsl.EventsByTagQuery; -import akka.persistence.query.javadsl.PersistenceIdsQuery; -import akka.stream.Attributes; -import akka.stream.Materializer; -import akka.stream.RestartSettings; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.RestartSource; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.persistence.query.EventEnvelope; +import org.apache.pekko.persistence.query.Offset; +import org.apache.pekko.persistence.query.PersistenceQuery; +import org.apache.pekko.persistence.query.javadsl.CurrentEventsByPersistenceIdQuery; +import org.apache.pekko.persistence.query.javadsl.CurrentEventsByTagQuery; +import org.apache.pekko.persistence.query.javadsl.CurrentPersistenceIdsQuery; +import org.apache.pekko.persistence.query.javadsl.EventsByPersistenceIdQuery; +import org.apache.pekko.persistence.query.javadsl.EventsByTagQuery; +import org.apache.pekko.persistence.query.javadsl.PersistenceIdsQuery; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.RestartSettings; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.RestartSource; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; + +import pekko.contrib.persistence.mongodb.JavaDslMongoReadJournal; +import pekko.contrib.persistence.mongodb.JournallingFieldNames$; +import pekko.contrib.persistence.mongodb.SnapshottingFieldNames$; /** - * Reads the event journal of {@code com.github.scullxbones.akka-persistence-mongo} plugin. - * In the Akka system configuration, + * Reads the event journal of {@code com.github.scullxbones.pekko-persistence-mongo} plugin. + * In the Pekko system configuration, *

            *
          • - * {@code akka.persistence.journal.auto-start-journals} must contain exactly 1 configuration key {@code + * {@code pekko.persistence.journal.auto-start-journals} must contain exactly 1 configuration key {@code * }, *
          • *
          • @@ -113,10 +114,10 @@ public final class MongoReadJournal implements CurrentEventsByPersistenceIdQuery */ public static final String PRIORITY_TAG_PREFIX = "priority-"; - private static final String AKKA_PERSISTENCE_JOURNAL_AUTO_START = - "akka.persistence.journal.auto-start-journals"; - private static final String AKKA_PERSISTENCE_SNAPS_AUTO_START = - "akka.persistence.snapshot-store.auto-start-snapshot-stores"; + private static final String PEKKO_PERSISTENCE_JOURNAL_AUTO_START = + "pekko.persistence.journal.auto-start-journals"; + private static final String PEKKO_PERSISTENCE_SNAPS_AUTO_START = + "pekko.persistence.snapshot-store.auto-start-snapshot-stores"; private static final String JOURNAL_COLLECTION_NAME_KEY = "overrides.journal-collection"; private static final String SNAPS_COLLECTION_NAME_KEY = "overrides.snaps-collection"; @@ -169,7 +170,7 @@ public final class MongoReadJournal implements CurrentEventsByPersistenceIdQuery private final DittoMongoClient mongoClient; private final IndexInitializer indexInitializer; - private final JavaDslMongoReadJournal akkaReadJournal; + private final JavaDslMongoReadJournal pekkoReadJournal; private MongoReadJournal(final String journalCollection, final String snapsCollection, @@ -182,7 +183,7 @@ private MongoReadJournal(final String journalCollection, this.mongoClient = mongoClient; final var materializer = SystemMaterializer.get(actorSystem).materializer(); indexInitializer = IndexInitializer.of(mongoClient.getDefaultDatabase(), materializer); - akkaReadJournal = PersistenceQuery.get(actorSystem) + pekkoReadJournal = PersistenceQuery.get(actorSystem) .getReadJournalFor(JavaDslMongoReadJournal.class, readJournalConfigurationKey); } @@ -202,15 +203,15 @@ public static MongoReadJournal newInstance(final ActorSystem system) { /** * Creates a new {@code MongoReadJournal}. * - * @param config The Akka system configuration. + * @param config The Pekko system configuration. * @param mongoClient The Mongo client wrapper. * @return A {@code MongoReadJournal} object. */ public static MongoReadJournal newInstance(final Config config, final DittoMongoClient mongoClient, final ActorSystem actorSystem) { - final String autoStartJournalKey = extractAutoStartConfigKey(config, AKKA_PERSISTENCE_JOURNAL_AUTO_START); - final String autoStartSnapsKey = extractAutoStartConfigKey(config, AKKA_PERSISTENCE_SNAPS_AUTO_START); + final String autoStartJournalKey = extractAutoStartConfigKey(config, PEKKO_PERSISTENCE_JOURNAL_AUTO_START); + final String autoStartSnapsKey = extractAutoStartConfigKey(config, PEKKO_PERSISTENCE_SNAPS_AUTO_START); final String journalCollection = getOverrideCollectionName(config.getConfig(autoStartJournalKey), JOURNAL_COLLECTION_NAME_KEY); final String snapshotCollection = @@ -601,33 +602,33 @@ public Source deleteSnapshots(final String pid, final lon public Source currentEventsByPersistenceId(final String persistenceId, final long fromSequenceNr, final long toSequenceNr) { - return akkaReadJournal.currentEventsByPersistenceId(persistenceId, fromSequenceNr, toSequenceNr); + return pekkoReadJournal.currentEventsByPersistenceId(persistenceId, fromSequenceNr, toSequenceNr); } @Override public Source currentEventsByTag(final String tag, final Offset offset) { - return akkaReadJournal.currentEventsByTag(tag, offset); + return pekkoReadJournal.currentEventsByTag(tag, offset); } @Override public Source currentPersistenceIds() { - return akkaReadJournal.currentPersistenceIds(); + return pekkoReadJournal.currentPersistenceIds(); } @Override public Source eventsByPersistenceId(final String persistenceId, final long fromSequenceNr, final long toSequenceNr) { - return akkaReadJournal.eventsByPersistenceId(persistenceId, fromSequenceNr, toSequenceNr); + return pekkoReadJournal.eventsByPersistenceId(persistenceId, fromSequenceNr, toSequenceNr); } @Override public Source eventsByTag(final String tag, final Offset offset) { - return akkaReadJournal.eventsByTag(tag, offset); + return pekkoReadJournal.eventsByTag(tag, offset); } @Override public Source persistenceIds() { - return akkaReadJournal.persistenceIds(); + return pekkoReadJournal.persistenceIds(); } private Source, NotUsed> listPidsInJournal(final MongoCollection journal, @@ -748,11 +749,13 @@ private Source listPidsInJournalOrderedByPriorityTag( " 0,\n" + " {\n" + " $subtract: [\n" + - " 1000,\n" + // assumption: max prio is 1000 - all higher prios are not correctly ordered + " 1000,\n" + + // assumption: max prio is 1000 - all higher prios are not correctly ordered " {\n" + " $strLenCP: {\n" + " $substrCP: [\n" + - " \"$$tag\", " + PRIORITY_TAG_PREFIX.length() + ", { $strLenCP: \"$$tag\" }\n" + + " \"$$tag\", " + PRIORITY_TAG_PREFIX.length() + + ", { $strLenCP: \"$$tag\" }\n" + " ]\n" + " }\n" + " }\n" + @@ -788,7 +791,7 @@ private Source listPidsInJournalOrderedByPriorityTag( if (mongoClient.getDittoSettings().isDocumentDbCompatibilityMode()) { aggregatePublisher = journal.aggregate(pipeline); } else { - aggregatePublisher = journal.aggregate(pipeline) + aggregatePublisher = journal.aggregate(pipeline) .collation(Collation.builder().locale("en_US").numericOrdering(true).build()); } @@ -842,7 +845,8 @@ private static Source listLatestJournalEntries(final MongoCol .withMaxRestarts(maxRestarts, minBackOff); return RestartSource.onFailuresWithBackoff(restartSettings, () -> Source.fromPublisher(journal.aggregate(pipeline) - .batchSize(batchSize) // use batchSize also for the cursor batchSize (16 by default bc of backpressure!) + .batchSize(batchSize) + // use batchSize also for the cursor batchSize (16 by default bc of backpressure!) ) ); } @@ -900,7 +904,7 @@ private static Source listNewestActiveSnapshotsByBatch( new Document().append("$ne", Arrays.asList("$" + LIFECYCLE, "DELETED"))) .append("then", "$$DESCEND") .append("else", includeDeleted ? "$$DESCEND" : "$$PRUNE") - ))); + ))); // group stage 2: group by max encountered pid, "push" all elements calculated in previous "redact" final String maxPid = "m"; @@ -968,20 +972,20 @@ private Source, NotUsed> getSnapshotStore() { /** * Extract the auto-start journal/snaps config from the configuration of the actor system. *

            - * It assumes that in the Akka system configuration, - * {@code akka.persistence.journal.auto-start-journals} or - * {@code akka.persistence.snapshot-store.auto-start-snapshot-stores} + * It assumes that in the Pekko system configuration, + * {@code pekko.persistence.journal.auto-start-journals} or + * {@code pekko.persistence.snapshot-store.auto-start-snapshot-stores} * contains exactly 1 configuration key, which points to the configuration of the auto-start journal/snapshot-store. * * @param config the system configuration. - * @param key either {@code akka.persistence.journal.auto-start-journals} or - * {@code akka.persistence.snapshot-store.auto-start-snapshot-stores}. + * @param key either {@code pekko.persistence.journal.auto-start-journals} or + * {@code pekko.persistence.snapshot-store.auto-start-snapshot-stores}. */ private static String extractAutoStartConfigKey(final Config config, final String key) { final List autoStartJournals = config.getStringList(key); if (autoStartJournals.size() != 1) { final String message = String.format("Expect %s to be a singleton list, but it is List(%s)", - AKKA_PERSISTENCE_JOURNAL_AUTO_START, + PEKKO_PERSISTENCE_JOURNAL_AUTO_START, String.join(", ", autoStartJournals)); throw new IllegalArgumentException(message); } else { @@ -999,7 +1003,7 @@ private static String extractAutoStartConfigKey(final Config config, final Strin * @param journalOrSnapsConfig The journal or snapshot-store configuration. * @param key Config key of the collection name. * @return The name of the event journal collection. - * @throws IllegalArgumentException if {@code akka.persistence.journal.auto-start-journal} is not a singleton list. + * @throws IllegalArgumentException if {@code pekko.persistence.journal.auto-start-journal} is not a singleton list. * @throws com.typesafe.config.ConfigException.Missing if a relevant config value is missing. * @throws com.typesafe.config.ConfigException.WrongType if a relevant config value has not the expected type. */ diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/MongoTimestampPersistence.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/MongoTimestampPersistence.java index 437b374844..62837e33c3 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/MongoTimestampPersistence.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/MongoTimestampPersistence.java @@ -20,7 +20,7 @@ import javax.annotation.Nullable; import org.bson.Document; -import org.eclipse.ditto.internal.utils.akka.streaming.TimestampPersistence; +import org.eclipse.ditto.internal.utils.pekko.streaming.TimestampPersistence; import org.eclipse.ditto.internal.utils.persistence.mongo.DittoMongoClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -30,15 +30,15 @@ import com.mongodb.reactivestreams.client.MongoCollection; import com.mongodb.reactivestreams.client.MongoDatabase; -import akka.Done; -import akka.NotUsed; -import akka.japi.Pair; -import akka.japi.pf.PFBuilder; -import akka.stream.Attributes; -import akka.stream.Materializer; -import akka.stream.javadsl.BroadcastHub; -import akka.stream.javadsl.RestartSource; -import akka.stream.javadsl.Source; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.BroadcastHub; +import org.apache.pekko.stream.javadsl.RestartSource; +import org.apache.pekko.stream.javadsl.Source; /** * MongoDB implementation of {@link TimestampPersistence}. diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/PidWithSeqNr.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/PidWithSeqNr.java index 01351313ff..d68a8178cf 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/PidWithSeqNr.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/PidWithSeqNr.java @@ -25,7 +25,7 @@ public final class PidWithSeqNr { /** * Creates a pair from {@code String} and {@code long}. * - * @param persistenceId the Akka persistence persistenceId. + * @param persistenceId the Pekko persistence persistenceId. * @param sequenceNr the sequence number. */ public PidWithSeqNr(final String persistenceId, final long sequenceNr) { diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/SnapshotFilter.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/SnapshotFilter.java index d1cc891adb..5e65b08f83 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/SnapshotFilter.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/SnapshotFilter.java @@ -22,7 +22,7 @@ import com.mongodb.client.model.Filters; -import akka.contrib.persistence.mongodb.SnapshottingFieldNames$; +import pekko.contrib.persistence.mongodb.SnapshottingFieldNames$; /** * A record that hold optional filters for retrieving snapshots from persistence. diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/operations/AbstractPersistenceOperationsActor.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/operations/AbstractPersistenceOperationsActor.java index 93f1b27f61..6bb2fcdda6 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/operations/AbstractPersistenceOperationsActor.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/operations/AbstractPersistenceOperationsActor.java @@ -37,21 +37,21 @@ import org.eclipse.ditto.base.model.namespaces.signals.commands.PurgeNamespace; import org.eclipse.ditto.base.model.namespaces.signals.commands.PurgeNamespaceResponse; import org.eclipse.ditto.base.model.signals.commands.Command; -import org.eclipse.ditto.internal.utils.akka.actors.AbstractActorWithShutdownBehavior; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.actors.AbstractActorWithShutdownBehavior; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; -import akka.Done; -import akka.actor.ActorRef; -import akka.actor.CoordinatedShutdown; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; -import akka.stream.KillSwitches; -import akka.stream.Materializer; -import akka.stream.SharedKillSwitch; -import akka.stream.javadsl.Sink; +import org.apache.pekko.Done; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.CoordinatedShutdown; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.SharedKillSwitch; +import org.apache.pekko.stream.javadsl.Sink; /** * Superclass of actors operating on the persistence at the level of namespaces. diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/operations/EntityPersistenceOperations.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/operations/EntityPersistenceOperations.java index f9f8b7f26f..ca2f5828a9 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/operations/EntityPersistenceOperations.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/operations/EntityPersistenceOperations.java @@ -17,8 +17,8 @@ import org.eclipse.ditto.base.model.entity.id.EntityId; -import akka.NotUsed; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.stream.javadsl.Source; /** * Persistence ops on entities. diff --git a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/operations/NamespacePersistenceOperations.java b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/operations/NamespacePersistenceOperations.java index 1006e45b63..18ef5489b2 100644 --- a/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/operations/NamespacePersistenceOperations.java +++ b/internal/utils/persistence/src/main/java/org/eclipse/ditto/internal/utils/persistence/operations/NamespacePersistenceOperations.java @@ -14,8 +14,8 @@ import java.util.List; -import akka.NotUsed; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.stream.javadsl.Source; /** * Persistence operations on namespaces. diff --git a/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/DefaultPersistenceStreamingActorTest.java b/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/DefaultPersistenceStreamingActorTest.java index d9a4cc6cbf..0331176de3 100644 --- a/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/DefaultPersistenceStreamingActorTest.java +++ b/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/DefaultPersistenceStreamingActorTest.java @@ -38,14 +38,14 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.stream.SourceRef; -import akka.stream.javadsl.Source; -import akka.stream.testkit.javadsl.TestSink; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.stream.SourceRef; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.testkit.javadsl.TestSink; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Test for {@link DefaultPersistenceStreamingActor}. @@ -59,7 +59,7 @@ public final class DefaultPersistenceStreamingActorTest { @BeforeClass public static void initActorSystem() { final Config config = ConfigFactory.load("test"); - actorSystem = ActorSystem.create("AkkaTestSystem", config); + actorSystem = ActorSystem.create("PekkoTestSystem", config); } @AfterClass diff --git a/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/SnapshotStreamingActorTest.java b/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/SnapshotStreamingActorTest.java index 2b4da6e8e9..eaffb0ac00 100644 --- a/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/SnapshotStreamingActorTest.java +++ b/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/SnapshotStreamingActorTest.java @@ -36,17 +36,17 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.Done; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.stream.SourceRef; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.stream.SourceRef; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Test for {@link SnapshotStreamingActor}. @@ -62,7 +62,7 @@ public final class SnapshotStreamingActorTest { @Before public void initActorSystem() { final Config config = ConfigFactory.load("test"); - actorSystem = ActorSystem.create("AkkaTestSystem", config); + actorSystem = ActorSystem.create("PekkoTestSystem", config); mockClient = Mockito.mock(DittoMongoClient.class); mockReadJournal = Mockito.mock(MongoReadJournal.class); pubSubMediatorTestProbe = TestProbe.apply("pubSubMediator", actorSystem); diff --git a/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/assertions/MongoIndexAssertions.java b/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/assertions/MongoIndexAssertions.java index 32b707a7d2..f3c48862bc 100644 --- a/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/assertions/MongoIndexAssertions.java +++ b/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/assertions/MongoIndexAssertions.java @@ -27,8 +27,8 @@ import com.mongodb.reactivestreams.client.MongoDatabase; -import akka.stream.Materializer; -import akka.stream.javadsl.Sink; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.Sink; /** * Assertion methods for Mongo indices. @@ -45,7 +45,7 @@ public class MongoIndexAssertions { * "_id"). * * @param db the Mongo database - * @param materializer the materializer for the akka actor system. + * @param materializer the materializer for the pekko actor system. * @param expectedIndices the expected indices * @see #assertIndices(MongoDatabase, String, Materializer, Collection, boolean) */ @@ -58,7 +58,7 @@ public static void assertIndices(final MongoDatabase db, final String collection * Asserts that the specified Mongo collection contains the expected indices. * * @param db the Mongo database - * @param materializer the materializer for the akka actor system. + * @param materializer the materializer for the pekko actor system. * @param expectedIndices the expected indices * @param ignoreDefaultIndex defines whether the default index (on field "_id") should be excluded from the * comparison diff --git a/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/indices/IndexInitializerIT.java b/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/indices/IndexInitializerIT.java index d499f22b7c..c311cb2a2c 100644 --- a/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/indices/IndexInitializerIT.java +++ b/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/indices/IndexInitializerIT.java @@ -36,13 +36,13 @@ import com.mongodb.MongoCommandException; -import akka.Done; -import akka.actor.ActorSystem; -import akka.stream.Materializer; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.Done; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.javadsl.TestKit; /** * MongoDB integration test for {@link IndexInitializer}. @@ -96,7 +96,7 @@ public final class IndexInitializerIT { @Before public void before() { - system = ActorSystem.create("AkkaTestSystem"); + system = ActorSystem.create("PekkoTestSystem"); materializer = SystemMaterializer.get(system).materializer(); requireNonNull(MONGO_RESOURCE); diff --git a/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/indices/IndexInitializerTest.java b/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/indices/IndexInitializerTest.java index 7c5a166ca6..1618984de1 100644 --- a/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/indices/IndexInitializerTest.java +++ b/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/indices/IndexInitializerTest.java @@ -18,7 +18,7 @@ import org.junit.Test; -import akka.stream.Materializer; +import org.apache.pekko.stream.Materializer; /** * Unit test for {@link IndexInitializer}. diff --git a/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/eventsource/MongoEventSourceITAssertions.java b/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/eventsource/MongoEventSourceITAssertions.java index f6ffc6bb4c..4ad1468bbb 100644 --- a/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/eventsource/MongoEventSourceITAssertions.java +++ b/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/ops/eventsource/MongoEventSourceITAssertions.java @@ -30,7 +30,7 @@ import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.eclipse.ditto.base.model.namespaces.signals.commands.PurgeNamespace; import org.eclipse.ditto.base.model.namespaces.signals.commands.PurgeNamespaceResponse; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.internal.utils.config.raw.RawConfigSupplier; import org.eclipse.ditto.internal.utils.persistence.mongo.config.DefaultMongoDbConfig; import org.eclipse.ditto.internal.utils.persistence.mongo.config.MongoDbConfig; @@ -44,11 +44,11 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.PoisonPill; -import akka.cluster.pubsub.DistributedPubSub; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.cluster.pubsub.DistributedPubSub; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests subclasses of {@link org.eclipse.ditto.internal.utils.persistence.operations.AbstractPersistenceOperationsActor} which provide purging by namespace on a event source @@ -115,7 +115,7 @@ protected final List getSupportedPrefixes() { * Start an entity's persistence actor. * * @param system the actor system. - * @param pubSubMediator Akka pub-sub mediator. + * @param pubSubMediator Pekko pub-sub mediator. * @param id ID of the entity. * @return reference to the entity actor. */ @@ -125,7 +125,7 @@ protected final List getSupportedPrefixes() { * Starts the NamespaceOps actor. * * @param actorSystem the actor system. - * @param pubSubMediator Akka pub-sub mediator. + * @param pubSubMediator Pekko pub-sub mediator. * @param config configuration with info about event journal, snapshot store, metadata and database. * @return reference of the NamespaceOps actor. */ @@ -175,20 +175,20 @@ protected final List getSupportedPrefixes() { protected Config getEventSourcingConfiguration() { // - do not log dead letters (i.e., events for which there is no subscriber) // - bind to random available port - // - do not attempt to join an Akka cluster + // - do not attempt to join an Pekko cluster // - do not shutdown jvm on exit (breaks unit tests) // - make Mongo URI known to the persistence plugin and to the NamespaceOps actor - final String testConfig = "akka.log-dead-letters=0\n" + - "akka.persistence.journal-plugin-fallback.circuit-breaker.call-timeout=30s\n" + - "akka.coordinated-shutdown.terminate-actor-system=off\n" + - "akka.coordinated-shutdown.run-by-actor-system-terminate=off\n" + - "akka-contrib-mongodb-persistence-policies-journal.circuit-breaker.call-timeout=30s\n" + - "akka-contrib-mongodb-persistence-things-journal.circuit-breaker.call-timeout=30s\n" + - "akka.remote.artery.bind.port=0\n" + - "akka.cluster.seed-nodes=[]\n" + - "akka.coordinated-shutdown.exit-jvm=off\n" + + final String testConfig = "pekko.log-dead-letters=0\n" + + "pekko.persistence.journal-plugin-fallback.circuit-breaker.call-timeout=30s\n" + + "pekko.coordinated-shutdown.terminate-actor-system=off\n" + + "pekko.coordinated-shutdown.run-by-actor-system-terminate=off\n" + + "pekko-contrib-mongodb-persistence-policies-journal.circuit-breaker.call-timeout=30s\n" + + "pekko-contrib-mongodb-persistence-things-journal.circuit-breaker.call-timeout=30s\n" + + "pekko.remote.artery.bind.port=0\n" + + "pekko.cluster.seed-nodes=[]\n" + + "pekko.coordinated-shutdown.exit-jvm=off\n" + "ditto.things.log-incoming-messages=true\n" + - "akka.contrib.persistence.mongodb.mongo.mongouri=\"" + mongoDbUri + "\"\n"; + "pekko.contrib.persistence.mongodb.mongo.mongouri=\"" + mongoDbUri + "\"\n"; // load the service config for info about event journal, snapshot store and metadata return ConfigFactory.parseString(testConfig).withFallback(RawConfigSupplier.of(getServiceName()).get()); diff --git a/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/MongoReadJournalIT.java b/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/MongoReadJournalIT.java index eff62e150e..addaaf81c0 100644 --- a/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/MongoReadJournalIT.java +++ b/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/MongoReadJournalIT.java @@ -45,16 +45,16 @@ import com.typesafe.config.ConfigFactory; import com.typesafe.config.ConfigValueFactory; -import akka.actor.ActorSystem; -import akka.stream.Materializer; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link MongoReadJournal}. - * CAUTION: Do not use Akka streams testkit; it does not work for Source.fromPublisher against reactive-streams client. + * CAUTION: Do not use Pekko streams testkit; it does not work for Source.fromPublisher against reactive-streams client. */ @RunWith(Parameterized.class) public final class MongoReadJournalIT { @@ -105,8 +105,8 @@ public void setUp() { final String mongoUri = String.format("mongodb://%s:%d/%s", MONGO_RESOURCE.getBindIp(), MONGO_RESOURCE.getPort(), MONGO_DB); final Config config = ConfigFactory.load("mongo-read-journal-test") - .withValue("akka.contrib.persistence.mongodb.mongo.mongouri", ConfigValueFactory.fromAnyRef(mongoUri)); - actorSystem = ActorSystem.create("AkkaTestSystem", config); + .withValue("pekko.contrib.persistence.mongodb.mongo.mongouri", ConfigValueFactory.fromAnyRef(mongoUri)); + actorSystem = ActorSystem.create("PekkoTestSystem", config); materializer = SystemMaterializer.get(actorSystem).materializer(); readJournal = MongoReadJournal.newInstance(config, mongoClient, actorSystem); } diff --git a/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/MongoTimestampPersistenceIT.java b/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/MongoTimestampPersistenceIT.java index 64fe393c3e..e31e12e68a 100644 --- a/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/MongoTimestampPersistenceIT.java +++ b/internal/utils/persistence/src/test/java/org/eclipse/ditto/internal/utils/persistence/mongo/streaming/MongoTimestampPersistenceIT.java @@ -37,12 +37,12 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; -import akka.stream.Materializer; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link MongoTimestampPersistence}. @@ -83,7 +83,7 @@ public static void stopMongoResource() { @Before public void setUp() { final Config config = ConfigFactory.load("test"); - actorSystem = ActorSystem.create("AkkaTestSystem", config); + actorSystem = ActorSystem.create("PekkoTestSystem", config); materializer = SystemMaterializer.get(actorSystem).materializer(); syncPersistence = MongoTimestampPersistence.initializedInstance(KNOWN_COLLECTION, mongoClient, materializer); } diff --git a/internal/utils/persistence/src/test/resources/logback-test.xml b/internal/utils/persistence/src/test/resources/logback-test.xml index bb7c75a0cc..01dc8d2353 100644 --- a/internal/utils/persistence/src/test/resources/logback-test.xml +++ b/internal/utils/persistence/src/test/resources/logback-test.xml @@ -5,14 +5,14 @@ - %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{akkaSource} - %msg%n + %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{pekkoSource} - %msg%n System.err - %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{akkaSource} - %msg%n + %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{pekkoSource} - %msg%n ERROR diff --git a/internal/utils/persistence/src/test/resources/mongo-read-journal-test.conf b/internal/utils/persistence/src/test/resources/mongo-read-journal-test.conf index 1905bbf9f7..07166c7027 100644 --- a/internal/utils/persistence/src/test/resources/mongo-read-journal-test.conf +++ b/internal/utils/persistence/src/test/resources/mongo-read-journal-test.conf @@ -1,20 +1,20 @@ // mongo URI set in test ditto = {} -akka.contrib.persistence.mongodb.mongo.mongouri = null +pekko.contrib.persistence.mongodb.mongo.mongouri = null -akka { +pekko { persistence { journal.auto-start-journals = [ - "akka-contrib-mongodb-persistence-test-journal" + "pekko-contrib-mongodb-persistence-test-journal" ] snapshot-store.auto-start-snapshot-stores = [ - "akka-contrib-mongodb-persistence-test-snapshots" + "pekko-contrib-mongodb-persistence-test-snapshots" ] } } -akka-contrib-mongodb-persistence-test-journal { - class = "akka.contrib.persistence.mongodb.MongoJournal" +pekko-contrib-mongodb-persistence-test-journal { + class = "pekko.contrib.persistence.mongodb.MongoJournal" ask-timeout = 10s @@ -32,8 +32,8 @@ akka-contrib-mongodb-persistence-test-journal { } } -akka-contrib-mongodb-persistence-test-journal-read { - class = "akka.contrib.persistence.mongodb.MongoReadJournal" +pekko-contrib-mongodb-persistence-test-journal-read { + class = "pekko.contrib.persistence.mongodb.MongoReadJournal" overrides { journal-collection = "test_journal" @@ -43,8 +43,8 @@ akka-contrib-mongodb-persistence-test-journal-read { } } -akka-contrib-mongodb-persistence-test-snapshots { - class = "akka.contrib.persistence.mongodb.MongoSnapshots" +pekko-contrib-mongodb-persistence-test-snapshots { + class = "pekko.contrib.persistence.mongodb.MongoSnapshots" ask-timeout = 10s diff --git a/internal/utils/persistence/src/test/resources/test.conf b/internal/utils/persistence/src/test/resources/test.conf index cd714bab1a..13b4416e86 100644 --- a/internal/utils/persistence/src/test/resources/test.conf +++ b/internal/utils/persistence/src/test/resources/test.conf @@ -20,10 +20,10 @@ ditto { } } -akka { - loggers = ["akka.event.slf4j.Slf4jLogger"] +pekko { + loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"] loglevel = "WARNING" - logging-filter = "akka.event.slf4j.Slf4jLoggingFilter" + logging-filter = "org.apache.pekko.event.slf4j.Slf4jLoggingFilter" # for log messages during the actor system is starting up and shutting down: stdout-loglevel = "WARNING" @@ -35,7 +35,7 @@ akka { coordinated-shutdown.run-by-actor-system-terminate = off actor { - provider = "akka.cluster.ClusterActorRefProvider" + provider = "org.apache.pekko.cluster.ClusterActorRefProvider" enable-additional-serialization-bindings = on # this is only intended for testing. @@ -46,7 +46,7 @@ akka { lifecycle = on } - guardian-supervisor-strategy = "akka.actor.StoppingSupervisorStrategy" + guardian-supervisor-strategy = "org.apache.pekko.actor.StoppingSupervisorStrategy" deployment { } @@ -76,7 +76,7 @@ akka { cluster { metrics.enabled = off - seed-nodes = ["akka://AkkaTestSystem@"${akka.remote.artery.canonical.hostname}":"${akka.remote.artery.canonical.port}] + seed-nodes = ["pekko://PekkoTestSystem@"${pekko.remote.artery.canonical.hostname}":"${pekko.remote.artery.canonical.port}] roles = [ ] @@ -99,22 +99,22 @@ akka { default-timeout = 5s calling-thread-dispatcher { - type = akka.testkit.CallingThreadDispatcherConfigurator + type = org.apache.pekko.testkit.CallingThreadDispatcherConfigurator } } persistence { journal.auto-start-journals = [ - "akka-contrib-mongodb-persistence-test-journal" + "pekko-contrib-mongodb-persistence-test-journal" ] snapshot-store.auto-start-snapshot-stores = [ - "akka-contrib-mongodb-persistence-test-snapshots" + "pekko-contrib-mongodb-persistence-test-snapshots" ] } } -akka-contrib-mongodb-persistence-test-journal { - class = "akka.persistence.inmemory.journal.InMemoryAsyncWriteJournal" +pekko-contrib-mongodb-persistence-test-journal { + class = "org.apache.pekko.persistence.inmemory.journal.InMemoryAsyncWriteJournal" ask-timeout = 10s @@ -132,8 +132,8 @@ akka-contrib-mongodb-persistence-test-journal { } } -akka-contrib-mongodb-persistence-test-journal-read { - class = "akka.contrib.persistence.mongodb.MongoReadJournal" +pekko-contrib-mongodb-persistence-test-journal-read { + class = "pekko.contrib.persistence.mongodb.MongoReadJournal" overrides { journal-collection = "test_journal" @@ -143,8 +143,8 @@ akka-contrib-mongodb-persistence-test-journal-read { } } -akka-contrib-mongodb-persistence-test-snapshots { - class = "akka.persistence.inmemory.snapshot.InMemorySnapshotStore" +pekko-contrib-mongodb-persistence-test-snapshots { + class = "org.apache.pekko.persistence.inmemory.snapshot.InMemorySnapshotStore" ask-timeout = 10s } diff --git a/internal/utils/persistent-actors/pom.xml b/internal/utils/persistent-actors/pom.xml index add1be551b..6483935dee 100644 --- a/internal/utils/persistent-actors/pom.xml +++ b/internal/utils/persistent-actors/pom.xml @@ -44,7 +44,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko org.eclipse.ditto @@ -61,12 +61,12 @@ - com.typesafe.akka - akka-actor_${scala.version} + org.apache.pekko + pekko-actor_${scala.version} - com.typesafe.akka - akka-persistence_${scala.version} + org.apache.pekko + pekko-persistence_${scala.version} @@ -76,8 +76,8 @@ test - com.typesafe.akka - akka-stream-testkit_${scala.version} + org.apache.pekko + pekko-stream-testkit_${scala.version} test @@ -86,8 +86,8 @@ test - com.typesafe.akka - akka-slf4j_${scala.version} + org.apache.pekko + pekko-slf4j_${scala.version} test diff --git a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistenceActor.java b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistenceActor.java index d4f5e9cd6a..ef1e65210e 100755 --- a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistenceActor.java +++ b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistenceActor.java @@ -40,9 +40,9 @@ import org.eclipse.ditto.base.model.signals.commands.Command; import org.eclipse.ditto.base.model.signals.events.EventsourcedEvent; import org.eclipse.ditto.base.model.signals.events.GlobalEventRegistry; -import org.eclipse.ditto.internal.utils.akka.PingCommand; -import org.eclipse.ditto.internal.utils.akka.PingCommandResponse; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.PingCommand; +import org.eclipse.ditto.internal.utils.pekko.PingCommandResponse; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; import org.eclipse.ditto.internal.utils.config.ScopedConfig; import org.eclipse.ditto.internal.utils.namespaces.BlockedNamespaces; import org.eclipse.ditto.internal.utils.persistence.SnapshotAdapter; @@ -64,19 +64,19 @@ import org.eclipse.ditto.json.JsonObject; import org.eclipse.ditto.json.JsonValue; -import akka.actor.ActorRef; -import akka.actor.Cancellable; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; -import akka.persistence.RecoveryCompleted; -import akka.persistence.RecoveryTimedOut; -import akka.persistence.SaveSnapshotFailure; -import akka.persistence.SaveSnapshotSuccess; -import akka.persistence.SnapshotOffer; -import akka.persistence.SnapshotProtocol; -import akka.persistence.SnapshotSelectionCriteria; -import akka.persistence.query.EventEnvelope; -import akka.stream.javadsl.Sink; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Cancellable; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.persistence.RecoveryCompleted; +import org.apache.pekko.persistence.RecoveryTimedOut; +import org.apache.pekko.persistence.SaveSnapshotFailure; +import org.apache.pekko.persistence.SaveSnapshotSuccess; +import org.apache.pekko.persistence.SnapshotOffer; +import org.apache.pekko.persistence.SnapshotProtocol; +import org.apache.pekko.persistence.SnapshotSelectionCriteria; +import org.apache.pekko.persistence.query.EventEnvelope; +import org.apache.pekko.stream.javadsl.Sink; import scala.Option; /** diff --git a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistenceSupervisor.java b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistenceSupervisor.java index d1493354a5..d5b8c5b110 100644 --- a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistenceSupervisor.java +++ b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistenceSupervisor.java @@ -48,9 +48,9 @@ import org.eclipse.ditto.base.service.config.supervision.LocalAskTimeoutConfig; import org.eclipse.ditto.base.service.signaltransformer.SignalTransformer; import org.eclipse.ditto.base.service.signaltransformer.SignalTransformers; -import org.eclipse.ditto.internal.utils.akka.actors.AbstractActorWithStashWithTimers; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.actors.AbstractActorWithStashWithTimers; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.cluster.StopShardedActor; import org.eclipse.ditto.internal.utils.config.ScopedConfig; import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; @@ -67,25 +67,25 @@ import com.typesafe.config.Config; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.OneForOneStrategy; -import akka.actor.PoisonPill; -import akka.actor.Props; -import akka.actor.ReceiveTimeout; -import akka.actor.Status; -import akka.actor.SupervisorStrategy; -import akka.actor.Terminated; -import akka.cluster.sharding.ShardRegion; -import akka.japi.pf.DeciderBuilder; -import akka.japi.pf.FI; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.AskTimeoutException; -import akka.pattern.Patterns; -import akka.persistence.query.EventEnvelope; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.StreamRefs; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.OneForOneStrategy; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.ReceiveTimeout; +import org.apache.pekko.actor.Status; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.actor.Terminated; +import org.apache.pekko.cluster.sharding.ShardRegion; +import org.apache.pekko.japi.pf.DeciderBuilder; +import org.apache.pekko.japi.pf.FI; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.AskTimeoutException; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.persistence.query.EventEnvelope; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.StreamRefs; /** * Sharded Supervisor of persistent actors. It: @@ -432,7 +432,7 @@ protected CompletionStage askEnforcerChild(final Signal signal) { /** * Asks the "target actor" (being either the {@link AbstractPersistenceActor} for "twin" commands or e.g. a * pub/sub actor reference for "live" commands/messages) - which is determined by - * {@link #getTargetActorForSendingEnforcedMessageTo(Object, boolean, akka.actor.ActorRef)} - the passed {@code message}. + * {@link #getTargetActorForSendingEnforcedMessageTo(Object, boolean, org.apache.pekko.actor.ActorRef)} - the passed {@code message}. * * @param message the message to ask the target actor. * @param shouldSendResponse whether the message should send a response or not. diff --git a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistentActorWithTimersAndCleanup.java b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistentActorWithTimersAndCleanup.java index 670594d048..82c39dccf5 100644 --- a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistentActorWithTimersAndCleanup.java +++ b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistentActorWithTimersAndCleanup.java @@ -21,19 +21,19 @@ import org.eclipse.ditto.base.model.entity.id.EntityId; import org.eclipse.ditto.base.model.entity.type.EntityType; import org.eclipse.ditto.base.model.headers.DittoHeaders; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; - -import akka.actor.ActorRef; -import akka.persistence.AbstractPersistentActorWithTimers; -import akka.persistence.DeleteMessagesFailure; -import akka.persistence.DeleteMessagesSuccess; -import akka.persistence.DeleteSnapshotsFailure; -import akka.persistence.DeleteSnapshotsSuccess; -import akka.persistence.JournalProtocol; -import akka.persistence.Protocol; -import akka.persistence.SnapshotProtocol; -import akka.persistence.SnapshotSelectionCriteria; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; + +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.persistence.AbstractPersistentActorWithTimers; +import org.apache.pekko.persistence.DeleteMessagesFailure; +import org.apache.pekko.persistence.DeleteMessagesSuccess; +import org.apache.pekko.persistence.DeleteSnapshotsFailure; +import org.apache.pekko.persistence.DeleteSnapshotsSuccess; +import org.apache.pekko.persistence.JournalProtocol; +import org.apache.pekko.persistence.Protocol; +import org.apache.pekko.persistence.SnapshotProtocol; +import org.apache.pekko.persistence.SnapshotSelectionCriteria; /** * Extends {@code AbstractPersistentActorWithTimers} to provide functionality to handle the {@link CleanupPersistence} diff --git a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/PersistencePingActor.java b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/PersistencePingActor.java index 213f9dec80..8e3b59c954 100644 --- a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/PersistencePingActor.java +++ b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/PersistencePingActor.java @@ -20,23 +20,23 @@ import org.eclipse.ditto.base.model.entity.id.EntityId; import org.eclipse.ditto.base.model.entity.type.EntityType; import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; -import org.eclipse.ditto.internal.utils.akka.PingCommand; -import org.eclipse.ditto.internal.utils.akka.PingCommandResponse; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.PingCommand; +import org.eclipse.ditto.internal.utils.pekko.PingCommandResponse; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.persistence.mongo.streaming.MongoReadJournal; import org.eclipse.ditto.internal.utils.persistentactors.config.PingConfig; import org.eclipse.ditto.internal.utils.persistentactors.config.RateConfig; import org.eclipse.ditto.json.JsonValue; -import akka.NotUsed; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.Cancellable; -import akka.actor.Props; -import akka.japi.pf.ReceiveBuilder; -import akka.stream.Materializer; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Cancellable; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.Source; /** * Actor which pings an {@link AbstractPersistenceActor}s containing journal entries tagged with @@ -103,12 +103,12 @@ private PersistencePingActor(final ActorRef persistenceActorShardRegion, final P } /** - * Creates Akka configuration object Props for this Actor. + * Creates Pekko configuration object Props for this Actor. * * @param persistenceActorShardRegion the shard region of the target PersistenceActor. * @param pingConfig the Configuration to apply for this ping actor. * @param readJournal readJournal to extract current PIDs from. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final ActorRef persistenceActorShardRegion, final PingConfig pingConfig, final MongoReadJournal readJournal) { @@ -117,12 +117,12 @@ public static Props props(final ActorRef persistenceActorShardRegion, final Ping } /** - * Creates Akka configuration object Props for this Actor. + * Creates Pekko configuration object Props for this Actor. * * @param persistenceActorShardRegion the shard region of the target PersistenceActor. * @param pingConfig the Configuration to apply for this ping actor. * @param persistenceIdsSourceSupplier supplier of persistence id sources. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ static Props propsForTests(final ActorRef persistenceActorShardRegion, final PingConfig pingConfig, final Supplier> persistenceIdsSourceSupplier) { diff --git a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/TargetActorWithMessage.java b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/TargetActorWithMessage.java index e3c3a7d689..dd56bf85ec 100644 --- a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/TargetActorWithMessage.java +++ b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/TargetActorWithMessage.java @@ -15,7 +15,7 @@ import java.time.Duration; import java.util.function.Function; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * A supervisor internal message combining a {@code targetActor} as target for a contained {@code message} and diff --git a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/Cleanup.java b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/Cleanup.java index 08ba16a535..b6604ce4a2 100644 --- a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/Cleanup.java +++ b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/Cleanup.java @@ -23,13 +23,13 @@ import org.eclipse.ditto.internal.utils.persistence.mongo.streaming.MongoReadJournal; -import akka.NotUsed; -import akka.japi.Pair; -import akka.stream.Materializer; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.Source; /** - * An Akka stream to handle background cleanup regulated by insert times. + * An Pekko stream to handle background cleanup regulated by insert times. */ final class Cleanup { diff --git a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/ClusterResponsibilitySupplier.java b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/ClusterResponsibilitySupplier.java index 0e95a2f2b5..fa866f419a 100644 --- a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/ClusterResponsibilitySupplier.java +++ b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/ClusterResponsibilitySupplier.java @@ -16,10 +16,10 @@ import java.util.function.Supplier; import java.util.stream.StreamSupport; -import akka.cluster.Cluster; -import akka.cluster.Member; -import akka.cluster.UniqueAddress; -import akka.japi.Pair; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.Member; +import org.apache.pekko.cluster.UniqueAddress; +import org.apache.pekko.japi.Pair; /** * Responsibility supplier according to cluster role. diff --git a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/Credits.java b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/Credits.java index 5b0a911680..6ad4112bc9 100644 --- a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/Credits.java +++ b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/Credits.java @@ -15,14 +15,14 @@ import java.time.Duration; import java.util.concurrent.atomic.LongAccumulator; -import org.eclipse.ditto.internal.utils.akka.controlflow.Transistor; +import org.eclipse.ditto.internal.utils.pekko.controlflow.Transistor; import org.eclipse.ditto.internal.utils.metrics.mongo.MongoMetricsBuilder; -import akka.NotUsed; -import akka.event.LoggingAdapter; -import akka.stream.SourceShape; -import akka.stream.javadsl.GraphDSL; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.event.LoggingAdapter; +import org.apache.pekko.stream.SourceShape; +import org.apache.pekko.stream.javadsl.GraphDSL; +import org.apache.pekko.stream.javadsl.Source; final class Credits { diff --git a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/PersistenceCleanupActor.java b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/PersistenceCleanupActor.java index 680471a24f..9502a1c301 100644 --- a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/PersistenceCleanupActor.java +++ b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/PersistenceCleanupActor.java @@ -20,10 +20,10 @@ import org.eclipse.ditto.base.api.common.ModifyConfig; import org.eclipse.ditto.base.api.common.RetrieveConfig; import org.eclipse.ditto.base.model.headers.DittoHeaders; -import org.eclipse.ditto.internal.utils.akka.actors.ModifyConfigBehavior; -import org.eclipse.ditto.internal.utils.akka.actors.RetrieveConfigBehavior; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.actors.ModifyConfigBehavior; +import org.eclipse.ditto.internal.utils.pekko.actors.RetrieveConfigBehavior; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.health.RetrieveHealth; import org.eclipse.ditto.internal.utils.health.RetrieveHealthResponse; import org.eclipse.ditto.internal.utils.health.StatusDetailMessage; @@ -37,22 +37,22 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.Done; -import akka.actor.AbstractFSM; -import akka.actor.ActorRef; -import akka.actor.CoordinatedShutdown; -import akka.actor.FSM; -import akka.actor.Props; -import akka.cluster.Cluster; -import akka.japi.Pair; -import akka.japi.pf.FSMStateFunctionBuilder; -import akka.pattern.Patterns; -import akka.stream.Attributes; -import akka.stream.KillSwitches; -import akka.stream.Materializer; -import akka.stream.UniqueKillSwitch; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Sink; +import org.apache.pekko.Done; +import org.apache.pekko.actor.AbstractFSM; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.CoordinatedShutdown; +import org.apache.pekko.actor.FSM; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.japi.pf.FSMStateFunctionBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.UniqueKillSwitch; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Sink; /** * Actor to control persistence cleanup. diff --git a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/commands/CommandStrategy.java b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/commands/CommandStrategy.java index fd815acb7e..6b95f99f17 100644 --- a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/commands/CommandStrategy.java +++ b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/commands/CommandStrategy.java @@ -18,10 +18,10 @@ import org.eclipse.ditto.base.model.signals.commands.Command; import org.eclipse.ditto.base.model.signals.events.Event; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; import org.eclipse.ditto.internal.utils.persistentactors.results.Result; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * The CommandStrategy interface. diff --git a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/commands/DefaultContext.java b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/commands/DefaultContext.java index 9428a3228a..799257c0cb 100644 --- a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/commands/DefaultContext.java +++ b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/commands/DefaultContext.java @@ -18,9 +18,9 @@ import javax.annotation.concurrent.Immutable; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Holds the context required to execute the diff --git a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/commands/package-info.java b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/commands/package-info.java index b04b042618..076481b038 100644 --- a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/commands/package-info.java +++ b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/commands/package-info.java @@ -12,7 +12,7 @@ */ /** - * Analogous to "command" handling of Akka Typed Persistence. + * Analogous to "command" handling of Pekko Typed Persistence. */ @org.eclipse.ditto.utils.jsr305.annotations.AllValuesAreNonnullByDefault package org.eclipse.ditto.internal.utils.persistentactors.commands; diff --git a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/events/package-info.java b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/events/package-info.java index 3139faaad2..80b17c4f19 100644 --- a/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/events/package-info.java +++ b/internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/events/package-info.java @@ -12,7 +12,7 @@ */ /** - * Analogous to "event" handling of Akka Typed Persistence. + * Analogous to "event" handling of Pekko Typed Persistence. */ @org.eclipse.ditto.utils.jsr305.annotations.AllValuesAreNonnullByDefault package org.eclipse.ditto.internal.utils.persistentactors.events; diff --git a/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistentActorWithTimersAndCleanupTest.java b/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistentActorWithTimersAndCleanupTest.java index fbe1772d97..dfe3a362e0 100644 --- a/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistentActorWithTimersAndCleanupTest.java +++ b/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistentActorWithTimersAndCleanupTest.java @@ -33,12 +33,12 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.japi.Creator; -import akka.persistence.SaveSnapshotSuccess; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.Creator; +import org.apache.pekko.persistence.SaveSnapshotSuccess; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link AbstractPersistentActorWithTimersAndCleanup}. diff --git a/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/MockJournalPlugin.java b/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/MockJournalPlugin.java index 3167275643..cc076d5084 100644 --- a/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/MockJournalPlugin.java +++ b/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/MockJournalPlugin.java @@ -21,9 +21,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.persistence.AtomicWrite; -import akka.persistence.PersistentRepr; -import akka.persistence.journal.japi.AsyncWriteJournal; +import org.apache.pekko.persistence.AtomicWrite; +import org.apache.pekko.persistence.PersistentRepr; +import org.apache.pekko.persistence.journal.japi.AsyncWriteJournal; import scala.compat.java8.FutureConverters; import scala.concurrent.Future; diff --git a/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/MockSnapshotStorePlugin.java b/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/MockSnapshotStorePlugin.java index 7d726c7186..c53e974628 100644 --- a/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/MockSnapshotStorePlugin.java +++ b/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/MockSnapshotStorePlugin.java @@ -23,10 +23,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.persistence.SelectedSnapshot; -import akka.persistence.SnapshotMetadata; -import akka.persistence.SnapshotSelectionCriteria; -import akka.persistence.snapshot.japi.SnapshotStore; +import org.apache.pekko.persistence.SelectedSnapshot; +import org.apache.pekko.persistence.SnapshotMetadata; +import org.apache.pekko.persistence.SnapshotSelectionCriteria; +import org.apache.pekko.persistence.snapshot.japi.SnapshotStore; import scala.compat.java8.FutureConverters; import scala.concurrent.Future; diff --git a/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/PersistencePingActorTest.java b/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/PersistencePingActorTest.java index 3c5f734757..b690417413 100644 --- a/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/PersistencePingActorTest.java +++ b/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/PersistencePingActorTest.java @@ -19,7 +19,7 @@ import java.util.concurrent.TimeUnit; import org.eclipse.ditto.policies.model.PolicyId; -import org.eclipse.ditto.internal.utils.akka.PingCommand; +import org.eclipse.ditto.internal.utils.pekko.PingCommand; import org.eclipse.ditto.internal.utils.persistentactors.config.DefaultPingConfig; import org.eclipse.ditto.internal.utils.persistentactors.config.PingConfig; import org.junit.AfterClass; @@ -29,12 +29,12 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.stream.javadsl.Source; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link PersistencePingActor}. @@ -47,7 +47,7 @@ public final class PersistencePingActorTest { @BeforeClass public static void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem", CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", CONFIG); } @AfterClass diff --git a/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/CleanupTest.java b/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/CleanupTest.java index 3f74f0ac52..2fd7ef4711 100644 --- a/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/CleanupTest.java +++ b/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/CleanupTest.java @@ -34,13 +34,13 @@ import com.mongodb.client.result.DeleteResult; -import akka.actor.ActorSystem; -import akka.japi.Pair; -import akka.stream.Materializer; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link Cleanup}. diff --git a/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/CreditsTest.java b/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/CreditsTest.java index e64b21507b..47d1ab820d 100644 --- a/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/CreditsTest.java +++ b/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/CreditsTest.java @@ -35,19 +35,19 @@ import com.mongodb.client.result.DeleteResult; -import akka.actor.ActorSystem; -import akka.event.Logging; -import akka.japi.Pair; -import akka.stream.Attributes; -import akka.stream.Materializer; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Source; -import akka.stream.testkit.TestPublisher; -import akka.stream.testkit.TestSubscriber; -import akka.stream.testkit.javadsl.TestSink; -import akka.stream.testkit.javadsl.TestSource; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.event.Logging; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.testkit.TestPublisher; +import org.apache.pekko.stream.testkit.TestSubscriber; +import org.apache.pekko.stream.testkit.javadsl.TestSink; +import org.apache.pekko.stream.testkit.javadsl.TestSource; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link Credits}. diff --git a/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/PersistenceCleanupActorTest.java b/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/PersistenceCleanupActorTest.java index a19c430bdf..5830a36586 100644 --- a/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/PersistenceCleanupActorTest.java +++ b/internal/utils/persistent-actors/src/test/java/org/eclipse/ditto/internal/utils/persistentactors/cleanup/PersistenceCleanupActorTest.java @@ -45,20 +45,20 @@ import com.typesafe.config.ConfigFactory; import com.typesafe.config.ConfigRenderOptions; -import akka.Done; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.FSM; -import akka.actor.Props; -import akka.event.Logging; -import akka.japi.Pair; -import akka.stream.Attributes; -import akka.stream.KillSwitches; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Source; -import akka.stream.testkit.javadsl.TestSource; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.FSM; +import org.apache.pekko.actor.Props; +import org.apache.pekko.event.Logging; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.testkit.javadsl.TestSource; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link PersistenceCleanupActor}. diff --git a/internal/utils/persistent-actors/src/test/resources/test.conf b/internal/utils/persistent-actors/src/test/resources/test.conf index b20f018872..144005715e 100644 --- a/internal/utils/persistent-actors/src/test/resources/test.conf +++ b/internal/utils/persistent-actors/src/test/resources/test.conf @@ -1,7 +1,7 @@ -akka { - loggers = ["akka.event.slf4j.Slf4jLogger"] +pekko { + loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"] loglevel = "DEBUG" - logging-filter = "akka.event.DefaultLoggingFilter" + logging-filter = "org.apache.pekko.event.DefaultLoggingFilter" logger-startup-timeout = 60s # for log messages during the actor system is starting up and shutting down: @@ -12,15 +12,15 @@ akka { coordinated-shutdown.run-by-actor-system-terminate = off } -akka.persistence.journal.plugin = "mock-journal" -akka.persistence.snapshot-store.plugin = "mock-snapshot-store" +pekko.persistence.journal.plugin = "mock-journal" +pekko.persistence.snapshot-store.plugin = "mock-snapshot-store" mock-journal { class = "org.eclipse.ditto.internal.utils.persistentactors.MockJournalPlugin" - plugin-dispatcher = "akka.actor.default-dispatcher" + plugin-dispatcher = "pekko.actor.default-dispatcher" } mock-snapshot-store { class = "org.eclipse.ditto.internal.utils.persistentactors.MockSnapshotStorePlugin" - plugin-dispatcher = "akka.persistence.dispatchers.default-plugin-dispatcher" + plugin-dispatcher = "pekko.persistence.dispatchers.default-plugin-dispatcher" } diff --git a/internal/utils/pom.xml b/internal/utils/pom.xml index ad97fa9264..541e144da9 100755 --- a/internal/utils/pom.xml +++ b/internal/utils/pom.xml @@ -26,7 +26,7 @@ Eclipse Ditto :: Internal :: Utils - akka + pekko cache cache-loaders cluster diff --git a/internal/utils/protocol/src/main/java/org/eclipse/ditto/internal/utils/protocol/ProtocolAdapterProvider.java b/internal/utils/protocol/src/main/java/org/eclipse/ditto/internal/utils/protocol/ProtocolAdapterProvider.java index 7637d61057..6f4a6182fd 100644 --- a/internal/utils/protocol/src/main/java/org/eclipse/ditto/internal/utils/protocol/ProtocolAdapterProvider.java +++ b/internal/utils/protocol/src/main/java/org/eclipse/ditto/internal/utils/protocol/ProtocolAdapterProvider.java @@ -25,9 +25,9 @@ import org.eclipse.ditto.protocol.adapter.ProtocolAdapter; import org.eclipse.ditto.utils.jsr305.annotations.AllValuesAreNonnullByDefault; -import akka.actor.ActorSystem; -import akka.actor.DynamicAccess; -import akka.actor.ExtendedActorSystem; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.DynamicAccess; +import org.apache.pekko.actor.ExtendedActorSystem; import scala.Tuple2; import scala.jdk.javaapi.CollectionConverters; import scala.reflect.ClassTag; @@ -55,7 +55,7 @@ protected ProtocolAdapterProvider(final ProtocolConfig protocolConfig) { * This calls the 1-argument constructor every subclass of ProtocolAdapterProvider should implement. * * @param protocolConfig provides the class name of the ProtocolAdapterProvider to be loaded. - * @param actorSystem Akka actor system to perform reflection with. + * @param actorSystem Pekko actor system to perform reflection with. * @return the loaded protocol adapter provider. */ public static ProtocolAdapterProvider load(final ProtocolConfig protocolConfig, final ActorSystem actorSystem) { diff --git a/internal/utils/protocol/src/test/java/org/eclipse/ditto/internal/utils/protocol/ProtocolAdapterProviderTest.java b/internal/utils/protocol/src/test/java/org/eclipse/ditto/internal/utils/protocol/ProtocolAdapterProviderTest.java index 139dbc7153..c3c4bc0746 100644 --- a/internal/utils/protocol/src/test/java/org/eclipse/ditto/internal/utils/protocol/ProtocolAdapterProviderTest.java +++ b/internal/utils/protocol/src/test/java/org/eclipse/ditto/internal/utils/protocol/ProtocolAdapterProviderTest.java @@ -23,7 +23,7 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Unit test for {@link ProtocolAdapterProvider}. diff --git a/internal/utils/pubsub-policies/src/main/java/org/eclipse/ditto/internal/utils/pubsubpolicies/PolicyAnnouncementPubSubFactory.java b/internal/utils/pubsub-policies/src/main/java/org/eclipse/ditto/internal/utils/pubsubpolicies/PolicyAnnouncementPubSubFactory.java index af3ebef68f..7a70b444fb 100644 --- a/internal/utils/pubsub-policies/src/main/java/org/eclipse/ditto/internal/utils/pubsubpolicies/PolicyAnnouncementPubSubFactory.java +++ b/internal/utils/pubsub-policies/src/main/java/org/eclipse/ditto/internal/utils/pubsubpolicies/PolicyAnnouncementPubSubFactory.java @@ -17,8 +17,8 @@ import org.eclipse.ditto.internal.utils.pubsub.extractors.AckExtractor; import org.eclipse.ditto.policies.model.signals.announcements.PolicyAnnouncement; -import akka.actor.ActorRefFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.ActorSystem; /** * Pub-sub factory for policy announcements. diff --git a/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/DittoProtocolSub.java b/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/DittoProtocolSub.java index 21c88db3be..a0692cf64e 100644 --- a/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/DittoProtocolSub.java +++ b/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/DittoProtocolSub.java @@ -22,9 +22,9 @@ import org.eclipse.ditto.base.model.acks.AcknowledgementLabel; import org.eclipse.ditto.internal.utils.pubsub.StreamingType; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Extension; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Extension; /** * Subscriptions for Ditto protocol channels. diff --git a/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/DittoProtocolSubImpl.java b/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/DittoProtocolSubImpl.java index 661ec64a1d..20f5bc64d2 100644 --- a/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/DittoProtocolSubImpl.java +++ b/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/DittoProtocolSubImpl.java @@ -34,10 +34,10 @@ import org.eclipse.ditto.internal.utils.pubsub.api.SubAck; import org.eclipse.ditto.internal.utils.pubsubpolicies.PolicyAnnouncementPubSubFactory; -import akka.actor.AbstractExtensionId; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; +import org.apache.pekko.actor.AbstractExtensionId; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; /** * Default implementation of {@link DittoProtocolSub}. diff --git a/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/LiveSignalPub.java b/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/LiveSignalPub.java index f9cfb4d9bc..bf9efbff99 100644 --- a/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/LiveSignalPub.java +++ b/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/LiveSignalPub.java @@ -18,7 +18,7 @@ import org.eclipse.ditto.things.model.signals.commands.ThingCommand; import org.eclipse.ditto.things.model.signals.events.ThingEvent; -import akka.actor.ActorContext; +import org.apache.pekko.actor.ActorContext; /** * Publishing of all live signals. diff --git a/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/LiveSignalPubImpl.java b/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/LiveSignalPubImpl.java index 4760433649..ce8114eb3d 100644 --- a/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/LiveSignalPubImpl.java +++ b/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/LiveSignalPubImpl.java @@ -23,7 +23,7 @@ import org.eclipse.ditto.things.model.signals.commands.ThingCommand; import org.eclipse.ditto.things.model.signals.events.ThingEvent; -import akka.actor.ActorContext; +import org.apache.pekko.actor.ActorContext; /** * Default implementation of {@link LiveSignalPub}. diff --git a/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/LiveSignalPubSubFactory.java b/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/LiveSignalPubSubFactory.java index c05ae5e6f3..dc091185b3 100644 --- a/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/LiveSignalPubSubFactory.java +++ b/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/LiveSignalPubSubFactory.java @@ -25,9 +25,9 @@ import org.eclipse.ditto.internal.utils.pubsub.extractors.ReadSubjectExtractor; import org.eclipse.ditto.things.model.ThingId; -import akka.actor.ActorContext; -import akka.actor.ActorRefFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorContext; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.ActorSystem; /** * Pub-sub factory for live signals. diff --git a/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/ThingEventPubSubFactory.java b/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/ThingEventPubSubFactory.java index a5a506d017..7e2e143275 100644 --- a/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/ThingEventPubSubFactory.java +++ b/internal/utils/pubsub-things/src/main/java/org/eclipse/ditto/internal/utils/pubsubthings/ThingEventPubSubFactory.java @@ -24,9 +24,9 @@ import org.eclipse.ditto.internal.utils.pubsub.extractors.ShardIdExtractor; import org.eclipse.ditto.things.model.signals.events.ThingEvent; -import akka.actor.ActorContext; -import akka.actor.ActorRefFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorContext; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.ActorSystem; /** * Pub-sub factory for thing events. diff --git a/internal/utils/pubsub/pom.xml b/internal/utils/pubsub/pom.xml index ec0bc934b3..88f110d720 100755 --- a/internal/utils/pubsub/pom.xml +++ b/internal/utils/pubsub/pom.xml @@ -27,7 +27,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko org.eclipse.ditto @@ -39,8 +39,8 @@ - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/AbstractPubSubFactory.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/AbstractPubSubFactory.java index dfddb572f4..d5c5dc5dda 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/AbstractPubSubFactory.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/AbstractPubSubFactory.java @@ -23,11 +23,11 @@ import org.eclipse.ditto.internal.utils.pubsub.extractors.AckExtractor; import org.eclipse.ditto.internal.utils.pubsub.extractors.PubSubTopicExtractor; -import akka.actor.ActorRef; -import akka.actor.ActorRefFactory; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.actor.Props; /** * Creator of pub-sub access. Should not be instantiated more than once per instance. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedAcks.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedAcks.java index c27a4db685..05d44f0f0a 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedAcks.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedAcks.java @@ -21,10 +21,10 @@ import org.eclipse.ditto.internal.utils.ddata.DistributedDataConfig; import org.eclipse.ditto.internal.utils.pubsub.api.AcksDeclared; -import akka.actor.ActorContext; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Extension; +import org.apache.pekko.actor.ActorContext; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Extension; /** * Interface to access the local and distributed data of declared acknowledgement labels. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedAcksEmptyImpl.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedAcksEmptyImpl.java index f11e2d62aa..ed7fc0f189 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedAcksEmptyImpl.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedAcksEmptyImpl.java @@ -22,8 +22,8 @@ import org.eclipse.ditto.internal.utils.ddata.DistributedDataConfig; import org.eclipse.ditto.internal.utils.pubsub.api.AcksDeclared; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; /** * An implementation of {@link DistributedAcks} diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedAcksImpl.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedAcksImpl.java index e316a9c2fc..95dd69e11f 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedAcksImpl.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedAcksImpl.java @@ -32,14 +32,14 @@ import org.eclipse.ditto.internal.utils.pubsub.api.RemoveSubscriberAcks; import org.eclipse.ditto.internal.utils.pubsub.ddata.literal.LiteralDData; -import akka.actor.AbstractExtensionId; -import akka.actor.ActorContext; -import akka.actor.ActorRef; -import akka.actor.ActorRefFactory; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.actor.Props; -import akka.pattern.Patterns; +import org.apache.pekko.actor.AbstractExtensionId; +import org.apache.pekko.actor.ActorContext; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.pattern.Patterns; /** * Package-private implementation of {@link DistributedAcks}. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedPub.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedPub.java index ad7862fda8..185e33083b 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedPub.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedPub.java @@ -18,7 +18,7 @@ import org.eclipse.ditto.internal.utils.pubsub.extractors.AckExtractor; import org.eclipse.ditto.internal.utils.pubsub.extractors.PubSubTopicExtractor; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * A jolly locale for the spreading of news. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedPubImpl.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedPubImpl.java index ac8453e264..dab2a608c8 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedPubImpl.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedPubImpl.java @@ -20,7 +20,7 @@ import org.eclipse.ditto.internal.utils.pubsub.extractors.AckExtractor; import org.eclipse.ditto.internal.utils.pubsub.extractors.PubSubTopicExtractor; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Package-private implementation of {@link DistributedPub} for publication access from an already-started diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedPubWithTopicExtractor.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedPubWithTopicExtractor.java index 26af7d48ea..882da36573 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedPubWithTopicExtractor.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedPubWithTopicExtractor.java @@ -20,7 +20,7 @@ import org.eclipse.ditto.internal.utils.pubsub.extractors.AckExtractor; import org.eclipse.ditto.internal.utils.pubsub.extractors.PubSubTopicExtractor; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Package-private implementation of {@link DistributedPub} for publication access from an {@link DistributedPub} diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedSub.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedSub.java index 082f0203f8..1dbe9bb3a2 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedSub.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedSub.java @@ -21,7 +21,7 @@ import org.eclipse.ditto.internal.utils.ddata.DistributedDataConfig; import org.eclipse.ditto.internal.utils.pubsub.api.SubAck; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Access point for Ditto pub-sub subscribers. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedSubImpl.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedSubImpl.java index 6220253684..0fcc9d9e80 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedSubImpl.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/DistributedSubImpl.java @@ -29,8 +29,8 @@ import org.eclipse.ditto.internal.utils.pubsub.api.Subscribe; import org.eclipse.ditto.internal.utils.pubsub.api.Unsubscribe; -import akka.actor.ActorRef; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.pattern.Patterns; /** * Package-private implementation of {@link DistributedSub}. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/LiteralDDataProvider.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/LiteralDDataProvider.java index 48d7496735..821000a75f 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/LiteralDDataProvider.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/LiteralDDataProvider.java @@ -17,8 +17,8 @@ import org.eclipse.ditto.internal.utils.pubsub.ddata.literal.AbstractConfigAwareDDataProvider; import org.eclipse.ditto.internal.utils.pubsub.ddata.literal.LiteralDDataHandler; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; /** * Literal DData provider. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/StreamingType.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/StreamingType.java index 7f520e7670..89b7e80590 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/StreamingType.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/StreamingType.java @@ -20,7 +20,7 @@ /** * Enumeration of the different types which can be streamed (e.g. to an open Websocket connection). Each - * type is also aware of the key used for distributed pub/sub in the Akka cluster. + * type is also aware of the key used for distributed pub/sub in the Pekko cluster. */ public enum StreamingType { @@ -64,7 +64,7 @@ public enum StreamingType { } /** - * @return the key used for distributed pub/sub in the Akka cluster for this StreamingType. + * @return the key used for distributed pub/sub in the Pekko cluster for this StreamingType. */ public String getDistributedPubSubTopic() { return distributedPubSubTopic; diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/AbstractPubSubSupervisor.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/AbstractPubSubSupervisor.java index fd344d844b..c45938dd7d 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/AbstractPubSubSupervisor.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/AbstractPubSubSupervisor.java @@ -16,18 +16,18 @@ import java.util.Collection; import java.util.List; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.pubsub.config.PubSubConfig; import org.eclipse.ditto.internal.utils.pubsub.ddata.Hashes; -import akka.actor.AbstractActorWithTimers; -import akka.actor.ActorRef; -import akka.actor.AllForOneStrategy; -import akka.actor.Props; -import akka.actor.SupervisorStrategy; -import akka.event.DiagnosticLoggingAdapter; -import akka.japi.pf.DeciderBuilder; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.AllForOneStrategy; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.japi.pf.DeciderBuilder; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Supervisor of actors dealing with pub-sub featuring an all-for-one supervision strategy with delayed restart diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/AbstractSubscriber.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/AbstractSubscriber.java index 9601abac50..6d919e4586 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/AbstractSubscriber.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/AbstractSubscriber.java @@ -22,8 +22,8 @@ import org.eclipse.ditto.base.model.headers.DittoHeaderDefinition; import org.eclipse.ditto.base.model.signals.Signal; import org.eclipse.ditto.base.model.signals.acks.Acknowledgements; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; import org.eclipse.ditto.internal.utils.metrics.instruments.counter.Counter; import org.eclipse.ditto.internal.utils.pubsub.DistributedAcks; @@ -34,11 +34,11 @@ import org.eclipse.ditto.internal.utils.pubsub.extractors.AckExtractor; import org.eclipse.ditto.internal.utils.pubsub.extractors.PubSubTopicExtractor; -import akka.actor.AbstractActorWithTimers; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.japi.Pair; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Super class of actors that distributes messages to local subscribers diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/AckSupervisor.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/AckSupervisor.java index 22852f89b1..c5f6e37e5e 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/AckSupervisor.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/AckSupervisor.java @@ -18,12 +18,12 @@ import org.eclipse.ditto.internal.utils.pubsub.ddata.DData; import org.eclipse.ditto.internal.utils.pubsub.ddata.literal.LiteralUpdate; -import akka.actor.ActorRef; -import akka.actor.Address; -import akka.actor.Props; -import akka.actor.Terminated; -import akka.cluster.Cluster; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Address; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Terminated; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Supervisor of AckUpdater. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/AckUpdater.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/AckUpdater.java index 5cbd76da6b..9252f01adf 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/AckUpdater.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/AckUpdater.java @@ -27,8 +27,8 @@ import org.eclipse.ditto.base.model.acks.AcknowledgementLabelNotUniqueException; import org.eclipse.ditto.base.model.acks.PubSubTerminatedException; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; import org.eclipse.ditto.internal.utils.metrics.instruments.gauge.Gauge; import org.eclipse.ditto.internal.utils.pubsub.api.AcksDeclared; @@ -46,16 +46,16 @@ import org.eclipse.ditto.internal.utils.pubsub.ddata.literal.LiteralUpdate; import org.eclipse.ditto.json.JsonValue; -import akka.actor.AbstractActorWithTimers; -import akka.actor.ActorRef; -import akka.actor.Address; -import akka.actor.Props; -import akka.actor.Terminated; -import akka.cluster.Cluster; -import akka.cluster.ddata.Key; -import akka.cluster.ddata.ORMultiMap; -import akka.cluster.ddata.Replicator; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Address; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Terminated; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.ddata.Key; +import org.apache.pekko.cluster.ddata.ORMultiMap; +import org.apache.pekko.cluster.ddata.Replicator; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Manage the local and remote ternary relation between actors, group names and declared acknowledgement labels. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/ClusterMemberRemovedAware.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/ClusterMemberRemovedAware.java index 054d67f7b8..bd5f5694b0 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/ClusterMemberRemovedAware.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/ClusterMemberRemovedAware.java @@ -14,13 +14,13 @@ import org.eclipse.ditto.internal.utils.pubsub.ddata.DDataWriter; -import akka.actor.AbstractActor; -import akka.actor.Actor; -import akka.cluster.Cluster; -import akka.cluster.ClusterEvent; -import akka.cluster.ddata.Replicator; -import akka.event.LoggingAdapter; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.Actor; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.ClusterEvent; +import org.apache.pekko.cluster.ddata.Replicator; +import org.apache.pekko.event.LoggingAdapter; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Mixin to subscribe for cluster events. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/ClusterStateSyncBehavior.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/ClusterStateSyncBehavior.java index 8471ef376a..f500be0600 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/ClusterStateSyncBehavior.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/ClusterStateSyncBehavior.java @@ -19,23 +19,23 @@ import java.util.stream.Stream; import java.util.stream.StreamSupport; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.pubsub.config.PubSubConfig; import org.eclipse.ditto.internal.utils.pubsub.ddata.DData; -import akka.actor.AbstractActor; -import akka.actor.Actor; -import akka.actor.ActorRef; -import akka.actor.Address; -import akka.actor.Timers; -import akka.cluster.Cluster; -import akka.cluster.ClusterEvent; -import akka.cluster.Member; -import akka.cluster.MemberStatus; -import akka.cluster.ddata.ORMultiMap; -import akka.cluster.ddata.Replicator; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.Actor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Address; +import org.apache.pekko.actor.Timers; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.ClusterEvent; +import org.apache.pekko.cluster.Member; +import org.apache.pekko.cluster.MemberStatus; +import org.apache.pekko.cluster.ddata.ORMultiMap; +import org.apache.pekko.cluster.ddata.Replicator; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; /** * Mixin to subscribe for cluster events. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/PubSupervisor.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/PubSupervisor.java index b99954e018..e454d004f6 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/PubSupervisor.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/PubSupervisor.java @@ -17,10 +17,10 @@ import org.eclipse.ditto.internal.utils.pubsub.DistributedAcks; import org.eclipse.ditto.internal.utils.pubsub.ddata.DData; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.Terminated; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Terminated; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Supervisor of actors dealing with publications. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/PubUpdater.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/PubUpdater.java index 9d3ec4ff36..aaececd4db 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/PubUpdater.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/PubUpdater.java @@ -12,18 +12,18 @@ */ package org.eclipse.ditto.internal.utils.pubsub.actors; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.pubsub.ddata.DDataWriter; -import akka.actor.AbstractActorWithTimers; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.event.LoggingAdapter; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.event.LoggingAdapter; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** - * Remove remote subscriber on cluster event {@link akka.cluster.ClusterEvent.MemberRemoved}. + * Remove remote subscriber on cluster event {@link org.apache.pekko.cluster.ClusterEvent.MemberRemoved}. */ public final class PubUpdater extends AbstractActorWithTimers implements ClusterMemberRemovedAware { diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/Publisher.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/Publisher.java index 0eba3c1d8e..18790f1be3 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/Publisher.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/Publisher.java @@ -27,8 +27,8 @@ import org.eclipse.ditto.base.model.headers.WithDittoHeaders; import org.eclipse.ditto.base.model.signals.Signal; import org.eclipse.ditto.base.model.signals.acks.Acknowledgements; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; import org.eclipse.ditto.internal.utils.metrics.instruments.counter.Counter; import org.eclipse.ditto.internal.utils.pubsub.DistributedAcks; @@ -40,15 +40,15 @@ import org.eclipse.ditto.json.JsonObject; import org.eclipse.ditto.json.JsonValue; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.Props; -import akka.cluster.ddata.Key; -import akka.cluster.ddata.ORMultiMap; -import akka.cluster.ddata.Replicator; -import akka.japi.Pair; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.ddata.Key; +import org.apache.pekko.cluster.ddata.ORMultiMap; +import org.apache.pekko.cluster.ddata.Replicator; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.japi.pf.ReceiveBuilder; import scala.jdk.javaapi.CollectionConverters; /** diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/PublisherIndex.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/PublisherIndex.java index 5b9cf956be..451dceb7e9 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/PublisherIndex.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/PublisherIndex.java @@ -31,8 +31,8 @@ import org.eclipse.ditto.internal.utils.pubsub.ddata.SubscriptionsReader; import org.eclipse.ditto.internal.utils.pubsub.ddata.ack.Grouped; -import akka.actor.ActorRef; -import akka.japi.Pair; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.japi.Pair; /** * Index for publishing to a set of subscribers with groups. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/SubSubscriber.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/SubSubscriber.java index 0efe6fae2d..88c89bf508 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/SubSubscriber.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/SubSubscriber.java @@ -17,7 +17,7 @@ import org.eclipse.ditto.internal.utils.pubsub.extractors.AckExtractor; import org.eclipse.ditto.internal.utils.pubsub.extractors.PubSubTopicExtractor; -import akka.actor.Props; +import org.apache.pekko.actor.Props; /** * Actor that distributes messages to local subscribers. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/SubSupervisor.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/SubSupervisor.java index 6a32928264..ba21f1275b 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/SubSupervisor.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/SubSupervisor.java @@ -20,10 +20,10 @@ import org.eclipse.ditto.internal.utils.pubsub.api.Request; import org.eclipse.ditto.internal.utils.pubsub.ddata.compressed.CompressedDData; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.Terminated; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Terminated; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Supervisor of actors dealing with subscriptions. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/SubUpdater.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/SubUpdater.java index 4ac000d57c..3705a30c3e 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/SubUpdater.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/SubUpdater.java @@ -26,8 +26,8 @@ import java.util.stream.Stream; import org.eclipse.ditto.base.model.acks.PubSubTerminatedException; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; import org.eclipse.ditto.internal.utils.metrics.instruments.gauge.Gauge; import org.eclipse.ditto.internal.utils.pubsub.api.RemoveSubscriber; @@ -43,14 +43,15 @@ import org.eclipse.ditto.internal.utils.pubsub.ddata.compressed.CompressedSubscriptions; import org.eclipse.ditto.internal.utils.pubsub.ddata.literal.LiteralUpdate; -import akka.actor.ActorRef; -import akka.actor.Address; -import akka.actor.Props; -import akka.actor.Status; -import akka.actor.Terminated; -import akka.cluster.Cluster; -import akka.cluster.ddata.Replicator; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Address; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.actor.Terminated; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.ddata.Replicator; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Manages local subscriptions. Request distributed data update at regular intervals at the highest write consistency @@ -59,7 +60,7 @@ * the cluster once requested. Local subscribers should most likely not to get any published message before they * receive acknowledgement. */ -public final class SubUpdater extends akka.actor.AbstractActorWithTimers +public final class SubUpdater extends AbstractActorWithTimers implements ClusterStateSyncBehavior { /** diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/Subscriber.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/Subscriber.java index cd51f00631..dfd80a5b1a 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/Subscriber.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/actors/Subscriber.java @@ -26,15 +26,15 @@ import org.eclipse.ditto.internal.utils.pubsub.extractors.AckExtractor; import org.eclipse.ditto.internal.utils.pubsub.extractors.PubSubTopicExtractor; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.OneForOneStrategy; -import akka.actor.Props; -import akka.actor.SupervisorStrategy; -import akka.actor.Terminated; -import akka.cluster.Cluster; -import akka.japi.pf.DeciderBuilder; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.OneForOneStrategy; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.actor.Terminated; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.japi.pf.DeciderBuilder; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Actor that distributes messages to local subscribers, triggers synchronization of declared acknowledgements, diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/AbstractRequest.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/AbstractRequest.java index 07058ef0fc..157584f08b 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/AbstractRequest.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/AbstractRequest.java @@ -15,7 +15,7 @@ import java.util.Collection; import java.util.Set; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Abstract base class for subscription requests. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/AcksDeclared.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/AcksDeclared.java index 941e3b2060..5aa3a6d7e2 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/AcksDeclared.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/AcksDeclared.java @@ -12,7 +12,7 @@ */ package org.eclipse.ditto.internal.utils.pubsub.api; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Reply for acknowledgement label declaration. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/DeclareAcks.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/DeclareAcks.java index 32822ae190..ef4c31742c 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/DeclareAcks.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/DeclareAcks.java @@ -17,7 +17,7 @@ import javax.annotation.Nullable; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Request to declare a set of acknowledgement labels with an optional group. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/LocalAcksChanged.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/LocalAcksChanged.java index 4e3a2ba84b..5328ce3da0 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/LocalAcksChanged.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/LocalAcksChanged.java @@ -14,7 +14,7 @@ import org.eclipse.ditto.internal.utils.pubsub.ddata.ack.GroupedSnapshot; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Local message sent to whomever is interested in changes to local acknowledgement label declarations. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/ReceiveAckChanges.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/ReceiveAckChanges.java index 7ebee71c38..75686d98fd 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/ReceiveAckChanges.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/ReceiveAckChanges.java @@ -12,7 +12,7 @@ */ package org.eclipse.ditto.internal.utils.pubsub.api; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Abstract super class of change notification requests for {@code AckUpdater}. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/ReceiveLocalAcks.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/ReceiveLocalAcks.java index c3f131f66b..49e501d3e3 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/ReceiveLocalAcks.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/ReceiveLocalAcks.java @@ -12,7 +12,7 @@ */ package org.eclipse.ditto.internal.utils.pubsub.api; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Request to receive local acknowledgement label declaration changes. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/ReceiveRemoteAcks.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/ReceiveRemoteAcks.java index 19ee63ae74..7e5a3806fa 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/ReceiveRemoteAcks.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/ReceiveRemoteAcks.java @@ -12,7 +12,7 @@ */ package org.eclipse.ditto.internal.utils.pubsub.api; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Request to receive remote acknowledgement label declaration changes. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/RemoteAcksChanged.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/RemoteAcksChanged.java index 0f42d72098..b4e9deecdb 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/RemoteAcksChanged.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/RemoteAcksChanged.java @@ -23,7 +23,7 @@ import org.eclipse.ditto.internal.utils.pubsub.ddata.ack.Grouped; -import akka.actor.Address; +import org.apache.pekko.actor.Address; /** * Notification that the distributed data of acknowledgement label declaration changed. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/RemoveSubscriber.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/RemoveSubscriber.java index dbe5803ce3..4d7def1ea2 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/RemoveSubscriber.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/RemoveSubscriber.java @@ -14,7 +14,7 @@ import java.util.Collections; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Request to remove a subscriber. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/RemoveSubscriberAcks.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/RemoveSubscriberAcks.java index c2ed89291d..0252b8f694 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/RemoveSubscriberAcks.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/RemoveSubscriberAcks.java @@ -12,7 +12,7 @@ */ package org.eclipse.ditto.internal.utils.pubsub.api; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Remove declared acknowledgement labels of a subscriber. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/SubAck.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/SubAck.java index 52a8c79238..28f56f3364 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/SubAck.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/SubAck.java @@ -14,7 +14,7 @@ import java.util.Objects; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Acknowledgement for subscription requests. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/Subscribe.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/Subscribe.java index 81545420ce..34b9e0d208 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/Subscribe.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/Subscribe.java @@ -18,7 +18,7 @@ import javax.annotation.Nullable; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Request to subscribe to topics. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/Unsubscribe.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/Unsubscribe.java index f66455cf4e..6ee4644bd0 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/Unsubscribe.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/api/Unsubscribe.java @@ -14,7 +14,7 @@ import java.util.Collection; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Request to unsubscribe to topics. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/config/PubSubConfig.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/config/PubSubConfig.java index 3424dd9144..6b71286010 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/config/PubSubConfig.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/config/PubSubConfig.java @@ -19,7 +19,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Configuration for distributed data update. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/AbstractDDataHandler.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/AbstractDDataHandler.java index a886054f51..c3f7974c3e 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/AbstractDDataHandler.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/AbstractDDataHandler.java @@ -22,15 +22,15 @@ import org.eclipse.ditto.internal.utils.ddata.DistributedData; import org.eclipse.ditto.internal.utils.ddata.DistributedDataConfig; -import akka.actor.ActorRef; -import akka.actor.ActorRefFactory; -import akka.actor.ActorSystem; -import akka.cluster.Cluster; -import akka.cluster.ddata.Key; -import akka.cluster.ddata.ORMultiMap; -import akka.cluster.ddata.ORMultiMapKey; -import akka.cluster.ddata.Replicator; -import akka.cluster.ddata.SelfUniqueAddress; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.ddata.Key; +import org.apache.pekko.cluster.ddata.ORMultiMap; +import org.apache.pekko.cluster.ddata.ORMultiMapKey; +import org.apache.pekko.cluster.ddata.Replicator; +import org.apache.pekko.cluster.ddata.SelfUniqueAddress; /** * A distributed collection of approximations of strings indexed by keys like ActorRef. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/AbstractSubscriptions.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/AbstractSubscriptions.java index a9e68c587a..bda85672f3 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/AbstractSubscriptions.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/AbstractSubscriptions.java @@ -25,8 +25,8 @@ import javax.annotation.Nullable; import javax.annotation.concurrent.NotThreadSafe; -import akka.actor.ActorRef; -import akka.japi.Pair; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.japi.Pair; /** * Consistence-maintenance part of all subscriptions. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/DDataReader.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/DDataReader.java index 904bb9effa..80d6d9dad6 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/DDataReader.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/DDataReader.java @@ -16,11 +16,11 @@ import java.util.Optional; import java.util.concurrent.CompletionStage; -import akka.actor.ActorRef; -import akka.actor.Address; -import akka.cluster.ddata.Key; -import akka.cluster.ddata.ORMultiMap; -import akka.cluster.ddata.Replicator; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Address; +import org.apache.pekko.cluster.ddata.Key; +import org.apache.pekko.cluster.ddata.ORMultiMap; +import org.apache.pekko.cluster.ddata.Replicator; /** * Reader of distributed Bloom filters of subscribed topics. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/DDataWriter.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/DDataWriter.java index c2f0b8bae1..1a6fe76cf7 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/DDataWriter.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/DDataWriter.java @@ -14,8 +14,8 @@ import java.util.concurrent.CompletionStage; -import akka.actor.Address; -import akka.cluster.ddata.Replicator; +import org.apache.pekko.actor.Address; +import org.apache.pekko.cluster.ddata.Replicator; /** * Writer of a distributed subscriber-topic relation. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/Subscriptions.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/Subscriptions.java index b9b783d7cd..8ddff17685 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/Subscriptions.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/Subscriptions.java @@ -18,7 +18,7 @@ import javax.annotation.Nullable; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Write operations for a collection of local subscriptions. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/SubscriptionsReader.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/SubscriptionsReader.java index f4a461a574..faa3a96499 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/SubscriptionsReader.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/SubscriptionsReader.java @@ -17,7 +17,7 @@ import java.util.Set; import java.util.stream.Collectors; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Reader of local subscriptions. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/TopicData.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/TopicData.java index a50fa47cf5..566c668d5d 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/TopicData.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/TopicData.java @@ -18,7 +18,7 @@ import javax.annotation.concurrent.NotThreadSafe; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Set of subscribers of a topic together with its hashes. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/ack/Grouped.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/ack/Grouped.java index cbd3b1efcb..18f555c5a8 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/ack/Grouped.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/ack/Grouped.java @@ -31,8 +31,8 @@ import org.eclipse.ditto.json.JsonObject; import org.eclipse.ditto.json.JsonValue; -import akka.cluster.ddata.ORMultiMap; -import akka.japi.Pair; +import org.apache.pekko.cluster.ddata.ORMultiMap; +import org.apache.pekko.japi.Pair; import scala.jdk.javaapi.CollectionConverters; /** diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/compressed/CompressedDData.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/compressed/CompressedDData.java index c05170a5a6..9c66b31d24 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/compressed/CompressedDData.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/compressed/CompressedDData.java @@ -21,9 +21,9 @@ import org.eclipse.ditto.internal.utils.pubsub.ddata.DDataWriter; import org.eclipse.ditto.internal.utils.pubsub.ddata.literal.LiteralUpdate; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.cluster.ddata.ORMultiMap; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.cluster.ddata.ORMultiMap; /** * Access to distributed data of compressed topics. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/compressed/CompressedDDataHandler.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/compressed/CompressedDDataHandler.java index 1e8d49b050..66916245b5 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/compressed/CompressedDDataHandler.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/compressed/CompressedDDataHandler.java @@ -22,12 +22,12 @@ import org.eclipse.ditto.internal.utils.pubsub.ddata.Hashes; import org.eclipse.ditto.internal.utils.pubsub.ddata.literal.LiteralUpdate; -import akka.actor.ActorRef; -import akka.actor.ActorRefFactory; -import akka.actor.ActorSystem; -import akka.actor.Address; -import akka.cluster.ddata.ORMultiMap; -import akka.cluster.ddata.Replicator; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Address; +import org.apache.pekko.cluster.ddata.ORMultiMap; +import org.apache.pekko.cluster.ddata.Replicator; /** * A distributed collection of hashes of strings indexed by ActorRef. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/compressed/CompressedSubscriptions.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/compressed/CompressedSubscriptions.java index fa5121f864..5161a5d4b4 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/compressed/CompressedSubscriptions.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/compressed/CompressedSubscriptions.java @@ -29,7 +29,7 @@ import org.eclipse.ditto.internal.utils.pubsub.ddata.TopicData; import org.eclipse.ditto.internal.utils.pubsub.ddata.ack.Grouped; -import akka.actor.ActorRef; +import org.apache.pekko.actor.ActorRef; /** * Local subscriptions for distribution of subscribed topics as hash code sequences. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/literal/AbstractConfigAwareDDataProvider.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/literal/AbstractConfigAwareDDataProvider.java index 2263053db4..8712c3fccd 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/literal/AbstractConfigAwareDDataProvider.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/literal/AbstractConfigAwareDDataProvider.java @@ -15,9 +15,9 @@ import org.eclipse.ditto.internal.utils.ddata.DistributedData; import org.eclipse.ditto.internal.utils.ddata.DistributedDataConfig; -import akka.actor.ActorSystem; -import akka.actor.Address; -import akka.cluster.ddata.ORMultiMap; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Address; +import org.apache.pekko.cluster.ddata.ORMultiMap; /** * Abstract class of distributed data extension provider to be instantiated at user site. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/literal/LiteralDData.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/literal/LiteralDData.java index 34ff08c0b2..da80d6593e 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/literal/LiteralDData.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/literal/LiteralDData.java @@ -17,8 +17,8 @@ import org.eclipse.ditto.internal.utils.pubsub.ddata.DDataReader; import org.eclipse.ditto.internal.utils.pubsub.ddata.DDataWriter; -import akka.actor.ActorSystem; -import akka.actor.Address; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Address; /** * Access to distributed data of literal topics. diff --git a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/literal/LiteralDDataHandler.java b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/literal/LiteralDDataHandler.java index 8636ca5ee2..946b53cdc6 100644 --- a/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/literal/LiteralDDataHandler.java +++ b/internal/utils/pubsub/src/main/java/org/eclipse/ditto/internal/utils/pubsub/ddata/literal/LiteralDDataHandler.java @@ -18,10 +18,10 @@ import org.eclipse.ditto.internal.utils.ddata.DistributedDataConfig; import org.eclipse.ditto.internal.utils.pubsub.ddata.AbstractDDataHandler; -import akka.actor.ActorRefFactory; -import akka.actor.ActorSystem; -import akka.actor.Address; -import akka.cluster.ddata.Replicator; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Address; +import org.apache.pekko.cluster.ddata.Replicator; /** * A distributed collection of strings indexed by ActorRef. diff --git a/internal/utils/pubsub/src/main/resources/reference.conf b/internal/utils/pubsub/src/main/resources/reference.conf index 9ad41cdb11..8de97c94d9 100644 --- a/internal/utils/pubsub/src/main/resources/reference.conf +++ b/internal/utils/pubsub/src/main/resources/reference.conf @@ -35,6 +35,6 @@ Is now the two hours' traffic of our stage. } } -akka.cluster.distributed-data { +pekko.cluster.distributed-data { notify-subscribers-interval = 100ms // very small, for responsiveness } diff --git a/internal/utils/pubsub/src/test/java/org/eclipse/ditto/internal/utils/pubsub/PubSubFactoryTest.java b/internal/utils/pubsub/src/test/java/org/eclipse/ditto/internal/utils/pubsub/PubSubFactoryTest.java index ccbbf21d9f..685a588ee4 100644 --- a/internal/utils/pubsub/src/test/java/org/eclipse/ditto/internal/utils/pubsub/PubSubFactoryTest.java +++ b/internal/utils/pubsub/src/test/java/org/eclipse/ditto/internal/utils/pubsub/PubSubFactoryTest.java @@ -56,21 +56,21 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.AbstractActor; -import akka.actor.ActorContext; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.PoisonPill; -import akka.actor.Props; -import akka.actor.Terminated; -import akka.cluster.Cluster; -import akka.cluster.ClusterEvent; -import akka.japi.pf.ReceiveBuilder; -import akka.stream.Attributes; -import akka.testkit.TestActor; -import akka.testkit.TestActorRef; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorContext; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Terminated; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.ClusterEvent; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.testkit.TestActor; +import org.apache.pekko.testkit.TestActorRef; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.concurrent.duration.Duration; /** diff --git a/internal/utils/pubsub/src/test/java/org/eclipse/ditto/internal/utils/pubsub/TestPubSubFactory.java b/internal/utils/pubsub/src/test/java/org/eclipse/ditto/internal/utils/pubsub/TestPubSubFactory.java index 1d0da2b183..7bdf52897d 100644 --- a/internal/utils/pubsub/src/test/java/org/eclipse/ditto/internal/utils/pubsub/TestPubSubFactory.java +++ b/internal/utils/pubsub/src/test/java/org/eclipse/ditto/internal/utils/pubsub/TestPubSubFactory.java @@ -27,10 +27,10 @@ import org.eclipse.ditto.internal.utils.pubsub.extractors.AckExtractor; import org.eclipse.ditto.internal.utils.pubsub.extractors.PubSubTopicExtractor; -import akka.actor.ActorContext; -import akka.actor.ActorRef; -import akka.cluster.ddata.ORMultiMap; -import akka.cluster.ddata.Replicator; +import org.apache.pekko.actor.ActorContext; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.cluster.ddata.ORMultiMap; +import org.apache.pekko.cluster.ddata.Replicator; /** * Pub-sub factory for tests. Messages are strings. Topics of a message are its prefixes. diff --git a/internal/utils/pubsub/src/test/java/org/eclipse/ditto/internal/utils/pubsub/actors/AckUpdaterTest.java b/internal/utils/pubsub/src/test/java/org/eclipse/ditto/internal/utils/pubsub/actors/AckUpdaterTest.java index 4cb17c3850..37886be3cc 100644 --- a/internal/utils/pubsub/src/test/java/org/eclipse/ditto/internal/utils/pubsub/actors/AckUpdaterTest.java +++ b/internal/utils/pubsub/src/test/java/org/eclipse/ditto/internal/utils/pubsub/actors/AckUpdaterTest.java @@ -48,14 +48,14 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Address; -import akka.cluster.Cluster; -import akka.cluster.ddata.ORMultiMap; -import akka.cluster.ddata.Replicator; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Address; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.ddata.ORMultiMap; +import org.apache.pekko.cluster.ddata.Replicator; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link AckUpdater}. @@ -230,7 +230,7 @@ public void clusterStateOutOfSync() { // the current cluster member final var config = PubSubConfig.of(system1); final var ownAddress = Cluster.get(system1).selfAddress(); - final var nonexistentAddress = Address.apply("akka", "unknown-system"); + final var nonexistentAddress = Address.apply("pekko", "unknown-system"); final var addressMap = Map.of(nonexistentAddress, "unknown-value"); final DData ddata = mockDistributedData(addressMap); final ActorRef underTest = system1.actorOf(AckUpdater.props(config, ownAddress, ddata)); diff --git a/internal/utils/pubsub/src/test/java/org/eclipse/ditto/internal/utils/pubsub/actors/SubUpdaterTest.java b/internal/utils/pubsub/src/test/java/org/eclipse/ditto/internal/utils/pubsub/actors/SubUpdaterTest.java index 98bdc6e605..6a3777e416 100644 --- a/internal/utils/pubsub/src/test/java/org/eclipse/ditto/internal/utils/pubsub/actors/SubUpdaterTest.java +++ b/internal/utils/pubsub/src/test/java/org/eclipse/ditto/internal/utils/pubsub/actors/SubUpdaterTest.java @@ -38,13 +38,13 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.cluster.Cluster; -import akka.cluster.ddata.ORMultiMap; -import akka.cluster.ddata.Replicator; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.ddata.ORMultiMap; +import org.apache.pekko.cluster.ddata.Replicator; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link SubUpdater}. diff --git a/internal/utils/pubsub/src/test/resources/pubsub-factory-test.conf b/internal/utils/pubsub/src/test/resources/pubsub-factory-test.conf index 670a4d525b..09862f7a41 100644 --- a/internal/utils/pubsub/src/test/resources/pubsub-factory-test.conf +++ b/internal/utils/pubsub/src/test/resources/pubsub-factory-test.conf @@ -1,4 +1,4 @@ -akka { +pekko { loglevel = OFF actor { @@ -50,7 +50,7 @@ ditto { number-of-shards = 5 } } -akka.cluster.distributed-data { +pekko.cluster.distributed-data { gossip-interval = 100ms notify-subscribers-interval = 100ms } diff --git a/internal/utils/search/pom.xml b/internal/utils/search/pom.xml index 1c3d5d05bf..4ba38b33c7 100755 --- a/internal/utils/search/pom.xml +++ b/internal/utils/search/pom.xml @@ -39,7 +39,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko org.eclipse.ditto @@ -47,13 +47,13 @@ - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test - com.typesafe.akka - akka-stream-testkit_${scala.version} + org.apache.pekko + pekko-stream-testkit_${scala.version} test diff --git a/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/SearchSource.java b/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/SearchSource.java index 38fa14f01e..fbc7edbbe1 100644 --- a/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/SearchSource.java +++ b/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/SearchSource.java @@ -24,10 +24,10 @@ import org.eclipse.ditto.base.model.exceptions.DittoInternalErrorException; import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; import org.eclipse.ditto.base.model.headers.DittoHeaders; -import org.eclipse.ditto.internal.utils.akka.controlflow.ResumeSource; -import org.eclipse.ditto.internal.utils.akka.controlflow.ResumeSourceBuilder; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.controlflow.ResumeSource; +import org.eclipse.ditto.internal.utils.pekko.controlflow.ResumeSourceBuilder; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.json.JsonArray; import org.eclipse.ditto.json.JsonCollectors; @@ -42,18 +42,18 @@ import org.eclipse.ditto.thingsearch.api.commands.sudo.StreamThings; import org.eclipse.ditto.thingsearch.api.events.ThingsOutOfSync; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.japi.Pair; -import akka.japi.pf.PFBuilder; -import akka.pattern.Patterns; -import akka.stream.Graph; -import akka.stream.RemoteStreamRefActorTerminatedException; -import akka.stream.SourceRef; -import akka.stream.SourceShape; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.Graph; +import org.apache.pekko.stream.RemoteStreamRefActorTerminatedException; +import org.apache.pekko.stream.SourceRef; +import org.apache.pekko.stream.SourceShape; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Source; /** * Source of search results for one query. diff --git a/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/SearchSourceBuilder.java b/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/SearchSourceBuilder.java index 1c3fe57158..7cbaef4481 100644 --- a/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/SearchSourceBuilder.java +++ b/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/SearchSourceBuilder.java @@ -41,8 +41,8 @@ import org.eclipse.ditto.thingsearch.model.SortOptionEntry; import org.eclipse.ditto.thingsearch.model.signals.commands.exceptions.InvalidOptionException; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; /** * Builder for {@link SearchSource}. diff --git a/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/SubscriptionActor.java b/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/SubscriptionActor.java index eff8252c4d..af2f702cfe 100644 --- a/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/SubscriptionActor.java +++ b/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/SubscriptionActor.java @@ -17,9 +17,9 @@ import org.eclipse.ditto.base.model.exceptions.DittoInternalErrorException; import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; import org.eclipse.ditto.base.model.headers.DittoHeaders; -import org.eclipse.ditto.internal.utils.akka.actors.AbstractActorWithStashWithTimers; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.actors.AbstractActorWithStashWithTimers; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.json.JsonArray; import org.eclipse.ditto.thingsearch.model.signals.commands.ThingSearchCommand; import org.eclipse.ditto.thingsearch.model.signals.commands.exceptions.SubscriptionProtocolErrorException; @@ -33,11 +33,11 @@ import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; -import akka.actor.ActorRef; -import akka.actor.PoisonPill; -import akka.actor.Props; -import akka.actor.ReceiveTimeout; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.ReceiveTimeout; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Actor that translates subscription commands into stream operations and stream signals into subscription events. diff --git a/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/SubscriptionManager.java b/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/SubscriptionManager.java index fc1a1604b2..68e4d27559 100644 --- a/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/SubscriptionManager.java +++ b/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/SubscriptionManager.java @@ -22,8 +22,8 @@ import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; import org.eclipse.ditto.base.service.config.limits.DefaultLimitsConfig; import org.eclipse.ditto.base.service.config.limits.LimitsConfig; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; import org.eclipse.ditto.json.JsonArray; import org.eclipse.ditto.json.JsonCollectors; @@ -39,15 +39,15 @@ import org.eclipse.ditto.thingsearch.model.signals.events.SubscriptionFailed; import org.reactivestreams.Subscriber; -import akka.NotUsed; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.Props; -import akka.japi.pf.ReceiveBuilder; -import akka.stream.Materializer; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** * Actor that manages search subscriptions for 1 websocket connection or 1 ConnectionPersistenceActor. diff --git a/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/package-info.java b/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/package-info.java index ae82faf63b..7158a6ce8c 100644 --- a/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/package-info.java +++ b/internal/utils/search/src/main/java/org/eclipse/ditto/internal/utils/search/package-info.java @@ -12,7 +12,7 @@ */ /** - * Encode control flow as data flow through akka streams for modular actor decomposition. + * Encode control flow as data flow through pekko streams for modular actor decomposition. */ @org.eclipse.ditto.utils.jsr305.annotations.AllParametersAndReturnValuesAreNonnullByDefault package org.eclipse.ditto.internal.utils.search; diff --git a/internal/utils/search/src/test/java/org/eclipse/ditto/internal/utils/search/SearchSourceBuilderTest.java b/internal/utils/search/src/test/java/org/eclipse/ditto/internal/utils/search/SearchSourceBuilderTest.java index 78d6001c2e..95c33d4d64 100644 --- a/internal/utils/search/src/test/java/org/eclipse/ditto/internal/utils/search/SearchSourceBuilderTest.java +++ b/internal/utils/search/src/test/java/org/eclipse/ditto/internal/utils/search/SearchSourceBuilderTest.java @@ -18,9 +18,9 @@ import org.junit.After; import org.junit.Test; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link SearchSourceBuilder}. diff --git a/internal/utils/search/src/test/java/org/eclipse/ditto/internal/utils/search/SearchSourceTest.java b/internal/utils/search/src/test/java/org/eclipse/ditto/internal/utils/search/SearchSourceTest.java index 806f33940d..157c2ce096 100644 --- a/internal/utils/search/src/test/java/org/eclipse/ditto/internal/utils/search/SearchSourceTest.java +++ b/internal/utils/search/src/test/java/org/eclipse/ditto/internal/utils/search/SearchSourceTest.java @@ -35,21 +35,21 @@ import org.junit.Before; import org.junit.Test; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.japi.Pair; -import akka.stream.Attributes; -import akka.stream.Materializer; -import akka.stream.SourceRef; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.StreamRefs; -import akka.stream.testkit.TestPublisher; -import akka.stream.testkit.TestSubscriber; -import akka.stream.testkit.javadsl.TestSink; -import akka.stream.testkit.javadsl.TestSource; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.SourceRef; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.StreamRefs; +import org.apache.pekko.stream.testkit.TestPublisher; +import org.apache.pekko.stream.testkit.TestSubscriber; +import org.apache.pekko.stream.testkit.javadsl.TestSink; +import org.apache.pekko.stream.testkit.javadsl.TestSource; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link SearchSource}. diff --git a/internal/utils/search/src/test/java/org/eclipse/ditto/internal/utils/search/SubscriptionActorTest.java b/internal/utils/search/src/test/java/org/eclipse/ditto/internal/utils/search/SubscriptionActorTest.java index 8a5fbc59b6..164cd4382d 100644 --- a/internal/utils/search/src/test/java/org/eclipse/ditto/internal/utils/search/SubscriptionActorTest.java +++ b/internal/utils/search/src/test/java/org/eclipse/ditto/internal/utils/search/SubscriptionActorTest.java @@ -36,14 +36,14 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.stream.Attributes; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link SubscriptionActor}. @@ -55,7 +55,7 @@ public final class SubscriptionActorTest { @Before public void init() { - final Config config = ConfigFactory.parseString("akka.log-dead-letters=0"); + final Config config = ConfigFactory.parseString("pekko.log-dead-letters=0"); actorSystem = ActorSystem.create(getClass().getSimpleName() + i++, config); } diff --git a/internal/utils/search/src/test/java/org/eclipse/ditto/internal/utils/search/SubscriptionManagerTest.java b/internal/utils/search/src/test/java/org/eclipse/ditto/internal/utils/search/SubscriptionManagerTest.java index ad01f5c26b..9b868df3bf 100644 --- a/internal/utils/search/src/test/java/org/eclipse/ditto/internal/utils/search/SubscriptionManagerTest.java +++ b/internal/utils/search/src/test/java/org/eclipse/ditto/internal/utils/search/SubscriptionManagerTest.java @@ -37,19 +37,19 @@ import org.junit.Before; import org.junit.Test; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.pattern.AskTimeoutException; -import akka.stream.Attributes; -import akka.stream.Materializer; -import akka.stream.SourceRef; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.StreamRefs; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.pattern.AskTimeoutException; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.SourceRef; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.StreamRefs; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.concurrent.duration.FiniteDuration; /** diff --git a/internal/utils/test/pom.xml b/internal/utils/test/pom.xml index 47ff9fe12c..8a8e560077 100755 --- a/internal/utils/test/pom.xml +++ b/internal/utils/test/pom.xml @@ -26,8 +26,8 @@ - com.typesafe.akka - akka-actor_${scala.version} + org.apache.pekko + pekko-actor_${scala.version} org.mongodb diff --git a/internal/utils/test/src/test/java/org/eclipse/ditto/internal/utils/test/mongo/BsonDocumentSerializer.java b/internal/utils/test/src/test/java/org/eclipse/ditto/internal/utils/test/mongo/BsonDocumentSerializer.java index 6f629ae440..54993acaad 100644 --- a/internal/utils/test/src/test/java/org/eclipse/ditto/internal/utils/test/mongo/BsonDocumentSerializer.java +++ b/internal/utils/test/src/test/java/org/eclipse/ditto/internal/utils/test/mongo/BsonDocumentSerializer.java @@ -16,7 +16,7 @@ import org.bson.BsonDocument; -import akka.serialization.JSerializer; +import org.apache.pekko.serialization.JSerializer; /** * Serializer for BsonDocument for unit tests using the in-memory persistence plugin. diff --git a/internal/utils/tracing/pom.xml b/internal/utils/tracing/pom.xml index 38b4bfd264..5dd4f31347 100644 --- a/internal/utils/tracing/pom.xml +++ b/internal/utils/tracing/pom.xml @@ -41,8 +41,8 @@ - com.typesafe.akka - akka-http_${scala.version} + org.apache.pekko + pekko-http_${scala.version} diff --git a/internal/utils/tracing/src/main/java/org/eclipse/ditto/internal/utils/tracing/TraceUtils.java b/internal/utils/tracing/src/main/java/org/eclipse/ditto/internal/utils/tracing/TraceUtils.java index 681d089045..11ec844d8d 100644 --- a/internal/utils/tracing/src/main/java/org/eclipse/ditto/internal/utils/tracing/TraceUtils.java +++ b/internal/utils/tracing/src/main/java/org/eclipse/ditto/internal/utils/tracing/TraceUtils.java @@ -27,7 +27,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpRequest; /** * Utility for tracing Http requests. diff --git a/internal/utils/tracing/src/main/java/org/eclipse/ditto/internal/utils/tracing/package-info.java b/internal/utils/tracing/src/main/java/org/eclipse/ditto/internal/utils/tracing/package-info.java index 119b1443e6..c4753b782a 100644 --- a/internal/utils/tracing/src/main/java/org/eclipse/ditto/internal/utils/tracing/package-info.java +++ b/internal/utils/tracing/src/main/java/org/eclipse/ditto/internal/utils/tracing/package-info.java @@ -12,7 +12,7 @@ */ /** - * Encode control flow as data flow through akka streams for modular actor decomposition. + * Encode control flow as data flow through pekko streams for modular actor decomposition. */ @org.eclipse.ditto.utils.jsr305.annotations.AllParametersAndReturnValuesAreNonnullByDefault package org.eclipse.ditto.internal.utils.tracing; diff --git a/json/README.md b/json/README.md index 32e25b30ad..ab3e030793 100755 --- a/json/README.md +++ b/json/README.md @@ -6,7 +6,7 @@ This library is not intended to be the 101 Java JSON library - there are plenty libraries out there like [minimal-json](https://github.com/ralfstx/minimal-json) for example. ditto-json has 2 main goals: -1. Provide truly immutable JSON values (required to guarantee immutability of the messages Ditto uses in its Akka services). +1. Provide truly immutable JSON values (required to guarantee immutability of the messages Ditto uses in its Pekko services). 2. Provide concepts like `JsonFieldDefintion` in order to define a schema of how JSON objects look like, which fields are regular/hidden and in which versions are they available. diff --git a/legal/3rd-party-dependencies/compile.txt b/legal/3rd-party-dependencies/compile.txt index fb51bfe11e..476ccf1f32 100644 --- a/legal/3rd-party-dependencies/compile.txt +++ b/legal/3rd-party-dependencies/compile.txt @@ -16,45 +16,20 @@ com.github.jnr:jnr-a64asm:jar:1.0.0:compile com.github.jnr:jnr-constants:jar:0.9.12:compile com.github.jnr:jnr-ffi:jar:2.1.9:compile com.github.jnr:jnr-x86asm:jar:1.0.2:compile -com.github.scullxbones:akka-persistence-mongo-common_2.13:jar:3.0.8:compile -com.github.scullxbones:akka-persistence-mongo-scala_2.13:jar:3.0.8:compile +com.github.pjfanning:pekko-rabbitmq_2.13:jar:7.0.0:compile +com.github.scullxbones:pekko-persistence-mongodb_2.13:jar:1.0:compile com.google.auto.value:auto-value-annotations:jar:1.9:compile com.hierynomus:asn-one:jar:0.5.0:compile com.hivemq:hivemq-mqtt-client:jar:1.3.0:compile -com.lightbend.akka.discovery:akka-discovery-kubernetes-api_2.13:jar:1.1.4:compile -com.lightbend.akka.management:akka-lease-kubernetes_2.13:jar:1.1.4:compile -com.lightbend.akka.management:akka-management-cluster-bootstrap_2.13:jar:1.1.4:compile -com.lightbend.akka.management:akka-management-cluster-http_2.13:jar:1.1.4:compile -com.lightbend.akka.management:akka-management-pki_2.13:jar:1.1.4:compile -com.lightbend.akka.management:akka-management_2.13:jar:1.1.4:compile -com.newmotion:akka-rabbitmq_2.13:jar:6.0.0:compile com.rabbitmq:amqp-client:jar:5.14.2:compile com.thoughtworks.paranamer:paranamer:jar:2.8:compile -com.typesafe.akka:akka-actor_2.13:jar:2.6.20:compile -com.typesafe.akka:akka-cluster-sharding_2.13:jar:2.6.20:compile -com.typesafe.akka:akka-cluster-tools_2.13:jar:2.6.20:compile -com.typesafe.akka:akka-cluster_2.13:jar:2.6.20:compile -com.typesafe.akka:akka-coordination_2.13:jar:2.6.20:compile -com.typesafe.akka:akka-discovery_2.13:jar:2.6.20:compile -com.typesafe.akka:akka-distributed-data_2.13:jar:2.6.20:compile -com.typesafe.akka:akka-http-core_2.13:jar:10.2.10:compile -com.typesafe.akka:akka-http-spray-json_2.13:jar:10.2.10:compile -com.typesafe.akka:akka-http_2.13:jar:10.2.10:compile -com.typesafe.akka:akka-parsing_2.13:jar:10.2.10:compile -com.typesafe.akka:akka-persistence-query_2.13:jar:2.6.20:compile -com.typesafe.akka:akka-persistence_2.13:jar:2.6.20:compile -com.typesafe.akka:akka-pki_2.13:jar:2.6.20:compile -com.typesafe.akka:akka-protobuf-v3_2.13:jar:2.6.20:compile -com.typesafe.akka:akka-remote_2.13:jar:2.6.20:compile -com.typesafe.akka:akka-serialization-jackson_2.13:jar:2.6.20:compile -com.typesafe.akka:akka-slf4j_2.13:jar:2.6.20:compile -com.typesafe.akka:akka-stream-kafka_2.13:jar:3.0.1:compile -com.typesafe.akka:akka-stream_2.13:jar:2.6.20:compile com.typesafe:config:jar:1.4.2:compile com.typesafe:ssl-config-core_2.13:jar:0.6.1:compile io.cloudevents:cloudevents-api:jar:2.3.0:compile io.cloudevents:cloudevents-core:jar:2.3.0:compile io.cloudevents:cloudevents-http-basic:jar:2.3.0:compile +io.dropwizard.metrics:metrics-core:jar:4.2.9:compile +io.dropwizard.metrics:metrics-healthchecks:jar:4.2.9:compile io.jsonwebtoken:jjwt-api:jar:0.11.5:compile io.kamon:kamon-core_2.13:jar:2.5.8:compile io.kamon:kamon-executors_2.13:jar:2.5.8:compile @@ -84,10 +59,35 @@ io.reactivex.rxjava2:rxjava:jar:2.2.19:compile io.spray:spray-json_2.13:jar:1.3.6:compile jakarta.jms:jakarta.jms-api:jar:2.0.3:compile net.i2p.crypto:eddsa:jar:0.3.0:compile -nl.grons:metrics4-akka_a25_2.13:jar:4.1.19:compile -nl.grons:metrics4-scala_2.13:jar:4.1.19:compile +nl.grons:metrics4-scala_2.13:jar:4.2.9:compile org.agrona:agrona:jar:1.15.1:compile org.apache.kafka:kafka-clients:jar:3.0.2:compile +org.apache.pekko:pekko-actor_2.13:jar:1.0.1:compile +org.apache.pekko:pekko-cluster-sharding_2.13:jar:1.0.1:compile +org.apache.pekko:pekko-cluster-tools_2.13:jar:1.0.1:compile +org.apache.pekko:pekko-cluster_2.13:jar:1.0.1:compile +org.apache.pekko:pekko-connectors-kafka_2.13:jar:1.0.0:compile +org.apache.pekko:pekko-coordination_2.13:jar:1.0.1:compile +org.apache.pekko:pekko-discovery-kubernetes-api_2.13:jar:1.0.0:compile +org.apache.pekko:pekko-discovery_2.13:jar:1.0.1:compile +org.apache.pekko:pekko-distributed-data_2.13:jar:1.0.1:compile +org.apache.pekko:pekko-http-core_2.13:jar:1.0.0:compile +org.apache.pekko:pekko-http-spray-json_2.13:jar:1.0.0:compile +org.apache.pekko:pekko-http_2.13:jar:1.0.0:compile +org.apache.pekko:pekko-lease-kubernetes_2.13:jar:1.0.0:compile +org.apache.pekko:pekko-management-cluster-bootstrap_2.13:jar:1.0.0:compile +org.apache.pekko:pekko-management-cluster-http_2.13:jar:1.0.0:compile +org.apache.pekko:pekko-management-pki_2.13:jar:1.0.0:compile +org.apache.pekko:pekko-management_2.13:jar:1.0.0:compile +org.apache.pekko:pekko-parsing_2.13:jar:1.0.0:compile +org.apache.pekko:pekko-persistence-query_2.13:jar:1.0.1:compile +org.apache.pekko:pekko-persistence_2.13:jar:1.0.1:compile +org.apache.pekko:pekko-pki_2.13:jar:1.0.1:compile +org.apache.pekko:pekko-protobuf-v3_2.13:jar:1.0.1:compile +org.apache.pekko:pekko-remote_2.13:jar:1.0.1:compile +org.apache.pekko:pekko-serialization-jackson_2.13:jar:1.0.1:compile +org.apache.pekko:pekko-slf4j_2.13:jar:1.0.1:compile +org.apache.pekko:pekko-stream_2.13:jar:1.0.1:compile org.apache.qpid:proton-j:jar:0.34.0:compile org.apache.qpid:qpid-jms-client:jar:1.7.0:compile org.apache.sshd:sshd-common:jar:2.9.2:compile @@ -99,7 +99,7 @@ org.komamitsu:fluency-core:jar:2.6.5:compile org.komamitsu:fluency-fluentd:jar:2.6.5:compile org.lmdbjava:lmdbjava:jar:0.7.0:compile org.lz4:lz4-java:jar:1.8.0:compile -org.mongodb.scala:mongo-scala-bson_2.13:jar:4.3.4:compile +org.mongodb.scala:mongo-scala-bson_2.13:jar:4.10.2:compile org.mongodb.scala:mongo-scala-driver_2.13:jar:4.3.4:compile org.mongodb:bson:jar:4.3.4:compile org.mongodb:mongodb-driver-core:jar:4.3.4:compile @@ -110,8 +110,9 @@ org.ow2.asm:asm-commons:jar:9.2:compile org.ow2.asm:asm-tree:jar:9.2:compile org.ow2.asm:asm-util:jar:9.2:compile org.ow2.asm:asm:jar:9.2:compile +org.parboiled:parboiled_2.13:jar:2.5.0:compile org.reactivestreams:reactive-streams:jar:1.0.4:compile -org.scala-lang.modules:scala-java8-compat_2.13:jar:1.0.0:compile +org.scala-lang.modules:scala-java8-compat_2.13:jar:1.0.2:compile org.scala-lang:scala-library:jar:2.13.10:compile org.scala-lang:scala-reflect:jar:2.13.10:compile org.slf4j:jcl-over-slf4j:jar:1.7.36:compile diff --git a/legal/3rd-party-dependencies/maven-plugins.txt b/legal/3rd-party-dependencies/maven-plugins.txt index 4eeaf96c5b..5296727352 100644 --- a/legal/3rd-party-dependencies/maven-plugins.txt +++ b/legal/3rd-party-dependencies/maven-plugins.txt @@ -2,7 +2,7 @@ com.github.siom79.japicmp:japicmp-maven-plugin:maven-plugin:0.15.7:runtime com.mycila:license-maven-plugin:maven-plugin:4.1:runtime net.alchim31.maven:scala-maven-plugin:maven-plugin:4.5.6:runtime org.apache.felix:maven-bundle-plugin:maven-plugin:5.1.4:runtime -org.apache.maven.plugins:maven-clean-plugin:maven-plugin:3.2.0:runtime +org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.5:runtime org.apache.maven.plugins:maven-compiler-plugin:maven-plugin:3.9.0:runtime org.apache.maven.plugins:maven-dependency-plugin:maven-plugin:3.2.0:runtime org.apache.maven.plugins:maven-deploy-plugin:maven-plugin:3.0.0-M2:runtime @@ -14,7 +14,7 @@ org.apache.maven.plugins:maven-javadoc-plugin:maven-plugin:3.3.1:runtime org.apache.maven.plugins:maven-resources-plugin:maven-plugin:3.2.0:runtime org.apache.maven.plugins:maven-scm-plugin:maven-plugin:1.12.2:runtime org.apache.maven.plugins:maven-shade-plugin:maven-plugin:3.2.4:runtime -org.apache.maven.plugins:maven-site-plugin:maven-plugin:3.12.1:runtime +org.apache.maven.plugins:maven-site-plugin:maven-plugin:3.3:runtime org.apache.maven.plugins:maven-source-plugin:maven-plugin:3.2.1:runtime org.apache.maven.plugins:maven-surefire-plugin:maven-plugin:3.0.0-M5:runtime org.codehaus.mojo:flatten-maven-plugin:maven-plugin:1.2.7:runtime diff --git a/legal/3rd-party-dependencies/test.txt b/legal/3rd-party-dependencies/test.txt index e3347910d1..0a63811388 100644 --- a/legal/3rd-party-dependencies/test.txt +++ b/legal/3rd-party-dependencies/test.txt @@ -1,14 +1,10 @@ -com.github.dnvriend:akka-persistence-inmemory_2.13:jar:2.5.15.2:test +com.github.alstanchev:pekko-persistence-inmemory_2.13:jar:0.0.0-SNAPSHOT:test com.github.docker-java:docker-java-api:jar:3.2.13:test com.github.docker-java:docker-java-core:jar:3.2.13:test com.github.docker-java:docker-java-transport-zerodep:jar:3.2.13:test com.github.docker-java:docker-java-transport:jar:3.2.13:test com.github.stefanbirkner:system-rules:jar:1.19.0:test com.google.guava:guava:jar:19.0:test -com.typesafe.akka:akka-http-testkit_2.13:jar:10.2.10:test -com.typesafe.akka:akka-stream-kafka-testkit_2.13:jar:3.0.1:test -com.typesafe.akka:akka-stream-testkit_2.13:jar:2.6.20:test -com.typesafe.akka:akka-testkit_2.13:jar:2.6.20:test com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test commons-io:commons-io:jar:2.6:test io.github.classgraph:classgraph:jar:4.8.126:test @@ -23,6 +19,10 @@ nl.jqno.equalsverifier:equalsverifier:jar:3.10.1:test org.apache.commons:commons-compress:jar:1.21:test org.apache.commons:commons-lang3:jar:3.12.0:test org.apache.commons:commons-math3:jar:3.2:test +org.apache.pekko:pekko-connectors-kafka-testkit_2.13:jar:1.0.0:test +org.apache.pekko:pekko-http-testkit_2.13:jar:1.0.0:test +org.apache.pekko:pekko-stream-testkit_2.13:jar:1.0.1:test +org.apache.pekko:pekko-testkit_2.13:jar:1.0.1:test org.apiguardian:apiguardian-api:jar:1.1.2:test org.assertj:assertj-core:jar:3.23.1:test org.awaitility:awaitility:jar:4.2.0:test @@ -42,6 +42,6 @@ org.objenesis:objenesis:jar:3.2:test org.openjdk.jmh:jmh-core:jar:1.35:test org.openjdk.jmh:jmh-generator-annprocess:jar:1.35:test org.opentest4j:opentest4j:jar:1.2.0:test -org.scalaz:scalaz-core_2.13:jar:7.2.28:test +org.scalaz:scalaz-core_2.13:jar:7.3.7:test org.skyscreamer:jsonassert:jar:1.5.1:test org.slf4j:slf4j-simple:jar:1.7.36:test diff --git a/legal/NOTICE-THIRD-PARTY.md b/legal/NOTICE-THIRD-PARTY.md index c3f06bc387..2643c51f34 100644 --- a/legal/NOTICE-THIRD-PARTY.md +++ b/legal/NOTICE-THIRD-PARTY.md @@ -180,24 +180,24 @@ * Maven sources: https://search.maven.org/remotecontent?filepath=com/github/luben/zstd-jni/1.5.0-2/zstd-jni-1.5.0-2-sources.jar -## akka-persistence-mongo-common (3.0.8) +## pekko-rabbitmq (7.0.0) -* Maven coordinates: `com.github.scullxbones:akka-persistence-mongo-common_2.13:3.0.8` +* Maven coordinates: `com.github.pjfanning:pekko-rabbitmq_2.13:7.0.0` * License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://github.com/scullxbones/akka-persistence-mongo +* Project: https://github.com/pjfanning/pekko-rabbitmq * Sources: - * declared as SCM: https://github.com/scullxbones/akka-persistence-mongo - * Maven sources: https://search.maven.org/remotecontent?filepath=com/github/scullxbones/akka-persistence-mongo-common_2.13/3.0.8/akka-persistence-mongo-common_2.13-3.0.8-sources.jar + * declared as SCM: https://github.com/pjfanning/pekko-rabbitmq + * Maven sources: https://search.maven.org/remotecontent?filepath=com/github/pjfanning/pekko-rabbitmq_2.13/7.0.0/pekko-rabbitmq_2.13-7.0.0-sources.jar -## akka-persistence-mongo-scala (3.0.8) +## pekko-persistence-mongodb (1.0) -* Maven coordinates: `com.github.scullxbones:akka-persistence-mongo-scala_2.13:3.0.8` +* Maven coordinates: `com.github.scullxbones:pekko-persistence-mongodb_2.13:1.0` * License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://github.com/scullxbones/akka-persistence-mongo +* Project: https://github.com/scullxbones/pekko-persistence-mongo * Sources: - * declared as SCM: https://github.com/scullxbones/akka-persistence-mongo - * Maven sources: https://search.maven.org/remotecontent?filepath=com/github/scullxbones/akka-persistence-mongo-scala_2.13/3.0.8/akka-persistence-mongo-scala_2.13-3.0.8-sources.jar + * declared as SCM: https://github.com/scullxbones/pekko-persistence-mongo + * Maven sources: https://search.maven.org/remotecontent?filepath=com/github/scullxbones/pekko-persistence-mongodb_2.13/1.0/pekko-persistence-mongodb_2.13-1.0-sources.jar ## AutoValue Annotations (1.9) @@ -240,76 +240,6 @@ * Maven sources: https://search.maven.org/remotecontent?filepath=com/hivemq/hivemq-mqtt-client/1.3.0/hivemq-mqtt-client-1.3.0-sources.jar -## akka-discovery-kubernetes-api (1.1.4) - -* Maven coordinates: `com.lightbend.akka.discovery:akka-discovery-kubernetes-api_2.13:1.1.4` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka-management - * Maven sources: https://search.maven.org/remotecontent?filepath=com/lightbend/akka/discovery/akka-discovery-kubernetes-api_2.13/1.1.4/akka-discovery-kubernetes-api_2.13-1.1.4-sources.jar - - -## akka-lease-kubernetes (1.1.4) - -* Maven coordinates: `com.lightbend.akka.management:akka-lease-kubernetes_2.13:1.1.4` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka-management - * Maven sources: https://search.maven.org/remotecontent?filepath=com/lightbend/akka/management/akka-lease-kubernetes_2.13/1.1.4/akka-lease-kubernetes_2.13-1.1.4-sources.jar - - -## akka-management-cluster-bootstrap (1.1.4) - -* Maven coordinates: `com.lightbend.akka.management:akka-management-cluster-bootstrap_2.13:1.1.4` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka-management - * Maven sources: https://search.maven.org/remotecontent?filepath=com/lightbend/akka/management/akka-management-cluster-bootstrap_2.13/1.1.4/akka-management-cluster-bootstrap_2.13-1.1.4-sources.jar - - -## akka-management-cluster-http (1.1.4) - -* Maven coordinates: `com.lightbend.akka.management:akka-management-cluster-http_2.13:1.1.4` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka-management - * Maven sources: https://search.maven.org/remotecontent?filepath=com/lightbend/akka/management/akka-management-cluster-http_2.13/1.1.4/akka-management-cluster-http_2.13-1.1.4-sources.jar - - -## akka-management-pki (1.1.4) - -* Maven coordinates: `com.lightbend.akka.management:akka-management-pki_2.13:1.1.4` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka-management - * Maven sources: https://search.maven.org/remotecontent?filepath=com/lightbend/akka/management/akka-management-pki_2.13/1.1.4/akka-management-pki_2.13-1.1.4-sources.jar - - -## akka-management (1.1.4) - -* Maven coordinates: `com.lightbend.akka.management:akka-management_2.13:1.1.4` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka-management - * Maven sources: https://search.maven.org/remotecontent?filepath=com/lightbend/akka/management/akka-management_2.13/1.1.4/akka-management_2.13-1.1.4-sources.jar - - -## akka-rabbitmq (6.0.0) - -* Maven coordinates: `com.newmotion:akka-rabbitmq_2.13:6.0.0` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://github.com/NewMotion/akka-rabbitmq -* Sources: - * declared as SCM: https://github.com/NewMotion/akka-rabbitmq - * Maven sources: https://search.maven.org/remotecontent?filepath=com/newmotion/akka-rabbitmq_2.13/6.0.0/akka-rabbitmq_2.13-6.0.0-sources.jar - - ## RabbitMQ Java Client (5.14.2) * Maven coordinates: `com.rabbitmq:amqp-client:5.14.2` @@ -370,206 +300,6 @@ * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/ssl-config-core_2.13/0.6.1/ssl-config-core_2.13-0.6.1-sources.jar -## akka-actor (2.6.20) - -* Maven coordinates: `com.typesafe.akka:akka-actor_2.13:2.6.20` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-actor_2.13/2.6.20/akka-actor_2.13-2.6.20-sources.jar - - -## akka-cluster-sharding (2.6.20) - -* Maven coordinates: `com.typesafe.akka:akka-cluster-sharding_2.13:2.6.20` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-cluster-sharding_2.13/2.6.20/akka-cluster-sharding_2.13-2.6.20-sources.jar - - -## akka-cluster-tools (2.6.20) - -* Maven coordinates: `com.typesafe.akka:akka-cluster-tools_2.13:2.6.20` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-cluster-tools_2.13/2.6.20/akka-cluster-tools_2.13-2.6.20-sources.jar - - -## akka-cluster (2.6.20) - -* Maven coordinates: `com.typesafe.akka:akka-cluster_2.13:2.6.20` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-cluster_2.13/2.6.20/akka-cluster_2.13-2.6.20-sources.jar - - -## akka-coordination (2.6.20) - -* Maven coordinates: `com.typesafe.akka:akka-coordination_2.13:2.6.20` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-coordination_2.13/2.6.20/akka-coordination_2.13-2.6.20-sources.jar - - -## akka-discovery (2.6.20) - -* Maven coordinates: `com.typesafe.akka:akka-discovery_2.13:2.6.20` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-discovery_2.13/2.6.20/akka-discovery_2.13-2.6.20-sources.jar - - -## akka-distributed-data (2.6.20) - -* Maven coordinates: `com.typesafe.akka:akka-distributed-data_2.13:2.6.20` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-distributed-data_2.13/2.6.20/akka-distributed-data_2.13-2.6.20-sources.jar - - -## akka-http-core (10.2.10) - -* Maven coordinates: `com.typesafe.akka:akka-http-core_2.13:10.2.10` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io -* Sources: - * declared as SCM: https://github.com/akka/akka-http - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-http-core_2.13/10.2.10/akka-http-core_2.13-10.2.10-sources.jar - - -## akka-http-spray-json (10.2.10) - -* Maven coordinates: `com.typesafe.akka:akka-http-spray-json_2.13:10.2.10` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io -* Sources: - * declared as SCM: https://github.com/akka/akka-http - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-http-spray-json_2.13/10.2.10/akka-http-spray-json_2.13-10.2.10-sources.jar - - -## akka-http (10.2.10) - -* Maven coordinates: `com.typesafe.akka:akka-http_2.13:10.2.10` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io -* Sources: - * declared as SCM: https://github.com/akka/akka-http - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-http_2.13/10.2.10/akka-http_2.13-10.2.10-sources.jar - - -## akka-parsing (10.2.10) - -* Maven coordinates: `com.typesafe.akka:akka-parsing_2.13:10.2.10` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io -* Sources: - * declared as SCM: https://github.com/akka/akka-http - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-parsing_2.13/10.2.10/akka-parsing_2.13-10.2.10-sources.jar - - -## akka-persistence-query (2.6.20) - -* Maven coordinates: `com.typesafe.akka:akka-persistence-query_2.13:2.6.20` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-persistence-query_2.13/2.6.20/akka-persistence-query_2.13-2.6.20-sources.jar - - -## akka-persistence (2.6.20) - -* Maven coordinates: `com.typesafe.akka:akka-persistence_2.13:2.6.20` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-persistence_2.13/2.6.20/akka-persistence_2.13-2.6.20-sources.jar - - -## akka-pki (2.6.20) - -* Maven coordinates: `com.typesafe.akka:akka-pki_2.13:2.6.20` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-pki_2.13/2.6.20/akka-pki_2.13-2.6.20-sources.jar - - -## akka-protobuf-v3 (2.6.20) - -* Maven coordinates: `com.typesafe.akka:akka-protobuf-v3_2.13:2.6.20` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-protobuf-v3_2.13/2.6.20/akka-protobuf-v3_2.13-2.6.20-sources.jar - - -## akka-remote (2.6.20) - -* Maven coordinates: `com.typesafe.akka:akka-remote_2.13:2.6.20` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-remote_2.13/2.6.20/akka-remote_2.13-2.6.20-sources.jar - - -## akka-serialization-jackson (2.6.20) - -* Maven coordinates: `com.typesafe.akka:akka-serialization-jackson_2.13:2.6.20` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-serialization-jackson_2.13/2.6.20/akka-serialization-jackson_2.13-2.6.20-sources.jar - - -## akka-slf4j (2.6.20) - -* Maven coordinates: `com.typesafe.akka:akka-slf4j_2.13:2.6.20` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-slf4j_2.13/2.6.20/akka-slf4j_2.13-2.6.20-sources.jar - - -## akka-stream-kafka (3.0.1) - -* Maven coordinates: `com.typesafe.akka:akka-stream-kafka_2.13:3.0.1` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://doc.akka.io/docs/alpakka-kafka/current -* Sources: - * declared as SCM: https://github.com/akka/alpakka-kafka - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-stream-kafka_2.13/3.0.1/akka-stream-kafka_2.13-3.0.1-sources.jar - - -## akka-stream (2.6.20) - -* Maven coordinates: `com.typesafe.akka:akka-stream_2.13:2.6.20` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://akka.io/ -* Sources: - * declared as SCM: https://github.com/akka/akka - * Maven sources: https://search.maven.org/remotecontent?filepath=com/typesafe/akka/akka-stream_2.13/2.6.20/akka-stream_2.13-2.6.20-sources.jar - - ## CloudEvents - API (2.3.0) * Maven coordinates: `io.cloudevents:cloudevents-api:2.3.0` @@ -600,6 +330,26 @@ * Maven sources: https://search.maven.org/remotecontent?filepath=io/cloudevents/cloudevents-http-basic/2.3.0/cloudevents-http-basic-2.3.0-sources.jar +## Metrics Core (4.2.9) + +* Maven coordinates: `io.dropwizard.metrics:metrics-core:4.2.9` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://metrics.dropwizard.io/metrics-core +* Sources: + * declared as SCM: https://github.com/dropwizard/metrics/metrics-core/ + * Maven sources: https://search.maven.org/remotecontent?filepath=io/dropwizard/metrics/metrics-core/4.2.9/metrics-core-4.2.9-sources.jar + + +## Metrics Health Checks (4.2.9) + +* Maven coordinates: `io.dropwizard.metrics:metrics-healthchecks:4.2.9` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://metrics.dropwizard.io/metrics-healthchecks +* Sources: + * declared as SCM: https://github.com/dropwizard/metrics/metrics-healthchecks/ + * Maven sources: https://search.maven.org/remotecontent?filepath=io/dropwizard/metrics/metrics-healthchecks/4.2.9/metrics-healthchecks-4.2.9-sources.jar + + ## JJWT :: API (0.11.5) * Maven coordinates: `io.jsonwebtoken:jjwt-api:0.11.5` @@ -960,24 +710,14 @@ * Maven sources: https://search.maven.org/remotecontent?filepath=net/logstash/logback/logstash-logback-encoder/7.2/logstash-logback-encoder-7.2-sources.jar -## metrics4-akka_a25 (4.1.19) +## metrics4-scala (4.2.9) -* Maven coordinates: `nl.grons:metrics4-akka_a25_2.13:4.1.19` +* Maven coordinates: `nl.grons:metrics4-scala_2.13:4.2.9` * License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) * Project: https://github.com/erikvanoosten/metrics-scala * Sources: * declared as SCM: https://github.com/erikvanoosten/metrics-scala - * Maven sources: https://search.maven.org/remotecontent?filepath=nl/grons/metrics4-akka_a25_2.13/4.1.19/metrics4-akka_a25_2.13-4.1.19-sources.jar - - -## metrics4-scala (4.1.19) - -* Maven coordinates: `nl.grons:metrics4-scala_2.13:4.1.19` -* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: https://github.com/erikvanoosten/metrics-scala -* Sources: - * declared as SCM: https://github.com/erikvanoosten/metrics-scala - * Maven sources: https://search.maven.org/remotecontent?filepath=nl/grons/metrics4-scala_2.13/4.1.19/metrics4-scala_2.13-4.1.19-sources.jar + * Maven sources: https://search.maven.org/remotecontent?filepath=nl/grons/metrics4-scala_2.13/4.2.9/metrics4-scala_2.13-4.2.9-sources.jar ## agrona (1.15.1) @@ -1000,6 +740,266 @@ * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/kafka/kafka-clients/3.0.2/kafka-clients-3.0.2-sources.jar +## pekko-actor (1.0.1) + +* Maven coordinates: `org.apache.pekko:pekko-actor_2.13:1.0.1` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-actor_2.13/1.0.1/pekko-actor_2.13-1.0.1-sources.jar + + +## pekko-cluster-sharding (1.0.1) + +* Maven coordinates: `org.apache.pekko:pekko-cluster-sharding_2.13:1.0.1` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-cluster-sharding_2.13/1.0.1/pekko-cluster-sharding_2.13-1.0.1-sources.jar + + +## pekko-cluster-tools (1.0.1) + +* Maven coordinates: `org.apache.pekko:pekko-cluster-tools_2.13:1.0.1` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-cluster-tools_2.13/1.0.1/pekko-cluster-tools_2.13-1.0.1-sources.jar + + +## pekko-cluster (1.0.1) + +* Maven coordinates: `org.apache.pekko:pekko-cluster_2.13:1.0.1` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-cluster_2.13/1.0.1/pekko-cluster_2.13-1.0.1-sources.jar + + +## pekko-connectors-kafka (1.0.0) + +* Maven coordinates: `org.apache.pekko:pekko-connectors-kafka_2.13:1.0.0` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/docs/pekko-connectors-kafka/current/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko-connectors-kafka + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-connectors-kafka_2.13/1.0.0/pekko-connectors-kafka_2.13-1.0.0-sources.jar + + +## pekko-coordination (1.0.1) + +* Maven coordinates: `org.apache.pekko:pekko-coordination_2.13:1.0.1` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-coordination_2.13/1.0.1/pekko-coordination_2.13-1.0.1-sources.jar + + +## pekko-discovery-kubernetes-api (1.0.0) + +* Maven coordinates: `org.apache.pekko:pekko-discovery-kubernetes-api_2.13:1.0.0` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko-management + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-discovery-kubernetes-api_2.13/1.0.0/pekko-discovery-kubernetes-api_2.13-1.0.0-sources.jar + + +## pekko-discovery (1.0.1) + +* Maven coordinates: `org.apache.pekko:pekko-discovery_2.13:1.0.1` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-discovery_2.13/1.0.1/pekko-discovery_2.13-1.0.1-sources.jar + + +## pekko-distributed-data (1.0.1) + +* Maven coordinates: `org.apache.pekko:pekko-distributed-data_2.13:1.0.1` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-distributed-data_2.13/1.0.1/pekko-distributed-data_2.13-1.0.1-sources.jar + + +## pekko-http-core (1.0.0) + +* Maven coordinates: `org.apache.pekko:pekko-http-core_2.13:1.0.0` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: not declared +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko-http + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-http-core_2.13/1.0.0/pekko-http-core_2.13-1.0.0-sources.jar + + +## pekko-http-spray-json (1.0.0) + +* Maven coordinates: `org.apache.pekko:pekko-http-spray-json_2.13:1.0.0` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: not declared +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko-http + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-http-spray-json_2.13/1.0.0/pekko-http-spray-json_2.13-1.0.0-sources.jar + + +## pekko-http (1.0.0) + +* Maven coordinates: `org.apache.pekko:pekko-http_2.13:1.0.0` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: not declared +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko-http + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-http_2.13/1.0.0/pekko-http_2.13-1.0.0-sources.jar + + +## pekko-lease-kubernetes (1.0.0) + +* Maven coordinates: `org.apache.pekko:pekko-lease-kubernetes_2.13:1.0.0` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko-management + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-lease-kubernetes_2.13/1.0.0/pekko-lease-kubernetes_2.13-1.0.0-sources.jar + + +## pekko-management-cluster-bootstrap (1.0.0) + +* Maven coordinates: `org.apache.pekko:pekko-management-cluster-bootstrap_2.13:1.0.0` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko-management + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-management-cluster-bootstrap_2.13/1.0.0/pekko-management-cluster-bootstrap_2.13-1.0.0-sources.jar + + +## pekko-management-cluster-http (1.0.0) + +* Maven coordinates: `org.apache.pekko:pekko-management-cluster-http_2.13:1.0.0` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko-management + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-management-cluster-http_2.13/1.0.0/pekko-management-cluster-http_2.13-1.0.0-sources.jar + + +## pekko-management-pki (1.0.0) + +* Maven coordinates: `org.apache.pekko:pekko-management-pki_2.13:1.0.0` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko-management + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-management-pki_2.13/1.0.0/pekko-management-pki_2.13-1.0.0-sources.jar + + +## pekko-management (1.0.0) + +* Maven coordinates: `org.apache.pekko:pekko-management_2.13:1.0.0` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko-management + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-management_2.13/1.0.0/pekko-management_2.13-1.0.0-sources.jar + + +## pekko-parsing (1.0.0) + +* Maven coordinates: `org.apache.pekko:pekko-parsing_2.13:1.0.0` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: not declared +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko-http + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-parsing_2.13/1.0.0/pekko-parsing_2.13-1.0.0-sources.jar + + +## pekko-persistence-query (1.0.1) + +* Maven coordinates: `org.apache.pekko:pekko-persistence-query_2.13:1.0.1` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-persistence-query_2.13/1.0.1/pekko-persistence-query_2.13-1.0.1-sources.jar + + +## pekko-persistence (1.0.1) + +* Maven coordinates: `org.apache.pekko:pekko-persistence_2.13:1.0.1` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-persistence_2.13/1.0.1/pekko-persistence_2.13-1.0.1-sources.jar + + +## pekko-pki (1.0.1) + +* Maven coordinates: `org.apache.pekko:pekko-pki_2.13:1.0.1` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-pki_2.13/1.0.1/pekko-pki_2.13-1.0.1-sources.jar + + +## pekko-protobuf-v3 (1.0.1) + +* Maven coordinates: `org.apache.pekko:pekko-protobuf-v3_2.13:1.0.1` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-protobuf-v3_2.13/1.0.1/pekko-protobuf-v3_2.13-1.0.1-sources.jar + + +## pekko-remote (1.0.1) + +* Maven coordinates: `org.apache.pekko:pekko-remote_2.13:1.0.1` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-remote_2.13/1.0.1/pekko-remote_2.13-1.0.1-sources.jar + + +## pekko-serialization-jackson (1.0.1) + +* Maven coordinates: `org.apache.pekko:pekko-serialization-jackson_2.13:1.0.1` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-serialization-jackson_2.13/1.0.1/pekko-serialization-jackson_2.13-1.0.1-sources.jar + + +## pekko-slf4j (1.0.1) + +* Maven coordinates: `org.apache.pekko:pekko-slf4j_2.13:1.0.1` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-slf4j_2.13/1.0.1/pekko-slf4j_2.13-1.0.1-sources.jar + + +## pekko-stream (1.0.1) + +* Maven coordinates: `org.apache.pekko:pekko-stream_2.13:1.0.1` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: https://pekko.apache.org/ +* Sources: + * declared as SCM: https://github.com/apache/incubator-pekko + * Maven sources: https://search.maven.org/remotecontent?filepath=org/apache/pekko/pekko-stream_2.13/1.0.1/pekko-stream_2.13-1.0.1-sources.jar + + ## Proton-J (0.34.0) * Maven coordinates: `org.apache.qpid:proton-j:0.34.0` @@ -1200,14 +1200,14 @@ * Maven sources: https://search.maven.org/remotecontent?filepath=org/mongodb/mongodb-driver-reactivestreams/4.3.4/mongodb-driver-reactivestreams-4.3.4-sources.jar -## Mongo Scala Bson Library (4.3.4) +## Mongo Scala Bson Library (4.10.2) -* Maven coordinates: `org.mongodb.scala:mongo-scala-bson_2.13:4.3.4` +* Maven coordinates: `org.mongodb.scala:mongo-scala-bson_2.13:4.10.2` * License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) -* Project: http://www.mongodb.org +* Project: https://www.mongodb.com/ * Sources: * declared as SCM: https://github.com/mongodb/mongo-java-driver - * Maven sources: https://search.maven.org/remotecontent?filepath=org/mongodb/scala/mongo-scala-bson_2.13/4.3.4/mongo-scala-bson_2.13-4.3.4-sources.jar + * Maven sources: https://search.maven.org/remotecontent?filepath=org/mongodb/scala/mongo-scala-bson_2.13/4.10.2/mongo-scala-bson_2.13-4.10.2-sources.jar ## Mongo Scala Driver (4.3.4) @@ -1300,6 +1300,16 @@ * Maven sources: https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-util/9.2/asm-util-9.2-sources.jar +## parboiled (2.5.0) + +* Maven coordinates: `org.parboiled:parboiled_2.13:2.5.0` +* License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +* Project: http://parboiled.org +* Sources: + * declared as SCM: https://github.com/sirthias/parboiled2 + * Maven sources: https://search.maven.org/remotecontent?filepath=org/parboiled/parboiled_2.13/2.5.0/parboiled_2.13-2.5.0-sources.jar + + ## reactive-streams (1.0.4) * Maven coordinates: `org.reactivestreams:reactive-streams:1.0.4` @@ -1330,14 +1340,14 @@ * Maven sources: https://search.maven.org/remotecontent?filepath=org/scala-lang/scala-reflect/2.13.10/scala-reflect-2.13.10-sources.jar -## scala-java8-compat (1.0.0) +## scala-java8-compat (1.0.2) -* Maven coordinates: `org.scala-lang.modules:scala-java8-compat_2.13:1.0.0` +* Maven coordinates: `org.scala-lang.modules:scala-java8-compat_2.13:1.0.2` * License: [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) * Project: http://www.scala-lang.org/ * Sources: * declared as SCM: https://github.com/scala/scala-java8-compat - * Maven sources: https://search.maven.org/remotecontent?filepath=org/scala-lang/modules/scala-java8-compat_2.13/1.0.0/scala-java8-compat_2.13-1.0.0-sources.jar + * Maven sources: https://search.maven.org/remotecontent?filepath=org/scala-lang/modules/scala-java8-compat_2.13/1.0.2/scala-java8-compat_2.13-1.0.2-sources.jar ## JCL 1.2 implemented over SLF4J (1.7.36) diff --git a/policies/api/src/main/java/org/eclipse/ditto/policies/api/PoliciesMessagingConstants.java b/policies/api/src/main/java/org/eclipse/ditto/policies/api/PoliciesMessagingConstants.java index 646cced107..a3a153fd62 100755 --- a/policies/api/src/main/java/org/eclipse/ditto/policies/api/PoliciesMessagingConstants.java +++ b/policies/api/src/main/java/org/eclipse/ditto/policies/api/PoliciesMessagingConstants.java @@ -39,7 +39,7 @@ public final class PoliciesMessagingConstants { public static final String SHARD_REGION = "policy"; /** - * Name of the akka cluster role. + * Name of the pekko cluster role. */ public static final String CLUSTER_ROLE = "policies"; diff --git a/policies/enforcement/pom.xml b/policies/enforcement/pom.xml index 812c75caac..731cc0fbf8 100644 --- a/policies/enforcement/pom.xml +++ b/policies/enforcement/pom.xml @@ -59,7 +59,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko org.eclipse.ditto @@ -77,7 +77,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko test-jar test @@ -104,13 +104,13 @@ test - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test - com.typesafe.akka - akka-slf4j_${scala.version} + org.apache.pekko + pekko-slf4j_${scala.version} test diff --git a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/AbstractEnforcementReloaded.java b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/AbstractEnforcementReloaded.java index 5721be12aa..58360152d0 100644 --- a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/AbstractEnforcementReloaded.java +++ b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/AbstractEnforcementReloaded.java @@ -19,8 +19,8 @@ import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.eclipse.ditto.base.model.signals.Signal; import org.eclipse.ditto.base.model.signals.commands.CommandResponse; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; /** * Abstract implementation of {@link EnforcementReloaded} providing common functionality of all entity specific diff --git a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/AbstractEnforcerActor.java b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/AbstractEnforcerActor.java index be16c12787..291a7cc395 100644 --- a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/AbstractEnforcerActor.java +++ b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/AbstractEnforcerActor.java @@ -27,9 +27,9 @@ import org.eclipse.ditto.base.model.headers.WithDittoHeaders; import org.eclipse.ditto.base.model.signals.Signal; import org.eclipse.ditto.base.model.signals.commands.CommandResponse; -import org.eclipse.ditto.internal.utils.akka.actors.AbstractActorWithStashWithTimers; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.actors.AbstractActorWithStashWithTimers; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.config.ScopedConfig; import org.eclipse.ditto.internal.utils.tracing.DittoTracing; import org.eclipse.ditto.internal.utils.tracing.span.SpanOperationName; @@ -37,11 +37,11 @@ import org.eclipse.ditto.policies.model.PolicyId; import org.eclipse.ditto.policies.model.signals.commands.exceptions.PolicyNotAccessibleException; -import akka.actor.ActorRef; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.japi.Pair; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; /** * Abstract enforcer of commands performing authorization / enforcement of incoming signals. diff --git a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/AbstractPolicyEnforcerProvider.java b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/AbstractPolicyEnforcerProvider.java index d24a57f48a..2c57cb6bd7 100644 --- a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/AbstractPolicyEnforcerProvider.java +++ b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/AbstractPolicyEnforcerProvider.java @@ -17,8 +17,8 @@ import com.github.benmanes.caffeine.cache.AsyncCacheLoader; -import akka.actor.ActorSystem; -import akka.dispatch.MessageDispatcher; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.dispatch.MessageDispatcher; /** * Abstract base of {@link PolicyEnforcer} implementations. diff --git a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/CachingPolicyEnforcerProvider.java b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/CachingPolicyEnforcerProvider.java index 175b77d7a7..98a0c83f36 100644 --- a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/CachingPolicyEnforcerProvider.java +++ b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/CachingPolicyEnforcerProvider.java @@ -21,8 +21,8 @@ import org.eclipse.ditto.base.model.exceptions.DittoInternalErrorException; import org.eclipse.ditto.base.model.headers.DittoHeaders; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.cache.config.CacheConfig; import org.eclipse.ditto.internal.utils.cache.config.DefaultCacheConfig; import org.eclipse.ditto.internal.utils.cache.entry.Entry; @@ -34,17 +34,17 @@ import com.github.benmanes.caffeine.cache.AsyncCacheLoader; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.cluster.ddata.ORSet; -import akka.cluster.ddata.Replicator; -import akka.cluster.pubsub.DistributedPubSub; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.dispatch.MessageDispatcher; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.ddata.ORSet; +import org.apache.pekko.cluster.ddata.Replicator; +import org.apache.pekko.cluster.pubsub.DistributedPubSub; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.dispatch.MessageDispatcher; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; /** * Transparent caching layer for {@link org.eclipse.ditto.policies.enforcement.PolicyEnforcerProvider} diff --git a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/DefaultPolicyEnforcerProvider.java b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/DefaultPolicyEnforcerProvider.java index b1b48b38b3..0b358d149c 100644 --- a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/DefaultPolicyEnforcerProvider.java +++ b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/DefaultPolicyEnforcerProvider.java @@ -18,15 +18,15 @@ import javax.annotation.Nullable; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.cache.entry.Entry; import org.eclipse.ditto.policies.model.PolicyId; import com.github.benmanes.caffeine.cache.AsyncCacheLoader; -import akka.actor.ActorSystem; -import akka.dispatch.MessageDispatcher; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.dispatch.MessageDispatcher; /** * Loads the {@link org.eclipse.ditto.policies.model.Policy} from the policies shard region and wraps it into a diff --git a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/PolicyCacheLoader.java b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/PolicyCacheLoader.java index a2cf65a45f..4d3f75b3b2 100644 --- a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/PolicyCacheLoader.java +++ b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/PolicyCacheLoader.java @@ -36,12 +36,12 @@ import com.github.benmanes.caffeine.cache.AsyncCacheLoader; -import akka.actor.AbstractExtensionId; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.actor.Extension; -import akka.actor.Scheduler; +import org.apache.pekko.actor.AbstractExtensionId; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.actor.Extension; +import org.apache.pekko.actor.Scheduler; /** * Loads a policy by asking the policies shard-region-proxy. @@ -84,7 +84,7 @@ public static PolicyCacheLoader getNewInstance(final AskWithRetryConfig askWithR } /** - * @param actorSystem used to instantiate this class as a singleton via the akka extension mechanism. + * @param actorSystem used to instantiate this class as a singleton via the pekko extension mechanism. * @return the singleton instance of this {@link PolicyCacheLoader}. */ public static PolicyCacheLoader getSingletonInstance(final ActorSystem actorSystem) { diff --git a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/PolicyEnforcerProviderExtension.java b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/PolicyEnforcerProviderExtension.java index 5351879657..099ce143fb 100644 --- a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/PolicyEnforcerProviderExtension.java +++ b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/PolicyEnforcerProviderExtension.java @@ -12,10 +12,10 @@ */ package org.eclipse.ditto.policies.enforcement; -import akka.actor.AbstractExtensionId; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.actor.Extension; +import org.apache.pekko.actor.AbstractExtensionId; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.actor.Extension; /** * Provides a singleton instance of a {@link org.eclipse.ditto.policies.enforcement.PolicyEnforcerProvider}. diff --git a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/BlockedNamespacePreEnforcer.java b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/BlockedNamespacePreEnforcer.java index e428fc2963..409eda1597 100644 --- a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/BlockedNamespacePreEnforcer.java +++ b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/BlockedNamespacePreEnforcer.java @@ -20,7 +20,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Pre-Enforcer for blocking commands to blocked namespaces diff --git a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/CommandWithOptionalEntityPreEnforcer.java b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/CommandWithOptionalEntityPreEnforcer.java index 8d5c2f6da5..8d52e5e0ab 100644 --- a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/CommandWithOptionalEntityPreEnforcer.java +++ b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/CommandWithOptionalEntityPreEnforcer.java @@ -28,7 +28,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Pre-Enforcer which checks that commands that modify entities cause no harm downstream. diff --git a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/CreationRestrictionPreEnforcer.java b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/CreationRestrictionPreEnforcer.java index ad6e0c3b6c..cc6308470e 100644 --- a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/CreationRestrictionPreEnforcer.java +++ b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/CreationRestrictionPreEnforcer.java @@ -26,15 +26,15 @@ import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.eclipse.ditto.base.model.signals.Signal; import org.eclipse.ditto.base.model.signals.commands.Command; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.policies.enforcement.config.CreationRestrictionConfig; import org.eclipse.ditto.policies.enforcement.config.DefaultEntityCreationConfig; import org.eclipse.ditto.policies.enforcement.config.EntityCreationConfig; import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Pre-Enforcer for evaluating if creation of new entities should be restricted. diff --git a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/PolicyImportsPreEnforcer.java b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/PolicyImportsPreEnforcer.java index 0183254479..26767360aa 100644 --- a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/PolicyImportsPreEnforcer.java +++ b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/PolicyImportsPreEnforcer.java @@ -23,8 +23,8 @@ import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.eclipse.ditto.base.model.signals.Signal; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.policies.api.Permission; import org.eclipse.ditto.policies.enforcement.PolicyEnforcer; import org.eclipse.ditto.policies.enforcement.PolicyEnforcerProvider; @@ -47,7 +47,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Pre-Enforcer for authorizing modifications to policy imports. diff --git a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/PreEnforcer.java b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/PreEnforcer.java index 6955d2a1ce..83d28f6009 100644 --- a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/PreEnforcer.java +++ b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/PreEnforcer.java @@ -25,8 +25,8 @@ import org.eclipse.ditto.base.model.exceptions.DittoInternalErrorException; import org.eclipse.ditto.base.model.headers.WithDittoHeaders; import org.eclipse.ditto.base.model.signals.Signal; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.extension.DittoExtensionPoint; /** diff --git a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/PreEnforcerProvider.java b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/PreEnforcerProvider.java index 401fe6bd60..019adfcaee 100644 --- a/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/PreEnforcerProvider.java +++ b/policies/enforcement/src/main/java/org/eclipse/ditto/policies/enforcement/pre/PreEnforcerProvider.java @@ -32,7 +32,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Extension to provide the Pre-Enforcers for a service. diff --git a/policies/enforcement/src/test/java/org/eclipse/ditto/policies/enforcement/CachingPolicyEnforcerProviderTest.java b/policies/enforcement/src/test/java/org/eclipse/ditto/policies/enforcement/CachingPolicyEnforcerProviderTest.java index bd81f49db2..f8aa00a7d1 100644 --- a/policies/enforcement/src/test/java/org/eclipse/ditto/policies/enforcement/CachingPolicyEnforcerProviderTest.java +++ b/policies/enforcement/src/test/java/org/eclipse/ditto/policies/enforcement/CachingPolicyEnforcerProviderTest.java @@ -37,14 +37,14 @@ import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.cluster.ddata.ORSet; -import akka.cluster.ddata.Replicator; -import akka.cluster.ddata.SelfUniqueAddress; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.cluster.ddata.ORSet; +import org.apache.pekko.cluster.ddata.Replicator; +import org.apache.pekko.cluster.ddata.SelfUniqueAddress; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; @RunWith(MockitoJUnitRunner.class) public final class CachingPolicyEnforcerProviderTest { diff --git a/policies/enforcement/src/test/java/org/eclipse/ditto/policies/enforcement/DefaultPolicyEnforcerProviderTest.java b/policies/enforcement/src/test/java/org/eclipse/ditto/policies/enforcement/DefaultPolicyEnforcerProviderTest.java index 9adfc144a0..02620e938b 100644 --- a/policies/enforcement/src/test/java/org/eclipse/ditto/policies/enforcement/DefaultPolicyEnforcerProviderTest.java +++ b/policies/enforcement/src/test/java/org/eclipse/ditto/policies/enforcement/DefaultPolicyEnforcerProviderTest.java @@ -30,7 +30,7 @@ import com.github.benmanes.caffeine.cache.AsyncCacheLoader; -import akka.dispatch.MessageDispatcher; +import org.apache.pekko.dispatch.MessageDispatcher; @RunWith(MockitoJUnitRunner.class) public final class DefaultPolicyEnforcerProviderTest { diff --git a/policies/enforcement/src/test/java/org/eclipse/ditto/policies/enforcement/PolicyEnforcerCacheTest.java b/policies/enforcement/src/test/java/org/eclipse/ditto/policies/enforcement/PolicyEnforcerCacheTest.java index 9a752a3ffe..18a72d3b99 100644 --- a/policies/enforcement/src/test/java/org/eclipse/ditto/policies/enforcement/PolicyEnforcerCacheTest.java +++ b/policies/enforcement/src/test/java/org/eclipse/ditto/policies/enforcement/PolicyEnforcerCacheTest.java @@ -35,8 +35,8 @@ import com.github.benmanes.caffeine.cache.AsyncCacheLoader; -import akka.actor.ActorSystem; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.concurrent.ExecutionContextExecutor; public final class PolicyEnforcerCacheTest { diff --git a/policies/enforcement/src/test/java/org/eclipse/ditto/policies/enforcement/pre/CreationRestrictionPreEnforcerTest.java b/policies/enforcement/src/test/java/org/eclipse/ditto/policies/enforcement/pre/CreationRestrictionPreEnforcerTest.java index 19dc891f7b..92d68b1a00 100644 --- a/policies/enforcement/src/test/java/org/eclipse/ditto/policies/enforcement/pre/CreationRestrictionPreEnforcerTest.java +++ b/policies/enforcement/src/test/java/org/eclipse/ditto/policies/enforcement/pre/CreationRestrictionPreEnforcerTest.java @@ -28,7 +28,7 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; public final class CreationRestrictionPreEnforcerTest { diff --git a/policies/enforcement/src/test/resources/test.conf b/policies/enforcement/src/test/resources/test.conf index 2e56e94ea9..3940118c88 100644 --- a/policies/enforcement/src/test/resources/test.conf +++ b/policies/enforcement/src/test/resources/test.conf @@ -20,11 +20,11 @@ ditto { } } -akka { +pekko { - loggers = ["akka.event.slf4j.Slf4jLogger"] + loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"] loglevel = "DEBUG" - logging-filter = "akka.event.DefaultLoggingFilter" + logging-filter = "org.apache.pekko.event.DefaultLoggingFilter" logger-startup-timeout = 60s # for log messages during the actor system is starting up and shutting down: @@ -33,7 +33,7 @@ akka { log-config-on-start = on actor { - provider = "akka.cluster.ClusterActorRefProvider" + provider = "org.apache.pekko.cluster.ClusterActorRefProvider" } remote { @@ -47,7 +47,7 @@ akka { } extensions = [ - "akka.cluster.pubsub.DistributedPubSub" + "org.apache.pekko.cluster.pubsub.DistributedPubSub" ] test { @@ -67,7 +67,7 @@ akka { default-timeout = 5s calling-thread-dispatcher { - type = akka.testkit.CallingThreadDispatcherConfigurator + type = org.apache.pekko.testkit.CallingThreadDispatcherConfigurator } } } diff --git a/policies/service/pom.xml b/policies/service/pom.xml index 812398fd46..8e7ca22f80 100644 --- a/policies/service/pom.xml +++ b/policies/service/pom.xml @@ -46,7 +46,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko org.eclipse.ditto @@ -77,28 +77,28 @@ ditto-internal-utils-pubsub-policies - com.typesafe.akka - akka-actor_${scala.version} + org.apache.pekko + pekko-actor_${scala.version} - com.typesafe.akka - akka-cluster_${scala.version} + org.apache.pekko + pekko-cluster_${scala.version} - com.typesafe.akka - akka-cluster-tools_${scala.version} + org.apache.pekko + pekko-cluster-tools_${scala.version} - com.typesafe.akka - akka-slf4j_${scala.version} + org.apache.pekko + pekko-slf4j_${scala.version} - com.typesafe.akka - akka-stream_${scala.version} + org.apache.pekko + pekko-stream_${scala.version} - com.typesafe.akka - akka-http_${scala.version} + org.apache.pekko + pekko-http_${scala.version} @@ -118,13 +118,13 @@ - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko test-jar test @@ -142,7 +142,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko test test-jar @@ -160,8 +160,8 @@ test - com.github.dnvriend - akka-persistence-inmemory_${scala.version} + io.github.alstanchev + pekko-persistence-inmemory_${scala.version} test @@ -321,7 +321,7 @@ - random-akka-tcp-port + random-pekko-tcp-port @@ -338,7 +338,7 @@ true - ${random-akka-tcp-port} + ${random-pekko-tcp-port} diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/enforcement/pre/ModifyToCreatePolicyTransformer.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/enforcement/pre/ModifyToCreatePolicyTransformer.java index 03e30850e2..7165f18e78 100644 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/enforcement/pre/ModifyToCreatePolicyTransformer.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/enforcement/pre/ModifyToCreatePolicyTransformer.java @@ -22,7 +22,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Transforms a ModifyPolicy into a CreatePolicy if the thing does not exist already. diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/enforcement/pre/PolicyExistenceChecker.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/enforcement/pre/PolicyExistenceChecker.java index 0e0c8467bc..3dbefc9816 100644 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/enforcement/pre/PolicyExistenceChecker.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/enforcement/pre/PolicyExistenceChecker.java @@ -26,8 +26,8 @@ import com.github.benmanes.caffeine.cache.AsyncCacheLoader; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; /** * checks for the existence of policies. diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/enforcement/pre/PreEnforcementPolicyIdCacheLoader.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/enforcement/pre/PreEnforcementPolicyIdCacheLoader.java index aa93b20e67..51e3a53011 100644 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/enforcement/pre/PreEnforcementPolicyIdCacheLoader.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/enforcement/pre/PreEnforcementPolicyIdCacheLoader.java @@ -30,8 +30,8 @@ import com.github.benmanes.caffeine.cache.AsyncCacheLoader; -import akka.actor.ActorRef; -import akka.actor.Scheduler; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Scheduler; /** * Cache loader used for Policy existence check in pre-enforcement. diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PoliciesPersistenceStreamingActorCreator.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PoliciesPersistenceStreamingActorCreator.java index 39995effe5..73c0479899 100644 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PoliciesPersistenceStreamingActorCreator.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PoliciesPersistenceStreamingActorCreator.java @@ -20,7 +20,7 @@ import org.eclipse.ditto.policies.api.PolicyTag; import org.eclipse.ditto.policies.model.PolicyId; -import akka.actor.Props; +import org.apache.pekko.actor.Props; /** @@ -39,9 +39,9 @@ private PoliciesPersistenceStreamingActorCreator() { } /** - * Creates Akka configuration object Props for this PersistenceQueriesActor. + * Creates Pekko configuration object Props for this PersistenceQueriesActor. * - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props() { return DefaultPersistenceStreamingActor.props(PolicyTag.class, diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyEnforcerActor.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyEnforcerActor.java index 8830ec4625..1d262123a5 100644 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyEnforcerActor.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyEnforcerActor.java @@ -30,7 +30,7 @@ import org.eclipse.ditto.policies.model.signals.commands.modify.CreatePolicy; import org.eclipse.ditto.policies.service.enforcement.PolicyCommandEnforcement; -import akka.actor.Props; +import org.apache.pekko.actor.Props; /** * Enforcer responsible for enforcing {@link PolicyCommand}s and filtering {@link PolicyCommandResponse}s utilizing the @@ -48,7 +48,7 @@ private PolicyEnforcerActor(final PolicyId policyId, final PolicyCommandEnforcem } /** - * Creates Akka configuration object Props for this Actor. + * Creates Pekko configuration object Props for this Actor. * * @param policyId the PolicyId this enforcer actor is responsible for. * @param policyCommandEnforcement the policy command enforcement logic to apply in the enforcer. diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceActor.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceActor.java index 3fbaa4a757..3622c9b517 100755 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceActor.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceActor.java @@ -47,10 +47,10 @@ import org.eclipse.ditto.policies.service.persistence.actors.strategies.commands.PolicyCommandStrategies; import org.eclipse.ditto.policies.service.persistence.actors.strategies.events.PolicyEventStrategies; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.persistence.RecoveryCompleted; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.persistence.RecoveryCompleted; /** * PersistentActor which "knows" the state of a single {@link Policy}. @@ -66,12 +66,12 @@ public final class PolicyPersistenceActor /** * The ID of the journal plugin this persistence actor uses. */ - static final String JOURNAL_PLUGIN_ID = "akka-contrib-mongodb-persistence-policies-journal"; + static final String JOURNAL_PLUGIN_ID = "pekko-contrib-mongodb-persistence-policies-journal"; /** * The ID of the snapshot plugin this persistence actor uses. */ - static final String SNAPSHOT_PLUGIN_ID = "akka-contrib-mongodb-persistence-policies-snapshots"; + static final String SNAPSHOT_PLUGIN_ID = "pekko-contrib-mongodb-persistence-policies-snapshots"; private final ActorRef pubSubMediator; private final PolicyConfig policyConfig; @@ -110,14 +110,14 @@ private PolicyPersistenceActor(final PolicyId policyId, } /** - * Creates Akka configuration object {@link Props} for this PolicyPersistenceActor. + * Creates Pekko configuration object {@link Props} for this PolicyPersistenceActor. * * @param policyId the ID of the Policy this Actor manages. * @param mongoReadJournal the ReadJournal used for gaining access to historical values of the policy. * @param pubSubMediator the PubSub mediator actor. * @param announcementManager manager of policy announcements. * @param policyConfig the policy config. - * @return the Akka configuration Props object + * @return the Pekko configuration Props object */ public static Props props(final PolicyId policyId, final MongoReadJournal mongoReadJournal, diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceActorMailbox.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceActorMailbox.java index 6433243bd1..3d5dcad08e 100755 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceActorMailbox.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceActorMailbox.java @@ -21,16 +21,16 @@ import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.dispatch.DequeBasedMessageQueue; -import akka.dispatch.Envelope; -import akka.dispatch.MailboxType; -import akka.dispatch.MessageQueue; -import akka.dispatch.ProducesMessageQueue; -import akka.dispatch.UnboundedDequeBasedMessageQueueSemantics; -import akka.event.Logging; -import akka.event.LoggingAdapter; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.dispatch.DequeBasedMessageQueue; +import org.apache.pekko.dispatch.Envelope; +import org.apache.pekko.dispatch.MailboxType; +import org.apache.pekko.dispatch.MessageQueue; +import org.apache.pekko.dispatch.ProducesMessageQueue; +import org.apache.pekko.dispatch.UnboundedDequeBasedMessageQueueSemantics; +import org.apache.pekko.event.Logging; +import org.apache.pekko.event.LoggingAdapter; /** * Mailbox which handles {@link PolicyModifyCommand}s which should be passed to the {@link org.eclipse.ditto.policies.service.persistence.actors.PolicyPersistenceActor} in a @@ -52,7 +52,7 @@ public class PolicyPersistenceActorMailbox implements MailboxType, /** * Creates a new {@code PolicyBoundedMailbox}. - * This constructor signature must exist, it will be called by Akka. + * This constructor signature must exist, it will be called by Pekko. * * @param settings the ActorSystem settings. * @param config the config. diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceOperationsActor.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceOperationsActor.java index e82a2a5b0b..5539b1e731 100644 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceOperationsActor.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceOperationsActor.java @@ -27,8 +27,8 @@ import com.mongodb.reactivestreams.client.MongoDatabase; import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; /** * Ops for the event-sourcing persistence of policies. @@ -55,7 +55,7 @@ public final class PolicyPersistenceOperationsActor extends AbstractPersistenceO /** * Create Props of this actor. * - * @param pubSubMediator Akka pub-sub mediator. + * @param pubSubMediator Pekko pub-sub mediator. * @param mongoDbConfig the MongoDB configuration settings. * @param config Configuration with info about event journal, snapshot store and database. * @param persistenceOperationsConfig the persistence operations configuration settings. diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicySupervisorActor.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicySupervisorActor.java index b958bc9ac7..d01fbf3495 100755 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicySupervisorActor.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicySupervisorActor.java @@ -37,9 +37,9 @@ import org.eclipse.ditto.policies.service.enforcement.PolicyCommandEnforcement; import org.eclipse.ditto.policies.service.persistence.actors.announcements.PolicyAnnouncementManager; -import akka.actor.ActorKilledException; -import akka.actor.ActorRef; -import akka.actor.Props; +import org.apache.pekko.actor.ActorKilledException; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; /** * Supervisor for {@link org.eclipse.ditto.policies.service.persistence.actors.PolicyPersistenceActor} which means diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/PolicyAnnouncementAcknowledgementAggregatorActor.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/PolicyAnnouncementAcknowledgementAggregatorActor.java index 183df517dd..e2db7b7556 100644 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/PolicyAnnouncementAcknowledgementAggregatorActor.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/PolicyAnnouncementAcknowledgementAggregatorActor.java @@ -23,13 +23,13 @@ import org.eclipse.ditto.base.model.signals.acks.Acknowledgements; import org.eclipse.ditto.base.model.signals.commands.exceptions.CommandTimeoutException; import org.eclipse.ditto.base.service.acknowledgements.AcknowledgementAggregator; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.policies.model.PolicyId; import org.eclipse.ditto.policies.model.signals.announcements.PolicyAnnouncement; -import akka.actor.AbstractActorWithTimers; -import akka.actor.Props; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.Props; /** * Aggregates acknowledgements for a published {@link PolicyAnnouncement} diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/PolicyAnnouncementManager.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/PolicyAnnouncementManager.java index 68fd1309f2..1091445931 100644 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/PolicyAnnouncementManager.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/PolicyAnnouncementManager.java @@ -21,8 +21,8 @@ import java.util.stream.Collectors; import java.util.stream.StreamSupport; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.pubsub.DistributedPub; import org.eclipse.ditto.policies.model.Policy; import org.eclipse.ditto.policies.model.PolicyEntry; @@ -34,12 +34,12 @@ import org.eclipse.ditto.policies.model.signals.announcements.PolicyAnnouncement; import org.eclipse.ditto.policies.service.common.config.PolicyAnnouncementConfig; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.PoisonPill; -import akka.actor.Props; -import akka.actor.Terminated; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Terminated; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Manager of actors responsible for policy announcements. diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/SubjectExpiryActor.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/SubjectExpiryActor.java index 7fbca9349f..c6bed7d391 100644 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/SubjectExpiryActor.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/SubjectExpiryActor.java @@ -32,8 +32,8 @@ import org.eclipse.ditto.base.model.signals.Signal; import org.eclipse.ditto.base.model.signals.acks.Acknowledgement; import org.eclipse.ditto.base.model.signals.acks.Acknowledgements; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.pubsub.DistributedPub; import org.eclipse.ditto.internal.utils.pubsub.extractors.AckExtractor; import org.eclipse.ditto.policies.model.PolicyId; @@ -45,13 +45,13 @@ import org.eclipse.ditto.policies.service.common.config.PolicyAnnouncementConfig; import org.eclipse.ditto.policies.service.persistence.actors.strategies.commands.SudoDeleteExpiredSubject; -import akka.NotUsed; -import akka.actor.AbstractFSM; -import akka.actor.ActorRef; -import akka.actor.Address; -import akka.actor.Props; -import akka.cluster.Cluster; -import akka.japi.pf.FSMStateFunctionBuilder; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.AbstractFSM; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Address; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.japi.pf.FSMStateFunctionBuilder; import scala.util.Random$; /** diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/AbstractPolicyActionCommandStrategy.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/AbstractPolicyActionCommandStrategy.java index 4e8fa592e0..fcda595420 100644 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/AbstractPolicyActionCommandStrategy.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/AbstractPolicyActionCommandStrategy.java @@ -14,11 +14,11 @@ import org.eclipse.ditto.policies.service.common.config.PolicyConfig; import org.eclipse.ditto.policies.service.persistence.actors.resolvers.SubjectIdFromActionResolver; -import org.eclipse.ditto.internal.utils.akka.AkkaClassLoader; +import org.eclipse.ditto.internal.utils.pekko.PekkoClassLoader; import org.eclipse.ditto.policies.model.signals.commands.actions.PolicyActionCommand; import org.eclipse.ditto.policies.model.signals.events.PolicyActionEvent; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Abstract base class for {@link PolicyActionCommand} strategies. @@ -34,7 +34,7 @@ abstract class AbstractPolicyActionCommandStrategy> { diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/serializer/DefaultPolicyMongoEventAdapter.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/serializer/DefaultPolicyMongoEventAdapter.java index ec5fec64cd..7e3eeb677d 100644 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/serializer/DefaultPolicyMongoEventAdapter.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/serializer/DefaultPolicyMongoEventAdapter.java @@ -14,10 +14,10 @@ import org.eclipse.ditto.policies.model.signals.events.PolicyEvent; -import akka.actor.ExtendedActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; /** - * EventAdapter for {@link PolicyEvent}s persisted into akka-persistence event-journal. + * EventAdapter for {@link PolicyEvent}s persisted into pekko-persistence event-journal. * Converts Event to MongoDB BSON objects and vice versa. */ public final class DefaultPolicyMongoEventAdapter extends AbstractPolicyMongoEventAdapter { diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/serializer/PolicyMongoSnapshotAdapter.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/serializer/PolicyMongoSnapshotAdapter.java index acadbd6b87..4bb3791cb9 100644 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/serializer/PolicyMongoSnapshotAdapter.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/serializer/PolicyMongoSnapshotAdapter.java @@ -27,7 +27,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * A {@link org.eclipse.ditto.internal.utils.persistence.SnapshotAdapter} for snapshotting a diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/signaltransformation/placeholdersubstitution/PoliciesPlaceholderSubstitution.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/signaltransformation/placeholdersubstitution/PoliciesPlaceholderSubstitution.java index a168bb3766..f729b2a747 100644 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/signaltransformation/placeholdersubstitution/PoliciesPlaceholderSubstitution.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/signaltransformation/placeholdersubstitution/PoliciesPlaceholderSubstitution.java @@ -17,7 +17,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Policies specific SignalTransformer which applies substitution of placeholders on a policy command diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/starter/PoliciesRootActor.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/starter/PoliciesRootActor.java index f1ea2413c2..eb9aa31e17 100755 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/starter/PoliciesRootActor.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/starter/PoliciesRootActor.java @@ -17,7 +17,7 @@ import org.eclipse.ditto.base.api.devops.signals.commands.RetrieveStatisticsDetails; import org.eclipse.ditto.base.service.RootChildActorStarter; import org.eclipse.ditto.base.service.actors.DittoRootActor; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.cluster.ClusterUtil; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.internal.utils.cluster.RetrieveStatisticsDetailsResponseSupplier; @@ -42,12 +42,12 @@ import org.eclipse.ditto.policies.service.persistence.actors.PolicyPersistenceOperationsActor; import org.eclipse.ditto.policies.service.persistence.actors.PolicySupervisorActor; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.cluster.sharding.ClusterShardingSettings; -import akka.event.DiagnosticLoggingAdapter; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.sharding.ClusterShardingSettings; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; /** * Parent Actor which takes care of supervision of all other Actors in our system. @@ -142,11 +142,11 @@ private static Props getPolicySupervisorActorProps(final ActorRef pubSubMediator } /** - * Creates Akka configuration object Props for this PoliciesRootActor. + * Creates Pekko configuration object Props for this PoliciesRootActor. * * @param policiesConfig the configuration reader of this service. * @param pubSubMediator the PubSub mediator Actor. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final PoliciesConfig policiesConfig, final ActorRef pubSubMediator) { diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/starter/PoliciesService.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/starter/PoliciesService.java index 8dc5bc91ec..95ec461459 100755 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/starter/PoliciesService.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/starter/PoliciesService.java @@ -22,8 +22,8 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigValueFactory; -import akka.actor.ActorRef; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; /** * Entry point of the Policies Service. @@ -62,7 +62,7 @@ protected Props getMainRootActorProps(final PoliciesConfig policiesConfig, final } @Override - protected Config appendAkkaPersistenceMongoUriToRawConfig() { + protected Config appendPekkoPersistenceMongoUriToRawConfig() { final var mongoDbConfig = serviceSpecificConfig.getMongoDbConfig(); final String mongoDbUri = mongoDbConfig.getMongoDbUri(); return rawConfig.withValue(MONGO_URI_CONFIG_PATH, ConfigValueFactory.fromAnyRef(mongoDbUri)); diff --git a/policies/service/src/main/resources/logback.xml b/policies/service/src/main/resources/logback.xml index 4f1fcea100..11598d115c 100755 --- a/policies/service/src/main/resources/logback.xml +++ b/policies/service/src/main/resources/logback.xml @@ -16,14 +16,14 @@ - %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{akkaSource} - %msg%n + %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{pekkoSource} - %msg%n System.err - %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{akkaSource} - %msg%n + %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{pekkoSource} - %msg%n ERROR @@ -70,9 +70,9 @@ - - - + + + diff --git a/policies/service/src/main/resources/policies-dev.conf b/policies/service/src/main/resources/policies-dev.conf index b0f939ae9b..28d5c9df5d 100755 --- a/policies/service/src/main/resources/policies-dev.conf +++ b/policies/service/src/main/resources/policies-dev.conf @@ -9,7 +9,7 @@ ditto { metrics.prometheus.port = ${?PROMETHEUS_PORT} } -akka { +pekko { management.http.port = 25520 remote { @@ -36,8 +36,8 @@ akka { } seed-nodes = [ - "akka://ditto-cluster@127.0.0.1:2552", # port of the policies service to join in cluster - "akka://ditto-cluster@"${akka.remote.artery.canonical.hostname}":"${akka.remote.artery.canonical.port} + "pekko://ditto-cluster@127.0.0.1:2552", # port of the policies service to join in cluster + "pekko://ditto-cluster@"${pekko.remote.artery.canonical.hostname}":"${pekko.remote.artery.canonical.port} ] } } diff --git a/policies/service/src/main/resources/policies.conf b/policies/service/src/main/resources/policies.conf index ea441dfee6..7f5eaf3451 100755 --- a/policies/service/src/main/resources/policies.conf +++ b/policies/service/src/main/resources/policies.conf @@ -204,7 +204,7 @@ ditto { } } -akka { +pekko { cluster { sharding { role = ${ditto.service-name} @@ -225,16 +225,16 @@ akka { persistence { journal.auto-start-journals = [ - "akka-contrib-mongodb-persistence-policies-journal" + "pekko-contrib-mongodb-persistence-policies-journal" ] snapshot-store.auto-start-snapshot-stores = [ - "akka-contrib-mongodb-persistence-policies-snapshots" + "pekko-contrib-mongodb-persistence-policies-snapshots" ] } } -akka-contrib-mongodb-persistence-policies-journal { - class = "akka.contrib.persistence.mongodb.MongoJournal" +pekko-contrib-mongodb-persistence-policies-journal { + class = "pekko.contrib.persistence.mongodb.MongoJournal" plugin-dispatcher = "policy-journal-persistence-dispatcher" circuit-breaker { @@ -252,6 +252,7 @@ akka-contrib-mongodb-persistence-policies-journal { realtime-collection = "policies_realtime" metadata-collection = "policies_metadata" + metadata-index = "policies_metadata_index" } event-adapters { @@ -264,8 +265,8 @@ akka-contrib-mongodb-persistence-policies-journal { } } -akka-contrib-mongodb-persistence-policies-journal-read { - class = "akka.contrib.persistence.mongodb.MongoReadJournal" +pekko-contrib-mongodb-persistence-policies-journal-read { + class = "pekko.contrib.persistence.mongodb.MongoReadJournal" plugin-dispatcher = "policy-journal-persistence-dispatcher" overrides { @@ -273,11 +274,12 @@ akka-contrib-mongodb-persistence-policies-journal-read { journal-index = "policies_journal_index" realtime-collection = "policies_realtime" metadata-collection = "policies_metadata" + metadata-index = "policies_metadata_index" } } -akka-contrib-mongodb-persistence-policies-snapshots { - class = "akka.contrib.persistence.mongodb.MongoSnapshots" +pekko-contrib-mongodb-persistence-policies-snapshots { + class = "pekko.contrib.persistence.mongodb.MongoSnapshots" plugin-dispatcher = "policy-snaps-persistence-dispatcher" circuit-breaker { @@ -340,8 +342,8 @@ blocked-namespaces-dispatcher { throughput = 5 } -akka.contrib.persistence.mongodb.mongo { - +pekko.contrib.persistence.mongodb.mongo { + metadata-index = "akka_persistence_metadata_pid" collection-cache { journal { class = "org.eclipse.ditto.internal.utils.persistence.mongo.DittoMongoCollectionCache" diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/enforcement/PolicyCommandEnforcementTest.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/enforcement/PolicyCommandEnforcementTest.java index fcb75ae0ce..42497e0ad7 100644 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/enforcement/PolicyCommandEnforcementTest.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/enforcement/PolicyCommandEnforcementTest.java @@ -94,12 +94,12 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.testkit.TestActorRef; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.testkit.TestActorRef; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link PolicyCommandEnforcement} in context of a {@link PolicyEnforcerActor}. diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PersistenceActorTestBase.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PersistenceActorTestBase.java index 9d748751c2..5a912a2f30 100644 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PersistenceActorTestBase.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PersistenceActorTestBase.java @@ -52,11 +52,11 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.stream.Attributes; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Base test class for testing persistence actors of the policies persistence. @@ -152,7 +152,7 @@ protected void setUpBase() { } private void init(final Config config) { - actorSystem = ActorSystem.create("AkkaTestSystem", config); + actorSystem = ActorSystem.create("PekkoTestSystem", config); pubSubMediatorTestProbe = new TestProbe(actorSystem, "mock-pubSub-mediator"); pubSubMediator = pubSubMediatorTestProbe.ref(); dittoHeadersV2 = createDittoHeaders(JsonSchemaVersion.V_2, AUTH_SUBJECT); diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceActorSnapshottingTest.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceActorSnapshottingTest.java index 10ccdd21ee..69377b0511 100755 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceActorSnapshottingTest.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceActorSnapshottingTest.java @@ -66,11 +66,11 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigValueFactory; -import akka.actor.ActorRef; -import akka.actor.ExtendedActorSystem; -import akka.actor.PoisonPill; -import akka.actor.Props; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.actor.Props; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Unit test for the snapshotting functionality of {@link org.eclipse.ditto.policies.service.persistence.actors.PolicyPersistenceActor}. diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceActorTest.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceActorTest.java index 01a541a78f..fac8966797 100755 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceActorTest.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceActorTest.java @@ -129,21 +129,21 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.AbstractActor; -import akka.actor.Actor; -import akka.actor.ActorRef; -import akka.actor.OneForOneStrategy; -import akka.actor.PoisonPill; -import akka.actor.Props; -import akka.actor.SupervisorStrategy; -import akka.cluster.Cluster; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.cluster.sharding.ClusterSharding; -import akka.cluster.sharding.ClusterShardingSettings; -import akka.japi.pf.DeciderBuilder; -import akka.japi.pf.ReceiveBuilder; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.Actor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.OneForOneStrategy; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.cluster.sharding.ClusterSharding; +import org.apache.pekko.cluster.sharding.ClusterShardingSettings; +import org.apache.pekko.japi.pf.DeciderBuilder; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.PartialFunction; /** diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceOperationsActorIT.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceOperationsActorIT.java index 8ee2759eec..f6382e316e 100644 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceOperationsActorIT.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceOperationsActorIT.java @@ -54,14 +54,14 @@ import com.typesafe.config.Config; -import akka.Done; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.stream.javadsl.Source; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.Done; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link org.eclipse.ditto.policies.service.persistence.actors.PolicyPersistenceOperationsActor}. diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PolicySupervisorActorTest.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PolicySupervisorActorTest.java index 12f659dcd3..9b5793ea0b 100644 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PolicySupervisorActorTest.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PolicySupervisorActorTest.java @@ -38,9 +38,9 @@ import org.mockito.Mock; import org.mockito.Mockito; -import akka.stream.Attributes; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.stream.Attributes; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; import java.time.Duration; import java.time.temporal.ChronoUnit; diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/PolicyAnnouncementManagerTest.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/PolicyAnnouncementManagerTest.java index aaaa4072bc..a0a375843b 100644 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/PolicyAnnouncementManagerTest.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/PolicyAnnouncementManagerTest.java @@ -30,13 +30,13 @@ import org.junit.After; import org.junit.Test; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.actor.Terminated; -import akka.japi.pf.ReceiveBuilder; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Terminated; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link PolicyAnnouncementManager}. diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/SubjectExpiryActorTest.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/SubjectExpiryActorTest.java index f8b5ce2260..0c627315f2 100644 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/SubjectExpiryActorTest.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/announcements/SubjectExpiryActorTest.java @@ -50,11 +50,11 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.FSM; -import akka.actor.Props; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.FSM; +import org.apache.pekko.actor.Props; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link SubjectExpiryActor}. diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/AbstractPolicyCommandStrategyTest.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/AbstractPolicyCommandStrategyTest.java index 38cd8480b1..1bb02fa8ea 100644 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/AbstractPolicyCommandStrategyTest.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/AbstractPolicyCommandStrategyTest.java @@ -36,8 +36,8 @@ import org.eclipse.ditto.base.model.signals.commands.Command; import org.eclipse.ditto.base.model.signals.commands.CommandResponse; import org.eclipse.ditto.base.model.signals.events.Event; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; import org.eclipse.ditto.internal.utils.persistentactors.commands.CommandStrategy; import org.eclipse.ditto.internal.utils.persistentactors.commands.DefaultContext; import org.eclipse.ditto.internal.utils.persistentactors.results.Result; diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/ActivateTokenIntegrationStrategyTest.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/ActivateTokenIntegrationStrategyTest.java index 99da93ad1c..3b20dc6a40 100644 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/ActivateTokenIntegrationStrategyTest.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/ActivateTokenIntegrationStrategyTest.java @@ -45,7 +45,7 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Unit test for {@link org.eclipse.ditto.policies.service.persistence.actors.strategies.commands.ActivateTokenIntegrationStrategy}. diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/DeactivateTokenIntegrationStrategyTest.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/DeactivateTokenIntegrationStrategyTest.java index 496f204040..8060fac17c 100644 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/DeactivateTokenIntegrationStrategyTest.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/DeactivateTokenIntegrationStrategyTest.java @@ -35,7 +35,7 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Unit test for {@link org.eclipse.ditto.policies.service.persistence.actors.strategies.commands.DeactivateTokenIntegrationStrategy}. diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/PolicyConflictStrategyTest.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/PolicyConflictStrategyTest.java index 71ea898004..846808b7bf 100644 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/PolicyConflictStrategyTest.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/PolicyConflictStrategyTest.java @@ -25,8 +25,8 @@ import org.eclipse.ditto.base.model.headers.WithDittoHeaders; import org.eclipse.ditto.base.model.headers.entitytag.EntityTagMatchers; import org.eclipse.ditto.base.model.signals.commands.Command; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; import org.eclipse.ditto.internal.utils.persistentactors.commands.CommandStrategy; import org.eclipse.ditto.internal.utils.persistentactors.commands.DefaultContext; import org.eclipse.ditto.internal.utils.persistentactors.results.Result; diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/TopLevelPolicyActionCommandStrategyTest.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/TopLevelPolicyActionCommandStrategyTest.java index 6081917fbd..8c2a89daa8 100644 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/TopLevelPolicyActionCommandStrategyTest.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/strategies/commands/TopLevelPolicyActionCommandStrategyTest.java @@ -57,7 +57,7 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Tests {@link org.eclipse.ditto.policies.service.persistence.actors.strategies.commands.TopLevelPolicyActionCommandStrategy}. diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/testhelper/PoliciesJournalTestHelper.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/testhelper/PoliciesJournalTestHelper.java index 16c905e990..2df2d1acc6 100755 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/testhelper/PoliciesJournalTestHelper.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/testhelper/PoliciesJournalTestHelper.java @@ -27,17 +27,17 @@ import org.bson.BsonDocument; import org.eclipse.ditto.policies.model.PolicyId; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.persistence.inmemory.query.javadsl.InMemoryReadJournal; -import akka.persistence.query.EventEnvelope; -import akka.persistence.query.PersistenceQuery; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.persistence.inmemory.query.javadsl.InMemoryReadJournal; +import org.apache.pekko.persistence.query.EventEnvelope; +import org.apache.pekko.persistence.query.PersistenceQuery; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** - * Helper class which provides functionality for testing with Akka persistence journal for the policies services. - * Requires akka-persistence-inmemory (by com.github.dnvriend). + * Helper class which provides functionality for testing with Pekko persistence journal for the policies services. + * Requires pekko-persistence-inmemory (by com.github.alstanchev). * * @param the domain specific datatype stored in the journal */ diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/testhelper/PoliciesSnapshotTestHelper.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/testhelper/PoliciesSnapshotTestHelper.java index bec8512a5a..1a047e0c7d 100755 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/testhelper/PoliciesSnapshotTestHelper.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/testhelper/PoliciesSnapshotTestHelper.java @@ -29,25 +29,25 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.pattern.Patterns; -import akka.persistence.Persistence; -import akka.persistence.SelectedSnapshot; -import akka.persistence.SnapshotProtocol; -import akka.persistence.SnapshotSelectionCriteria; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.persistence.Persistence; +import org.apache.pekko.persistence.SelectedSnapshot; +import org.apache.pekko.persistence.SnapshotProtocol; +import org.apache.pekko.persistence.SnapshotSelectionCriteria; import scala.Option; /** - * Helper class which provides functionality for testing with Akka persistence snapshots for the policies + * Helper class which provides functionality for testing with Pekko persistence snapshots for the policies * services. - * Requires akka-persistence-inmemory (by com.github.dnvriend). + * Requires pekko-persistence-inmemory (by com.github.dnvriend). * * @param the domain specific datatype stored as snapshot */ public final class PoliciesSnapshotTestHelper { - private static final String SNAPSHOT_PLUGIN_ID = "akka-contrib-mongodb-persistence-policies-snapshots"; + private static final String SNAPSHOT_PLUGIN_ID = "pekko-contrib-mongodb-persistence-policies-snapshots"; private static final int WAIT_TIMEOUT = 3; private final Function domainIdToPersistenceId; diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/signaltransformation/placeholdersubstitution/AbstractPolicySubstitutionStrategyTestBase.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/signaltransformation/placeholdersubstitution/AbstractPolicySubstitutionStrategyTestBase.java index dc3cdeaeec..19e6336d56 100644 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/signaltransformation/placeholdersubstitution/AbstractPolicySubstitutionStrategyTestBase.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/signaltransformation/placeholdersubstitution/AbstractPolicySubstitutionStrategyTestBase.java @@ -30,7 +30,7 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Abstract base class for test of concrete implementations of diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/signaltransformation/placeholdersubstitution/PoliciesPlaceholderSubstitutionTest.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/signaltransformation/placeholdersubstitution/PoliciesPlaceholderSubstitutionTest.java index 2124484047..b8f96a3e8c 100644 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/signaltransformation/placeholdersubstitution/PoliciesPlaceholderSubstitutionTest.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/signaltransformation/placeholdersubstitution/PoliciesPlaceholderSubstitutionTest.java @@ -42,7 +42,7 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Tests specifics of {@link PoliciesPlaceholderSubstitution}. diff --git a/policies/service/src/test/java/org/eclipse/ditto/policies/service/starter/PoliciesRootActorTest.java b/policies/service/src/test/java/org/eclipse/ditto/policies/service/starter/PoliciesRootActorTest.java index c450d309bb..7ea84f36ca 100644 --- a/policies/service/src/test/java/org/eclipse/ditto/policies/service/starter/PoliciesRootActorTest.java +++ b/policies/service/src/test/java/org/eclipse/ditto/policies/service/starter/PoliciesRootActorTest.java @@ -17,8 +17,8 @@ import org.eclipse.ditto.policies.service.common.config.DittoPoliciesConfig; import org.eclipse.ditto.policies.service.common.config.PoliciesConfig; -import akka.actor.ActorSystem; -import akka.actor.Props; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; /** * Tests {@link org.eclipse.ditto.policies.service.starter.PoliciesRootActor}. diff --git a/policies/service/src/test/resources/test.conf b/policies/service/src/test/resources/test.conf index 61cfef9f55..b29eb2cb4a 100755 --- a/policies/service/src/test/resources/test.conf +++ b/policies/service/src/test/resources/test.conf @@ -26,10 +26,10 @@ ditto { mapping-strategy.implementation = "org.eclipse.ditto.policies.api.PoliciesMappingStrategies" } -akka { - loggers = ["akka.event.slf4j.Slf4jLogger"] +pekko { + loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"] loglevel = "WARNING" - logging-filter = "akka.event.slf4j.Slf4jLoggingFilter" + logging-filter = "org.apache.pekko.event.slf4j.Slf4jLoggingFilter" # for log messages during the actor system is starting up and shutting down: stdout-loglevel = "WARNING" @@ -67,7 +67,7 @@ akka { default-timeout = 10s calling-thread-dispatcher { - type = akka.testkit.CallingThreadDispatcherConfigurator + type = org.apache.pekko.testkit.CallingThreadDispatcherConfigurator } } @@ -79,7 +79,7 @@ akka { } } -akka { +pekko { management.http.port = 0 remote { artery { @@ -89,21 +89,21 @@ akka { } } -akka.contrib.persistence.mongodb.mongo { - driver = "akka.contrib.persistence.mongodb.ScalaDriverPersistenceExtension" +pekko.contrib.persistence.mongodb.mongo { + driver = "pekko.contrib.persistence.mongodb.driver.ScalaDriverPersistenceExtension" } -akka.persistence { +pekko.persistence { journal.auto-start-journals = [ - "akka-contrib-mongodb-persistence-policies-journal" + "pekko-contrib-mongodb-persistence-policies-journal" ] snapshot-store.auto-start-snapshot-stores = [ - "akka-contrib-mongodb-persistence-policies-snapshots" + "pekko-contrib-mongodb-persistence-policies-snapshots" ] } -akka-contrib-mongodb-persistence-policies-journal { - class = "akka.persistence.inmemory.journal.InMemoryAsyncWriteJournal" +pekko-contrib-mongodb-persistence-policies-journal { + class = "org.apache.pekko.persistence.inmemory.journal.InMemoryAsyncWriteJournal" plugin-dispatcher = "policy-persistence-dispatcher" ask-timeout = 10s @@ -118,8 +118,8 @@ akka-contrib-mongodb-persistence-policies-journal { } } -akka-contrib-mongodb-persistence-policies-snapshots { - class = "akka.persistence.inmemory.snapshot.InMemorySnapshotStore" +pekko-contrib-mongodb-persistence-policies-snapshots { + class = "org.apache.pekko.persistence.inmemory.snapshot.InMemorySnapshotStore" plugin-dispatcher = "policy-persistence-dispatcher" ask-timeout = 10s diff --git a/pom.xml b/pom.xml index 3c1fbbbaf9..0fcef91001 100644 --- a/pom.xml +++ b/pom.xml @@ -254,6 +254,14 @@ ${project.basedir}/target/site/jacoco/jacoco.xml + + + apache-releases + apache-releases + https://repository.apache.org/content/repositories/releases/ + + + diff --git a/rql/parser/pom.xml b/rql/parser/pom.xml index bf9b7ef84a..543f2e7fa0 100755 --- a/rql/parser/pom.xml +++ b/rql/parser/pom.xml @@ -43,9 +43,14 @@ - com.typesafe.akka - akka-parsing_${scala.version} + org.apache.pekko + pekko-parsing_${scala.version} + + org.parboiled + parboiled_${scala.version} + + @@ -140,7 +145,8 @@ !org.eclipse.ditto.utils.jsr305.annotations, - akka*, + org.apache.pekko*, + org.parboiled2*, scala*, org.eclipse.ditto.* diff --git a/rql/parser/src/main/scala/org/eclipse/ditto/rql/parser/internal/RqlParserBase.scala b/rql/parser/src/main/scala/org/eclipse/ditto/rql/parser/internal/RqlParserBase.scala index da1035e5f4..05525c3ae5 100644 --- a/rql/parser/src/main/scala/org/eclipse/ditto/rql/parser/internal/RqlParserBase.scala +++ b/rql/parser/src/main/scala/org/eclipse/ditto/rql/parser/internal/RqlParserBase.scala @@ -12,8 +12,8 @@ */ package org.eclipse.ditto.rql.parser.internal -import akka.parboiled2._ -import akka.shapeless._ +import org.parboiled2._ +import org.parboiled2.support.hlist._ import scala.{:: => _} diff --git a/rql/parser/src/main/scala/org/eclipse/ditto/rql/parser/internal/RqlPredicateParser.scala b/rql/parser/src/main/scala/org/eclipse/ditto/rql/parser/internal/RqlPredicateParser.scala index 4da7f37112..00b916d388 100644 --- a/rql/parser/src/main/scala/org/eclipse/ditto/rql/parser/internal/RqlPredicateParser.scala +++ b/rql/parser/src/main/scala/org/eclipse/ditto/rql/parser/internal/RqlPredicateParser.scala @@ -12,7 +12,7 @@ */ package org.eclipse.ditto.rql.parser.internal -import akka.parboiled2._ +import org.parboiled2._ import org.eclipse.ditto.rql.model.ParserException import org.eclipse.ditto.rql.model.predicates.PredicateParser import org.eclipse.ditto.rql.model.predicates.ast.SingleComparisonNode.Type diff --git a/rql/search-option-parser/pom.xml b/rql/search-option-parser/pom.xml index 71b0e569de..abc00188fd 100755 --- a/rql/search-option-parser/pom.xml +++ b/rql/search-option-parser/pom.xml @@ -47,8 +47,8 @@ - com.typesafe.akka - akka-parsing_${scala.version} + org.apache.pekko + pekko-parsing_${scala.version} @@ -144,7 +144,7 @@ !org.eclipse.ditto.utils.jsr305.annotations, - akka*, + org.apache.pekko*, scala*, org.eclipse.ditto.* @@ -170,18 +170,18 @@ - - com.github.siom79.japicmp - japicmp-maven-plugin - - - - - - - - - + + + + + + + + + + + + diff --git a/rql/search-option-parser/src/main/scala/org/eclipse/ditto/rql/parser/thingsearch/internal/RqlOptionParser.scala b/rql/search-option-parser/src/main/scala/org/eclipse/ditto/rql/parser/thingsearch/internal/RqlOptionParser.scala index 1cd3936731..3360d32727 100644 --- a/rql/search-option-parser/src/main/scala/org/eclipse/ditto/rql/parser/thingsearch/internal/RqlOptionParser.scala +++ b/rql/search-option-parser/src/main/scala/org/eclipse/ditto/rql/parser/thingsearch/internal/RqlOptionParser.scala @@ -12,7 +12,7 @@ */ package org.eclipse.ditto.rql.parser.thingsearch.internal -import akka.parboiled2._ +import org.parboiled2._ import org.eclipse.ditto.rql.model.ParserException import org.eclipse.ditto.rql.parser.internal.RqlParserBase import org.eclipse.ditto.rql.parser.thingsearch.OptionParser diff --git a/things/api/src/main/java/org/eclipse/ditto/things/api/ThingsMessagingConstants.java b/things/api/src/main/java/org/eclipse/ditto/things/api/ThingsMessagingConstants.java index d5b161d0b2..b19c3a4dff 100755 --- a/things/api/src/main/java/org/eclipse/ditto/things/api/ThingsMessagingConstants.java +++ b/things/api/src/main/java/org/eclipse/ditto/things/api/ThingsMessagingConstants.java @@ -49,7 +49,7 @@ public final class ThingsMessagingConstants { public static final String SHARD_REGION = "thing"; /** - * Name of the akka cluster role. + * Name of the pekko cluster role. */ public static final String CLUSTER_ROLE = "things"; diff --git a/things/service/pom.xml b/things/service/pom.xml index 1211905134..3aee953777 100644 --- a/things/service/pom.xml +++ b/things/service/pom.xml @@ -99,7 +99,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko org.eclipse.ditto @@ -119,20 +119,20 @@ - com.typesafe.akka - akka-actor_${scala.version} + org.apache.pekko + pekko-actor_${scala.version} - com.typesafe.akka - akka-slf4j_${scala.version} + org.apache.pekko + pekko-slf4j_${scala.version} - com.typesafe.akka - akka-persistence_${scala.version} + org.apache.pekko + pekko-persistence_${scala.version} - com.typesafe.akka - akka-stream_${scala.version} + org.apache.pekko + pekko-stream_${scala.version} org.eclipse.ditto @@ -140,16 +140,16 @@ - com.typesafe.akka - akka-cluster_${scala.version} + org.apache.pekko + pekko-cluster_${scala.version} - com.typesafe.akka - akka-cluster-tools_${scala.version} + org.apache.pekko + pekko-cluster-tools_${scala.version} - com.typesafe.akka - akka-http_${scala.version} + org.apache.pekko + pekko-http_${scala.version} @@ -169,8 +169,8 @@ - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test @@ -182,7 +182,7 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko test test-jar @@ -230,8 +230,8 @@ test - com.github.dnvriend - akka-persistence-inmemory_${scala.version} + io.github.alstanchev + pekko-persistence-inmemory_${scala.version} test @@ -358,7 +358,7 @@ - random-akka-tcp-port + random-pekko-tcp-port @@ -374,7 +374,7 @@ true - ${random-akka-tcp-port} + ${random-pekko-tcp-port} diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/aggregation/ThingsAggregatorActor.java b/things/service/src/main/java/org/eclipse/ditto/things/service/aggregation/ThingsAggregatorActor.java index 3e6553d631..c44a4003fd 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/aggregation/ThingsAggregatorActor.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/aggregation/ThingsAggregatorActor.java @@ -26,9 +26,9 @@ import org.eclipse.ditto.base.model.json.Jsonifiable; import org.eclipse.ditto.base.model.signals.SignalWithEntityId; import org.eclipse.ditto.base.model.signals.commands.Command; -import org.eclipse.ditto.internal.utils.akka.actors.AbstractActorWithShutdownBehavior; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.actors.AbstractActorWithShutdownBehavior; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.json.JsonFieldSelector; import org.eclipse.ditto.things.api.commands.sudo.SudoRetrieveThing; @@ -37,18 +37,18 @@ import org.eclipse.ditto.things.model.signals.commands.query.RetrieveThing; import org.eclipse.ditto.things.model.signals.commands.query.RetrieveThings; -import akka.Done; -import akka.actor.ActorRef; -import akka.actor.CoordinatedShutdown; -import akka.actor.Props; -import akka.cluster.pubsub.DistributedPubSub; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; -import akka.stream.SourceRef; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.StreamRefs; -import akka.util.Timeout; +import org.apache.pekko.Done; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.CoordinatedShutdown; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.pubsub.DistributedPubSub; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.SourceRef; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.StreamRefs; +import org.apache.pekko.util.Timeout; /** * Actor to aggregate the retrieved Things from persistence. @@ -76,10 +76,10 @@ private ThingsAggregatorActor(final ActorRef targetActor, final ThingsAggregator } /** - * Creates Akka configuration object Props for this ThingsAggregatorActor. + * Creates Pekko configuration object Props for this ThingsAggregatorActor. * * @param targetActor the Actor selection to delegate "asks" for the aggregation to. - * @return the Akka configuration Props object + * @return the Pekko configuration Props object */ public static Props props(final ActorRef targetActor, final ThingsAggregatorConfig aggregatorConfig, final ActorRef pubSubMediator) { diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/PolicyIdReferencePlaceholderResolver.java b/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/PolicyIdReferencePlaceholderResolver.java index e4a0e63c6d..3b1e3335ec 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/PolicyIdReferencePlaceholderResolver.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/PolicyIdReferencePlaceholderResolver.java @@ -23,9 +23,9 @@ import org.eclipse.ditto.base.model.exceptions.DittoInternalErrorException; import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; import org.eclipse.ditto.base.model.headers.DittoHeaders; -import org.eclipse.ditto.internal.utils.akka.logging.AutoCloseableSlf4jLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.AutoCloseableSlf4jLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.cacheloaders.AskWithRetry; import org.eclipse.ditto.internal.utils.cacheloaders.config.AskWithRetryConfig; import org.eclipse.ditto.json.JsonFieldDefinition; @@ -37,8 +37,8 @@ import org.eclipse.ditto.things.model.signals.commands.query.RetrieveThing; import org.eclipse.ditto.things.model.signals.commands.query.RetrieveThingResponse; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; /** * Responsible for resolving a policy id of a referenced entity. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/ThingCommandEnforcement.java b/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/ThingCommandEnforcement.java index 66be66eed4..7896e7f0b0 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/ThingCommandEnforcement.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/ThingCommandEnforcement.java @@ -31,8 +31,8 @@ import org.eclipse.ditto.base.model.signals.commands.Command; import org.eclipse.ditto.base.model.signals.commands.CommandResponse; import org.eclipse.ditto.base.model.signals.commands.CommandToExceptionRegistry; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.cacheloaders.AskWithRetry; import org.eclipse.ditto.internal.utils.cacheloaders.config.AskWithRetryConfig; import org.eclipse.ditto.json.JsonFactory; @@ -78,9 +78,9 @@ import org.eclipse.ditto.things.model.signals.commands.query.ThingQueryCommand; import org.eclipse.ditto.things.model.signals.commands.query.ThingQueryCommandResponse; -import akka.Done; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; +import org.apache.pekko.Done; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; /** * Authorizes {@link ThingCommand}s and filters {@link ThingCommandResponse}s. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/ThingEnforcement.java b/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/ThingEnforcement.java index ff969d271e..cb82581cf9 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/ThingEnforcement.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/ThingEnforcement.java @@ -24,8 +24,8 @@ import org.eclipse.ditto.things.model.Thing; import org.eclipse.ditto.things.model.signals.commands.modify.CreateThing; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; /** * Authorizes {@link Signal}s and filters {@link CommandResponse}s related to things by applying different included diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/ThingEnforcerActor.java b/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/ThingEnforcerActor.java index 422a6ce52a..62639c1a91 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/ThingEnforcerActor.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/ThingEnforcerActor.java @@ -69,11 +69,11 @@ import org.eclipse.ditto.things.model.signals.commands.modify.CreateThing; import org.eclipse.ditto.things.model.signals.commands.modify.ThingModifyCommand; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.pattern.AskTimeoutException; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.pattern.AskTimeoutException; +import org.apache.pekko.pattern.Patterns; /** * Enforcer responsible for enforcing {@link ThingCommand}s and filtering {@link ThingCommandResponse}s utilizing the @@ -109,7 +109,7 @@ private ThingEnforcerActor(final ThingId thingId, } /** - * Creates Akka configuration object Props for this Actor. + * Creates Pekko configuration object Props for this Actor. * * @param thingId the ThingId this enforcer actor is responsible for. * @param thingEnforcement the thing enforcement logic to apply in the enforcer. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/pre/ModifyToCreateThingTransformer.java b/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/pre/ModifyToCreateThingTransformer.java index c4e42a88f0..e800a26b08 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/pre/ModifyToCreateThingTransformer.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/pre/ModifyToCreateThingTransformer.java @@ -30,7 +30,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Transforms a ModifyThing and a MergeThing command into a CreateThing if the thing does not exist already. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/pre/PreEnforcementThingIdCacheLoader.java b/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/pre/PreEnforcementThingIdCacheLoader.java index 71c7a679ba..ed994c89f2 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/pre/PreEnforcementThingIdCacheLoader.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/pre/PreEnforcementThingIdCacheLoader.java @@ -31,8 +31,8 @@ import com.github.benmanes.caffeine.cache.AsyncCacheLoader; -import akka.actor.ActorRef; -import akka.actor.Scheduler; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Scheduler; /** * Cache loader used for Thing existence check in pre-enforcement. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/pre/ThingExistenceChecker.java b/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/pre/ThingExistenceChecker.java index e368e048d0..89d0cc3f36 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/pre/ThingExistenceChecker.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/enforcement/pre/ThingExistenceChecker.java @@ -27,8 +27,8 @@ import com.github.benmanes.caffeine.cache.AsyncCacheLoader; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; /** * checks for the existence of things. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/LiveResponseAndAcknowledgementForwarder.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/LiveResponseAndAcknowledgementForwarder.java index d1feb6ebe8..407873e738 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/LiveResponseAndAcknowledgementForwarder.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/LiveResponseAndAcknowledgementForwarder.java @@ -25,16 +25,16 @@ import org.eclipse.ditto.base.model.signals.acks.Acknowledgements; import org.eclipse.ditto.base.model.signals.commands.CommandResponse; import org.eclipse.ditto.internal.models.signal.correlation.CommandAndCommandResponseMatchingValidator; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.things.model.signals.commands.query.ThingQueryCommand; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.Props; -import akka.actor.ReceiveTimeout; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.ReceiveTimeout; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * An actor to deal with a live thing query command expecting a response and requesting custom acknowledgements. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ResponseReceiverCache.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ResponseReceiverCache.java index ac774e102d..a06632ec43 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ResponseReceiverCache.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ResponseReceiverCache.java @@ -40,11 +40,11 @@ import com.github.benmanes.caffeine.cache.Caffeine; import com.github.benmanes.caffeine.cache.Expiry; -import akka.actor.AbstractExtensionId; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.actor.Extension; +import org.apache.pekko.actor.AbstractExtensionId; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.actor.Extension; /** * A cache of response receivers and their associated correlation ID. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/SupervisorInlinePolicyEnrichment.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/SupervisorInlinePolicyEnrichment.java index b2879f6ca7..c2edcce263 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/SupervisorInlinePolicyEnrichment.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/SupervisorInlinePolicyEnrichment.java @@ -24,7 +24,7 @@ import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.eclipse.ditto.base.model.headers.WithDittoHeaders; import org.eclipse.ditto.base.model.json.FieldType; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.cacheloaders.AskWithRetry; import org.eclipse.ditto.json.JsonFieldSelector; import org.eclipse.ditto.json.JsonObject; @@ -40,13 +40,13 @@ import org.eclipse.ditto.things.model.signals.commands.query.RetrieveThing; import org.eclipse.ditto.things.model.signals.commands.query.RetrieveThingResponse; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.pattern.Patterns; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** * Functionality used in {@link ThingSupervisorActor} for retrieving an inline {@code Policy} together with a diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/SupervisorLiveChannelDispatching.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/SupervisorLiveChannelDispatching.java index a31d4623bf..4195c0927d 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/SupervisorLiveChannelDispatching.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/SupervisorLiveChannelDispatching.java @@ -32,7 +32,7 @@ import org.eclipse.ditto.base.model.signals.UnsupportedSignalException; import org.eclipse.ditto.base.model.signals.commands.CommandResponse; import org.eclipse.ditto.base.model.signals.commands.exceptions.CommandTimeoutException; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.cacheloaders.AskWithRetry; import org.eclipse.ditto.internal.utils.cacheloaders.config.AskWithRetryConfig; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; @@ -57,10 +57,10 @@ import org.eclipse.ditto.things.model.signals.events.ThingEvent; import org.eclipse.ditto.things.service.persistence.actors.strategies.commands.ThingConditionValidator; -import akka.actor.ActorRef; -import akka.actor.ActorRefFactory; -import akka.actor.ActorSystem; -import akka.pattern.AskTimeoutException; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.pattern.AskTimeoutException; /** * Functionality used in {@link ThingSupervisorActor} for dispatching {@code "live"} channel messages. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/SupervisorSmartChannelDispatching.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/SupervisorSmartChannelDispatching.java index 053bd8b084..8b8b0302c6 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/SupervisorSmartChannelDispatching.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/SupervisorSmartChannelDispatching.java @@ -31,16 +31,16 @@ import org.eclipse.ditto.base.model.signals.commands.ErrorResponse; import org.eclipse.ditto.base.model.signals.commands.exceptions.CommandTimeoutException; import org.eclipse.ditto.internal.models.signal.CommandHeaderRestoration; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.persistentactors.TargetActorWithMessage; import org.eclipse.ditto.things.model.signals.commands.ThingCommand; import org.eclipse.ditto.things.model.signals.commands.query.ThingQueryCommand; import org.eclipse.ditto.things.model.signals.commands.query.ThingQueryCommandResponse; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.pattern.AskTimeoutException; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.pattern.AskTimeoutException; +import org.apache.pekko.pattern.Patterns; /** * Functionality used in {@link ThingSupervisorActor} for the "smart channel selection" diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActor.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActor.java index 41bb3dcadd..fd973e4410 100755 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActor.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActor.java @@ -53,10 +53,10 @@ import org.eclipse.ditto.things.service.persistence.actors.strategies.commands.ThingCommandStrategies; import org.eclipse.ditto.things.service.persistence.actors.strategies.events.ThingEventStrategies; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.japi.pf.ReceiveBuilder; -import akka.persistence.RecoveryCompleted; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.persistence.RecoveryCompleted; /** * PersistentActor which "knows" the state of a single {@link Thing}. @@ -72,12 +72,12 @@ public final class ThingPersistenceActor /** * The ID of the journal plugin this persistence actor uses. */ - static final String JOURNAL_PLUGIN_ID = "akka-contrib-mongodb-persistence-things-journal"; + static final String JOURNAL_PLUGIN_ID = "pekko-contrib-mongodb-persistence-things-journal"; /** * The ID of the snapshot plugin this persistence actor uses. */ - static final String SNAPSHOT_PLUGIN_ID = "akka-contrib-mongodb-persistence-things-snapshots"; + static final String SNAPSHOT_PLUGIN_ID = "pekko-contrib-mongodb-persistence-things-snapshots"; private static final AckExtractor> ACK_EXTRACTOR = AckExtractor.of(ThingEvent::getEntityId, ThingEvent::getDittoHeaders); @@ -102,12 +102,12 @@ private ThingPersistenceActor(final ThingId thingId, } /** - * Creates Akka configuration object {@link Props} for this ThingPersistenceActor. + * Creates Pekko configuration object {@link Props} for this ThingPersistenceActor. * * @param thingId the Thing ID this Actor manages. * @param mongoReadJournal the ReadJournal used for gaining access to historical values of the thing. * @param distributedPub the distributed-pub access to publish thing events. - * @return the Akka configuration Props object + * @return the Pekko configuration Props object */ public static Props props(final ThingId thingId, final MongoReadJournal mongoReadJournal, diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorMailbox.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorMailbox.java index c53a93c458..215344fd2b 100755 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorMailbox.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorMailbox.java @@ -21,16 +21,16 @@ import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.dispatch.DequeBasedMessageQueue; -import akka.dispatch.Envelope; -import akka.dispatch.MailboxType; -import akka.dispatch.MessageQueue; -import akka.dispatch.ProducesMessageQueue; -import akka.dispatch.UnboundedDequeBasedMessageQueueSemantics; -import akka.event.Logging; -import akka.event.LoggingAdapter; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.dispatch.DequeBasedMessageQueue; +import org.apache.pekko.dispatch.Envelope; +import org.apache.pekko.dispatch.MailboxType; +import org.apache.pekko.dispatch.MessageQueue; +import org.apache.pekko.dispatch.ProducesMessageQueue; +import org.apache.pekko.dispatch.UnboundedDequeBasedMessageQueueSemantics; +import org.apache.pekko.event.Logging; +import org.apache.pekko.event.LoggingAdapter; /** * Mailbox which handles {@link ThingModifyCommand}s which should be passed to the {@link ThingPersistenceActor} in a @@ -45,7 +45,7 @@ public class ThingPersistenceActorMailbox implements MailboxType, private final int capacity; /** - * Creates a new {@code ThingBoundedMailbox}. This constructor signature must exist, it will be called by Akka. + * Creates a new {@code ThingBoundedMailbox}. This constructor signature must exist, it will be called by Pekko. * * @param settings the ActorSystem settings. * @param config the config. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorPropsFactory.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorPropsFactory.java index a5d5777896..95a982170c 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorPropsFactory.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorPropsFactory.java @@ -19,8 +19,8 @@ import org.eclipse.ditto.things.model.ThingId; import org.eclipse.ditto.things.model.signals.events.ThingEvent; -import akka.actor.ActorRef; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; /** * Factory of thing-persistence-actor. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceOperationsActor.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceOperationsActor.java index 17215ea3d9..589b655d23 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceOperationsActor.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceOperationsActor.java @@ -25,8 +25,8 @@ import com.mongodb.reactivestreams.client.MongoDatabase; import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; /** * Ops for the event-sourcing persistence of things. @@ -52,7 +52,7 @@ private ThingPersistenceOperationsActor(final ActorRef pubSubMediator, /** * Create Props of this actor. * - * @param pubSubMediator Akka pub-sub mediator. + * @param pubSubMediator Pekko pub-sub mediator. * @param mongoDbConfig the MongoDB configuration settings. * @param config Configuration with info about event journal, snapshot store and database. * @param persistenceOperationsConfig the persistence operations config. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingSupervisorActor.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingSupervisorActor.java index a9f3ec25dc..76b8db7835 100755 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingSupervisorActor.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingSupervisorActor.java @@ -67,18 +67,18 @@ import org.eclipse.ditto.things.service.enforcement.ThingPolicyCreated; import org.eclipse.ditto.thingsearch.api.ThingsSearchConstants; -import akka.actor.ActorKilledException; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.japi.pf.FI; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.AskTimeoutException; -import akka.stream.Materializer; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.actor.ActorKilledException; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.pf.FI; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.AskTimeoutException; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** * Supervisor for {@link ThingPersistenceActor} which means it will create, start and watch it as child actor. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingsPersistenceStreamingActorCreator.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingsPersistenceStreamingActorCreator.java index bae2ae9d75..cf458f435f 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingsPersistenceStreamingActorCreator.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingsPersistenceStreamingActorCreator.java @@ -21,8 +21,8 @@ import org.eclipse.ditto.internal.utils.persistence.mongo.SnapshotStreamingActor; import org.eclipse.ditto.things.model.ThingId; -import akka.actor.ActorRef; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; /** diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/CreateThingStrategy.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/CreateThingStrategy.java index 6d5d16102b..7f34c850ca 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/CreateThingStrategy.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/CreateThingStrategy.java @@ -44,7 +44,7 @@ import org.eclipse.ditto.things.model.signals.events.ThingEvent; import org.eclipse.ditto.wot.integration.provider.WotThingDescriptionProvider; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * This strategy handles the {@link CreateThingStrategy} command. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ModifyFeatureStrategy.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ModifyFeatureStrategy.java index 019cdb5951..c6b5ff6b8b 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ModifyFeatureStrategy.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ModifyFeatureStrategy.java @@ -45,7 +45,7 @@ import org.eclipse.ditto.things.model.signals.events.ThingEvent; import org.eclipse.ditto.wot.integration.provider.WotThingDescriptionProvider; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * This strategy handles the {@link org.eclipse.ditto.things.model.signals.commands.modify.ModifyFeature} command. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ModifyFeaturesStrategy.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ModifyFeaturesStrategy.java index f222a2a487..eb60ba4309 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ModifyFeaturesStrategy.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ModifyFeaturesStrategy.java @@ -49,7 +49,7 @@ import org.eclipse.ditto.things.model.signals.events.ThingEvent; import org.eclipse.ditto.wot.integration.provider.WotThingDescriptionProvider; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * This strategy handles the {@link org.eclipse.ditto.things.model.signals.commands.modify.ModifyFeatures} command. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/RetrieveFeatureStrategy.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/RetrieveFeatureStrategy.java index e0669d82d3..20a01f397b 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/RetrieveFeatureStrategy.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/RetrieveFeatureStrategy.java @@ -39,7 +39,7 @@ import org.eclipse.ditto.things.model.signals.events.ThingEvent; import org.eclipse.ditto.wot.integration.provider.WotThingDescriptionProvider; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * This strategy handles the {@link org.eclipse.ditto.things.model.signals.commands.query.RetrieveFeature} command. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/RetrieveThingStrategy.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/RetrieveThingStrategy.java index e7f343082f..bcc0cbe6ff 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/RetrieveThingStrategy.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/RetrieveThingStrategy.java @@ -43,7 +43,7 @@ import org.eclipse.ditto.things.model.signals.events.ThingEvent; import org.eclipse.ditto.wot.integration.provider.WotThingDescriptionProvider; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * This strategy handles the {@link RetrieveThing} command. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ThingCommandStrategies.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ThingCommandStrategies.java index 7e1b4d31fc..e759ea9ae8 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ThingCommandStrategies.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ThingCommandStrategies.java @@ -24,7 +24,7 @@ import org.eclipse.ditto.things.model.signals.commands.modify.CreateThing; import org.eclipse.ditto.things.model.signals.events.ThingEvent; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * The collection of the command strategies of {@code ThingPersistenceActor}. @@ -55,7 +55,7 @@ private ThingCommandStrategies(final ActorSystem system) { /** * Returns the singleton instance of {@code ThingReceiveStrategy}. * - * @param system the Akka ActorSystem to use in order to e.g. dynamically load classes. + * @param system the Pekko ActorSystem to use in order to e.g. dynamically load classes. * @return the instance. */ public static ThingCommandStrategies getInstance(final ActorSystem system) { diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/serializer/ThingMongoEventAdapter.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/serializer/ThingMongoEventAdapter.java index 9e4c3b6cd6..a44d911e70 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/serializer/ThingMongoEventAdapter.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/serializer/ThingMongoEventAdapter.java @@ -25,10 +25,10 @@ import org.eclipse.ditto.things.model.signals.events.ThingMerged; import org.eclipse.ditto.things.service.common.config.DefaultThingConfig; -import akka.actor.ExtendedActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; /** - * EventAdapter for {@link Event}s persisted into akka-persistence event-journal. Converts Event to MongoDB + * EventAdapter for {@link Event}s persisted into pekko-persistence event-journal. Converts Event to MongoDB * BSON objects and vice versa. */ public final class ThingMongoEventAdapter extends AbstractMongoEventAdapter> { diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/serializer/ThingMongoSnapshotAdapter.java b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/serializer/ThingMongoSnapshotAdapter.java index c295f63f3a..6c9dcdeb7e 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/serializer/ThingMongoSnapshotAdapter.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/persistence/serializer/ThingMongoSnapshotAdapter.java @@ -35,9 +35,9 @@ import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.cluster.pubsub.DistributedPubSub; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.cluster.pubsub.DistributedPubSub; /** * A {@link org.eclipse.ditto.internal.utils.persistence.SnapshotAdapter} for snapshotting a @@ -62,7 +62,7 @@ public ThingMongoSnapshotAdapter(final ActorSystem actorSystem, final Config con /** * Constructs a new {@code ThingMongoSnapshotAdapter}. * - * @param pubSubMediator Akka pubsub mediator with which to publish snapshot events. + * @param pubSubMediator Pekko pubsub mediator with which to publish snapshot events. */ public ThingMongoSnapshotAdapter(final ActorRef pubSubMediator) { super(LOGGER); diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/signaltransformation/placeholdersubstitution/ThingsPlaceholderSubstitution.java b/things/service/src/main/java/org/eclipse/ditto/things/service/signaltransformation/placeholdersubstitution/ThingsPlaceholderSubstitution.java index 451316bd49..b7c431b356 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/signaltransformation/placeholdersubstitution/ThingsPlaceholderSubstitution.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/signaltransformation/placeholdersubstitution/ThingsPlaceholderSubstitution.java @@ -17,7 +17,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Things specific SignalTransformer which applies substitution of placeholders on a thing command diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/starter/DefaultThingPersistenceActorPropsFactory.java b/things/service/src/main/java/org/eclipse/ditto/things/service/starter/DefaultThingPersistenceActorPropsFactory.java index abca24f39f..c025b424e6 100644 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/starter/DefaultThingPersistenceActorPropsFactory.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/starter/DefaultThingPersistenceActorPropsFactory.java @@ -24,9 +24,9 @@ import org.eclipse.ditto.things.service.persistence.actors.ThingPersistenceActor; import org.eclipse.ditto.things.service.persistence.actors.ThingPersistenceActorPropsFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; /** * Factory for creating Props of {@link org.eclipse.ditto.things.service.persistence.actors.ThingPersistenceActor}. diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/starter/ThingsRootActor.java b/things/service/src/main/java/org/eclipse/ditto/things/service/starter/ThingsRootActor.java index 83dbd50e29..11a2843984 100755 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/starter/ThingsRootActor.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/starter/ThingsRootActor.java @@ -17,7 +17,7 @@ import org.eclipse.ditto.base.api.devops.signals.commands.RetrieveStatisticsDetails; import org.eclipse.ditto.base.service.RootChildActorStarter; import org.eclipse.ditto.base.service.actors.DittoRootActor; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.internal.utils.cluster.RetrieveStatisticsDetailsResponseSupplier; import org.eclipse.ditto.internal.utils.cluster.ShardRegionCreator; @@ -49,12 +49,12 @@ import org.eclipse.ditto.things.service.persistence.actors.ThingSupervisorActor; import org.eclipse.ditto.things.service.persistence.actors.ThingsPersistenceStreamingActorCreator; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.event.DiagnosticLoggingAdapter; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; /** * Our "Parent" Actor which takes care of supervision of all other Actors in our system. @@ -145,12 +145,12 @@ private ThingsRootActor(final ThingsConfig thingsConfig, } /** - * Creates Akka configuration object Props for this ThingsRootActor. + * Creates Pekko configuration object Props for this ThingsRootActor. * * @param thingsConfig the configuration settings of the Things service. * @param pubSubMediator the PubSub mediator Actor. * @param propsFactory factory of Props of thing-persistence-actor. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final ThingsConfig thingsConfig, final ActorRef pubSubMediator, final ThingPersistenceActorPropsFactory propsFactory) { diff --git a/things/service/src/main/java/org/eclipse/ditto/things/service/starter/ThingsService.java b/things/service/src/main/java/org/eclipse/ditto/things/service/starter/ThingsService.java index 9b934de9ea..642f1dcf2f 100755 --- a/things/service/src/main/java/org/eclipse/ditto/things/service/starter/ThingsService.java +++ b/things/service/src/main/java/org/eclipse/ditto/things/service/starter/ThingsService.java @@ -23,15 +23,15 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigValueFactory; -import akka.actor.ActorRef; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; /** * Entry point of the Things Service. *
              *
            • Reads configuration, enhances it with cloud environment settings
            • *
            • Sets up ActorSystem
            • - *
            • Wires up Akka HTTP Routes
            • + *
            • Wires up Pekko HTTP Routes
            • *
            */ public final class ThingsService extends DittoService { @@ -68,7 +68,7 @@ protected Props getMainRootActorProps(final ThingsConfig thingsConfig, final Act } @Override - protected Config appendAkkaPersistenceMongoUriToRawConfig() { + protected Config appendPekkoPersistenceMongoUriToRawConfig() { final var mongoDbConfig = serviceSpecificConfig.getMongoDbConfig(); final String mongoDbUri = mongoDbConfig.getMongoDbUri(); return rawConfig.withValue(MONGO_URI_CONFIG_PATH, ConfigValueFactory.fromAnyRef(mongoDbUri)); diff --git a/things/service/src/main/resources/logback.xml b/things/service/src/main/resources/logback.xml index cc7773e5b9..49aa8b4f82 100755 --- a/things/service/src/main/resources/logback.xml +++ b/things/service/src/main/resources/logback.xml @@ -16,14 +16,14 @@ - %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{akkaSource} - %msg%n + %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{pekkoSource} - %msg%n System.err - %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{akkaSource} - %msg%n + %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{pekkoSource} - %msg%n ERROR @@ -70,9 +70,9 @@ - - - + + + diff --git a/things/service/src/main/resources/things-dev.conf b/things/service/src/main/resources/things-dev.conf index ce528f6ccf..d95c4c867b 100755 --- a/things/service/src/main/resources/things-dev.conf +++ b/things/service/src/main/resources/things-dev.conf @@ -7,7 +7,7 @@ ditto { metrics.prometheus.port = 9011 } -akka { +pekko { management.http.port = 25530 remote { @@ -34,8 +34,8 @@ akka { } seed-nodes = [ - "akka://ditto-cluster@127.0.0.1:2552", # port of the policies service to join in cluster - "akka://ditto-cluster@"${akka.remote.artery.canonical.hostname}":"${akka.remote.artery.canonical.port} + "pekko://ditto-cluster@127.0.0.1:2552", # port of the policies service to join in cluster + "pekko://ditto-cluster@"${pekko.remote.artery.canonical.hostname}":"${pekko.remote.artery.canonical.port} ] } } diff --git a/things/service/src/main/resources/things.conf b/things/service/src/main/resources/things.conf index b003e2d332..ebd4048d3f 100755 --- a/things/service/src/main/resources/things.conf +++ b/things/service/src/main/resources/things.conf @@ -219,7 +219,7 @@ ditto { } -akka { +pekko { cluster { sharding { role = ${ditto.service-name} @@ -242,17 +242,17 @@ akka { persistence { journal.auto-start-journals = [ - "akka-contrib-mongodb-persistence-things-journal" + "pekko-contrib-mongodb-persistence-things-journal" ] snapshot-store.auto-start-snapshot-stores = [ - "akka-contrib-mongodb-persistence-things-snapshots" + "pekko-contrib-mongodb-persistence-things-snapshots" ] } } -akka-contrib-mongodb-persistence-things-journal { - class = "akka.contrib.persistence.mongodb.MongoJournal" +pekko-contrib-mongodb-persistence-things-journal { + class = "pekko.contrib.persistence.mongodb.MongoJournal" plugin-dispatcher = "thing-journal-persistence-dispatcher" circuit-breaker { @@ -270,6 +270,8 @@ akka-contrib-mongodb-persistence-things-journal { realtime-collection = "things_realtime" metadata-collection = "things_metadata" + metadata-index = "things_metadata_index" + } event-adapters { @@ -282,8 +284,8 @@ akka-contrib-mongodb-persistence-things-journal { } } -akka-contrib-mongodb-persistence-things-journal-read { - class = "akka.contrib.persistence.mongodb.MongoReadJournal" +pekko-contrib-mongodb-persistence-things-journal-read { + class = "pekko.contrib.persistence.mongodb.MongoReadJournal" plugin-dispatcher = "thing-journal-persistence-dispatcher" overrides { @@ -291,11 +293,12 @@ akka-contrib-mongodb-persistence-things-journal-read { journal-index = "things_journal_index" realtime-collection = "things_realtime" metadata-collection = "things_metadata" + metadata-index = "things_metadata_index" } } -akka-contrib-mongodb-persistence-things-snapshots { - class = "akka.contrib.persistence.mongodb.MongoSnapshots" +pekko-contrib-mongodb-persistence-things-snapshots { + class = "pekko.contrib.persistence.mongodb.MongoSnapshots" plugin-dispatcher = "thing-snaps-persistence-dispatcher" circuit-breaker { @@ -369,7 +372,7 @@ blocked-namespaces-dispatcher { throughput = 5 } -akka.contrib.persistence.mongodb.mongo { +pekko.contrib.persistence.mongodb.mongo { collection-cache { journal { diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/AbstractThingEnforcementTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/AbstractThingEnforcementTest.java index b658894c2b..e2c28a8721 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/AbstractThingEnforcementTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/AbstractThingEnforcementTest.java @@ -40,13 +40,13 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorIdentity; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Identify; -import akka.testkit.TestActorRef; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorIdentity; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Identify; +import org.apache.pekko.testkit.TestActorRef; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.concurrent.duration.FiniteDuration; /** @@ -64,8 +64,8 @@ abstract class AbstractThingEnforcementTest { @Before public void init() { - system = ActorSystem.create("test", ConfigFactory.parseMap(Map.of("akka.actor.provider", - "akka.cluster.ClusterActorRefProvider")).withFallback(ConfigFactory.load( + system = ActorSystem.create("test", ConfigFactory.parseMap(Map.of("pekko.actor.provider", + "org.apache.pekko.cluster.ClusterActorRefProvider")).withFallback(ConfigFactory.load( "test"))); policyEnforcerProvider = Mockito.mock(PolicyEnforcerProvider.class); pubSubMediatorProbe = createPubSubMediatorProbe(); @@ -130,7 +130,7 @@ public > Object wrapForPublicationWithAcks(final S messa null, policyEnforcerProvider, Mockito.mock(MongoReadJournal.class) - ).withDispatcher("akka.actor.default-dispatcher"), system.guardian(), + ).withDispatcher("pekko.actor.default-dispatcher"), system.guardian(), URLEncoder.encode(THING_ID.toString(), Charset.defaultCharset())); // Actors using "stash()" require the above dispatcher to be configured, otherwise stash() and unstashAll() won't // work like in the "normal" actor! diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/LiveSignalEnforcementTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/LiveSignalEnforcementTest.java index 0fe570ffd6..932d39c7b0 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/LiveSignalEnforcementTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/LiveSignalEnforcementTest.java @@ -63,8 +63,8 @@ import org.junit.ClassRule; import org.junit.Test; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.PartialFunction; import scala.concurrent.duration.FiniteDuration; diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/MultiStageCommandEnforcementTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/MultiStageCommandEnforcementTest.java index df7facea57..2b761cdd07 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/MultiStageCommandEnforcementTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/MultiStageCommandEnforcementTest.java @@ -69,8 +69,8 @@ import org.junit.ClassRule; import org.junit.Test; -import akka.pattern.AskTimeoutException; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.pattern.AskTimeoutException; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests commands that triggers different or multiple commands internally. diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/PolicyIdReferencePlaceholderResolverTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/PolicyIdReferencePlaceholderResolverTest.java index cfa5ac9cf9..bf36f4639e 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/PolicyIdReferencePlaceholderResolverTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/PolicyIdReferencePlaceholderResolverTest.java @@ -40,8 +40,8 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; -import akka.testkit.TestProbe; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.TestProbe; /** * Tests {@link PolicyIdReferencePlaceholderResolver}. diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/SmartChannelEnforcementTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/SmartChannelEnforcementTest.java index eab1c71c4f..32f8bf52d9 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/SmartChannelEnforcementTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/SmartChannelEnforcementTest.java @@ -57,8 +57,8 @@ import org.junit.Test; import org.junit.rules.TestName; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.PartialFunction; import scala.concurrent.duration.FiniteDuration; diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/SmartChannelEnforcementWithResponseReceiverTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/SmartChannelEnforcementWithResponseReceiverTest.java index 7bc610e78d..13b0e497a2 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/SmartChannelEnforcementWithResponseReceiverTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/SmartChannelEnforcementWithResponseReceiverTest.java @@ -55,9 +55,9 @@ import org.junit.Test; import org.junit.rules.TestName; -import akka.actor.ActorRef; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.PartialFunction; import scala.concurrent.duration.FiniteDuration; diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/TestSetup.java b/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/TestSetup.java index 5dca37c4df..82f104d461 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/TestSetup.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/TestSetup.java @@ -35,8 +35,8 @@ import org.eclipse.ditto.things.model.signals.commands.ThingCommand; import org.eclipse.ditto.things.model.signals.events.ThingEvent; -import akka.actor.ActorRef; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.concurrent.duration.FiniteDuration; public final class TestSetup { diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/ThingCommandEnforcementTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/ThingCommandEnforcementTest.java index 7e46fa2e57..4fec68e4b5 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/ThingCommandEnforcementTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/enforcement/ThingCommandEnforcementTest.java @@ -95,8 +95,8 @@ import org.junit.rules.TestName; import org.mockito.Mockito; -import akka.actor.ActorRef; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.concurrent.duration.Duration; /** diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/PersistenceActorTestBase.java b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/PersistenceActorTestBase.java index fc1473de9a..a22c5ac664 100755 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/PersistenceActorTestBase.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/PersistenceActorTestBase.java @@ -62,11 +62,11 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Base test class for testing persistence actors of the things persistence. @@ -205,8 +205,8 @@ protected void setup(final Config customConfig) { requireNonNull(customConfig, "Consider to use ConfigFactory.empty()"); final Config config = customConfig.withFallback(ConfigFactory.load("test")); - actorSystem = ActorSystem.create("AkkaTestSystem", ConfigFactory.parseMap( - Map.of("akka.actor.provider", "cluster")).withFallback(config)); + actorSystem = ActorSystem.create("PekkoTestSystem", ConfigFactory.parseMap( + Map.of("pekko.actor.provider", "cluster")).withFallback(config)); pubSubTestProbe = TestProbe.apply("mock-pubSub-mediator", actorSystem); pubSubMediator = pubSubTestProbe.ref(); policiesShardRegionTestProbe = TestProbe.apply("mock-policiesShardRegion", actorSystem); @@ -292,7 +292,7 @@ protected void starting(final org.junit.runner.Description description) { * Disable logging for 1 test to hide stacktrace or other logs on level ERROR. Comment out to debug the test. */ protected void disableLogging() { - actorSystem.eventStream().setLogLevel(akka.stream.Attributes.logLevelOff()); + actorSystem.eventStream().setLogLevel(org.apache.pekko.stream.Attributes.logLevelOff()); } protected DistributedPub> getDistributedPub() { diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/PersistenceActorTestBaseWithSnapshotting.java b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/PersistenceActorTestBaseWithSnapshotting.java index db28c6659d..6eeab14280 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/PersistenceActorTestBaseWithSnapshotting.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/PersistenceActorTestBaseWithSnapshotting.java @@ -55,7 +55,7 @@ import com.typesafe.config.ConfigFactory; import com.typesafe.config.ConfigValueFactory; -import akka.actor.ExtendedActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; /** * Base test class for testing snapshotting of persistence actors. diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ResponseReceiverCacheTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ResponseReceiverCacheTest.java index 21809af540..41b9aa5d27 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ResponseReceiverCacheTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ResponseReceiverCacheTest.java @@ -42,8 +42,8 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; /** * Unit test for {@link ResponseReceiverCache}. @@ -64,7 +64,7 @@ public final class ResponseReceiverCacheTest { @BeforeClass public static void setupTest() { final Config config = ConfigFactory.load("test"); - actorSystem = ActorSystem.create("AkkaTestSystem", config); + actorSystem = ActorSystem.create("PekkoTestSystem", config); } @Test diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorCleanupTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorCleanupTest.java index 862af74e7a..2b6dc88cb7 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorCleanupTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorCleanupTest.java @@ -41,8 +41,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.actor.ActorRef; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Unit test for the cleanup of {@link ThingPersistenceActor}. diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorSnapshottingTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorSnapshottingTest.java index 69751dab4c..3374490171 100755 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorSnapshottingTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorSnapshottingTest.java @@ -48,9 +48,9 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigValueFactory; -import akka.actor.ActorRef; -import akka.actor.PoisonPill; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Unit test for the snapshotting functionality of {@link ThingPersistenceActor}. diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorTest.java index d338ad604f..b490f6c807 100755 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorTest.java @@ -131,16 +131,16 @@ import com.typesafe.config.ConfigFactory; import com.typesafe.config.ConfigValueFactory; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.PoisonPill; -import akka.actor.Props; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.japi.pf.ReceiveBuilder; -import akka.testkit.TestActorRef; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.testkit.TestActorRef; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.PartialFunction; import scala.concurrent.Await; import scala.concurrent.Future; @@ -183,8 +183,8 @@ private static void assertThingInResponseV2(final Thing actualThing, final Thing @Before public void setUp() { final Config customConfig = ConfigFactory.empty() - .withValue("akka.actor.provider", - ConfigValueFactory.fromAnyRef("akka.cluster.ClusterActorRefProvider")); + .withValue("pekko.actor.provider", + ConfigValueFactory.fromAnyRef("org.apache.pekko.cluster.ClusterActorRefProvider")); setup(customConfig); } @@ -234,7 +234,7 @@ public void unavailableExpectedIfPersistenceActorTerminates() throws Exception { expectMsgEquals(ETagTestUtils.retrieveThingResponse(thing, null, expectedHeaders)); // terminate thing persistence actor - final String thingActorPath = String.format("akka://AkkaTestSystem/user/%s/pa", thingId); + final String thingActorPath = String.format("pekko://PekkoTestSystem/user/%s/pa", thingId); final ActorSelection thingActorSelection = actorSystem.actorSelection(thingActorPath); final Future thingActorFuture = thingActorSelection.resolveOne(Duration.create(5, TimeUnit.SECONDS)); diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceOperationsActorIT.java b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceOperationsActorIT.java index 5316bb9412..bed781abeb 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceOperationsActorIT.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceOperationsActorIT.java @@ -40,9 +40,9 @@ import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; /** * Tests {@link ThingPersistenceOperationsActor} against a local MongoDB. diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/AbstractCommandStrategyTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/AbstractCommandStrategyTest.java index 17fd6848ea..5db9c95e40 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/AbstractCommandStrategyTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/AbstractCommandStrategyTest.java @@ -32,8 +32,8 @@ import org.eclipse.ditto.base.model.headers.WithDittoHeaders; import org.eclipse.ditto.base.model.signals.commands.Command; import org.eclipse.ditto.base.model.signals.commands.CommandResponse; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; import org.eclipse.ditto.internal.utils.persistentactors.commands.AbstractCommandStrategy; import org.eclipse.ditto.internal.utils.persistentactors.commands.CommandStrategy; import org.eclipse.ditto.internal.utils.persistentactors.commands.DefaultContext; diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ModifyFeatureStrategyTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ModifyFeatureStrategyTest.java index a549d9b8d2..cf6f35cb9f 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ModifyFeatureStrategyTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ModifyFeatureStrategyTest.java @@ -33,7 +33,7 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Unit test for {@link ModifyFeatureStrategy}. diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ModifyFeaturesStrategyTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ModifyFeaturesStrategyTest.java index 282b981dfa..9e04f3b4b7 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ModifyFeaturesStrategyTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ModifyFeaturesStrategyTest.java @@ -40,7 +40,7 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Unit test for {@link ModifyFeaturesStrategy}. diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/RetrieveFeatureStrategyTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/RetrieveFeatureStrategyTest.java index 328e404772..8ce41cb94b 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/RetrieveFeatureStrategyTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/RetrieveFeatureStrategyTest.java @@ -32,7 +32,7 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Unit test for {@link RetrieveFeatureStrategy}. diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/RetrieveThingStrategyTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/RetrieveThingStrategyTest.java index 5328fd43ab..81d1cf8d36 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/RetrieveThingStrategyTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/RetrieveThingStrategyTest.java @@ -38,7 +38,7 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Unit test for {@link RetrieveThingStrategy}. diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ThingConflictStrategyTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ThingConflictStrategyTest.java index 8f909e6a59..454548ba81 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ThingConflictStrategyTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/strategies/commands/ThingConflictStrategyTest.java @@ -25,8 +25,8 @@ import org.eclipse.ditto.base.model.headers.WithDittoHeaders; import org.eclipse.ditto.base.model.headers.entitytag.EntityTagMatchers; import org.eclipse.ditto.base.model.signals.commands.Command; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; import org.eclipse.ditto.internal.utils.persistentactors.commands.CommandStrategy; import org.eclipse.ditto.internal.utils.persistentactors.commands.DefaultContext; import org.eclipse.ditto.internal.utils.persistentactors.results.Result; diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/serializer/ThingMongoEventAdapterTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/serializer/ThingMongoEventAdapterTest.java index 062f530f58..ce7e0328a5 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/serializer/ThingMongoEventAdapterTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/serializer/ThingMongoEventAdapterTest.java @@ -33,10 +33,10 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.persistence.journal.EventSeq; -import akka.persistence.journal.Tagged; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.persistence.journal.EventSeq; +import org.apache.pekko.persistence.journal.Tagged; import scala.jdk.javaapi.CollectionConverters; /** diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/serializer/ThingMongoSnapshotAdapterTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/serializer/ThingMongoSnapshotAdapterTest.java index 77fd82f7c5..306d253d04 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/serializer/ThingMongoSnapshotAdapterTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/serializer/ThingMongoSnapshotAdapterTest.java @@ -30,12 +30,12 @@ import org.junit.Rule; import org.junit.Test; -import akka.actor.ActorSystem; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.persistence.SnapshotMetadata; -import akka.persistence.SnapshotOffer; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.persistence.SnapshotMetadata; +import org.apache.pekko.persistence.SnapshotOffer; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Unit test for {@link ThingMongoSnapshotAdapter}. diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/testhelper/ThingsJournalTestHelper.java b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/testhelper/ThingsJournalTestHelper.java index 6594b18be9..411a38ab57 100755 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/testhelper/ThingsJournalTestHelper.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/testhelper/ThingsJournalTestHelper.java @@ -27,17 +27,17 @@ import org.bson.BsonDocument; import org.eclipse.ditto.things.model.ThingId; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.persistence.inmemory.query.javadsl.InMemoryReadJournal; -import akka.persistence.query.EventEnvelope; -import akka.persistence.query.PersistenceQuery; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.persistence.inmemory.query.javadsl.InMemoryReadJournal; +import org.apache.pekko.persistence.query.EventEnvelope; +import org.apache.pekko.persistence.query.PersistenceQuery; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** - * Helper class which provides functionality for testing with Akka persistence journal for the things services. - * Requires akka-persistence-inmemory (by com.github.dnvriend). + * Helper class which provides functionality for testing with Pekko persistence journal for the things services. + * Requires pekko-persistence-inmemory (by com.github.alstanchev). * * @param the domain specific datatype stored in the journal */ @@ -83,7 +83,7 @@ public List getAllEvents(final ThingId thingId) { } private List getAllEventEnvelopes(final String persistenceId) { - return runBlockingWithReturn(readJournal.currentEventsByPersistenceId(persistenceId, 0, Long.MAX_VALUE)); + return runBlockingWithReturn(readJournal.currentEventsByPersistenceId(persistenceId, 0, Long.MAX_VALUE)); } private J convertEventEnvelopeToDomainObject(final EventEnvelope eventEnvelope) { diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/testhelper/ThingsSnapshotTestHelper.java b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/testhelper/ThingsSnapshotTestHelper.java index 9dc698780d..e15828d602 100755 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/testhelper/ThingsSnapshotTestHelper.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/persistence/testhelper/ThingsSnapshotTestHelper.java @@ -29,25 +29,25 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.pattern.Patterns; -import akka.persistence.Persistence; -import akka.persistence.SelectedSnapshot; -import akka.persistence.SnapshotProtocol; -import akka.persistence.SnapshotSelectionCriteria; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.persistence.Persistence; +import org.apache.pekko.persistence.SelectedSnapshot; +import org.apache.pekko.persistence.SnapshotProtocol; +import org.apache.pekko.persistence.SnapshotSelectionCriteria; import scala.Option; /** - * Helper class which provides functionality for testing with Akka persistence snapshots for the things + * Helper class which provides functionality for testing with Pekko persistence snapshots for the things * services. - * Requires akka-persistence-inmemory (by com.github.dnvriend). + * Requires pekko-persistence-inmemory (by com.github.alstanchev). * * @param the domain specific datatype stored as snapshot */ public final class ThingsSnapshotTestHelper { - private static final String SNAPSHOT_PLUGIN_ID = "akka-contrib-mongodb-persistence-things-snapshots"; + private static final String SNAPSHOT_PLUGIN_ID = "pekko-contrib-mongodb-persistence-things-snapshots"; private static final int WAIT_TIMEOUT = 3; private final Function domainIdToPersistenceId; diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/signaltransformation/placeholdersubstitution/CreateThingSubstitutionStrategyTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/signaltransformation/placeholdersubstitution/CreateThingSubstitutionStrategyTest.java index 8485f56c83..ded399fc9f 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/signaltransformation/placeholdersubstitution/CreateThingSubstitutionStrategyTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/signaltransformation/placeholdersubstitution/CreateThingSubstitutionStrategyTest.java @@ -45,7 +45,7 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Tests {@link CreateThingSubstitutionStrategy} in context of diff --git a/things/service/src/test/java/org/eclipse/ditto/things/service/starter/ThingsRootActorTest.java b/things/service/src/test/java/org/eclipse/ditto/things/service/starter/ThingsRootActorTest.java index bb1b545a36..2dc6c8e83c 100644 --- a/things/service/src/test/java/org/eclipse/ditto/things/service/starter/ThingsRootActorTest.java +++ b/things/service/src/test/java/org/eclipse/ditto/things/service/starter/ThingsRootActorTest.java @@ -17,8 +17,8 @@ import org.eclipse.ditto.things.service.common.config.ThingsConfig; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; -import akka.actor.ActorSystem; -import akka.actor.Props; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; /** * Tests {@link ThingsRootActor}. diff --git a/things/service/src/test/resources/test.conf b/things/service/src/test/resources/test.conf index db4f32dd8a..c477397b12 100755 --- a/things/service/src/test/resources/test.conf +++ b/things/service/src/test/resources/test.conf @@ -64,10 +64,10 @@ ditto { } } -akka { - loggers = ["akka.event.slf4j.Slf4jLogger"] +pekko { + loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"] loglevel = "INFO" - logging-filter = "akka.event.DefaultLoggingFilter" + logging-filter = "org.apache.pekko.event.DefaultLoggingFilter" logger-startup-timeout = 60s # for log messages during the actor system is starting up and shutting down: @@ -111,26 +111,26 @@ akka { default-timeout = 5s calling-thread-dispatcher { - type = akka.testkit.CallingThreadDispatcherConfigurator + type = org.apache.pekko.testkit.CallingThreadDispatcherConfigurator } } } -akka.contrib.persistence.mongodb.mongo { - driver = "akka.contrib.persistence.mongodb.ScalaDriverPersistenceExtension" +pekko.contrib.persistence.mongodb.mongo { + driver = "pekko.contrib.persistence.mongodb.driver.ScalaDriverPersistenceExtension" } -akka.persistence { +pekko.persistence { journal.auto-start-journals = [ - "akka-contrib-mongodb-persistence-things-journal" + "pekko-contrib-mongodb-persistence-things-journal" ] snapshot-store.auto-start-snapshot-stores = [ - "akka-contrib-mongodb-persistence-things-snapshots" + "pekko-contrib-mongodb-persistence-things-snapshots" ] } -akka-contrib-mongodb-persistence-things-journal { - class = "akka.persistence.inmemory.journal.InMemoryAsyncWriteJournal" +pekko-contrib-mongodb-persistence-things-journal { + class = "org.apache.pekko.persistence.inmemory.journal.InMemoryAsyncWriteJournal" plugin-dispatcher = "thing-persistence-dispatcher" ask-timeout = 10s @@ -145,8 +145,8 @@ akka-contrib-mongodb-persistence-things-journal { } } -akka-contrib-mongodb-persistence-things-snapshots { - class = "akka.persistence.inmemory.snapshot.InMemorySnapshotStore" +pekko-contrib-mongodb-persistence-things-snapshots { + class = "org.apache.pekko.persistence.inmemory.snapshot.InMemorySnapshotStore" plugin-dispatcher = "thing-persistence-dispatcher" ask-timeout = 10s diff --git a/thingsearch/api/src/main/java/org/eclipse/ditto/thingsearch/api/ThingsSearchConstants.java b/thingsearch/api/src/main/java/org/eclipse/ditto/thingsearch/api/ThingsSearchConstants.java index 8261dddeb5..6ebb50381d 100644 --- a/thingsearch/api/src/main/java/org/eclipse/ditto/thingsearch/api/ThingsSearchConstants.java +++ b/thingsearch/api/src/main/java/org/eclipse/ditto/thingsearch/api/ThingsSearchConstants.java @@ -26,7 +26,7 @@ public final class ThingsSearchConstants { public static final String SHARD_REGION = "search-wildcard-updater"; /** - * Name of the akka cluster role. + * Name of the pekko cluster role. */ public static final String CLUSTER_ROLE = "search"; diff --git a/thingsearch/service/pom.xml b/thingsearch/service/pom.xml index 75735c73e0..7198e7725b 100644 --- a/thingsearch/service/pom.xml +++ b/thingsearch/service/pom.xml @@ -57,7 +57,7 @@
            org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko org.eclipse.ditto @@ -90,18 +90,18 @@ org.eclipse.ditto - ditto-internal-utils-akka + ditto-internal-utils-pekko test test-jar - com.typesafe.akka - akka-testkit_${scala.version} + org.apache.pekko + pekko-testkit_${scala.version} test - com.typesafe.akka - akka-stream-testkit_${scala.version} + org.apache.pekko + pekko-stream-testkit_${scala.version} test @@ -252,7 +252,7 @@ - random-akka-tcp-port + random-pekko-tcp-port @@ -268,7 +268,7 @@ ${search.persistence.test.activeRandomPort} - ${random-akka-tcp-port} + ${random-pekko-tcp-port} @@ -280,7 +280,7 @@ ${search.persistence.test.activeRandomPort} - ${random-akka-tcp-port} + ${random-pekko-tcp-port} diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/common/config/StreamCacheConfig.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/common/config/StreamCacheConfig.java index 7d423e5f0d..d34b8abfca 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/common/config/StreamCacheConfig.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/common/config/StreamCacheConfig.java @@ -49,7 +49,7 @@ enum StreamCacheConfigValue implements KnownConfigValue { /** * The name of the dispatcher to run async cache loaders which do not block threads. */ - DISPATCHER_NAME("dispatcher", "akka.actor.default-dispatcher"), + DISPATCHER_NAME("dispatcher", "pekko.actor.default-dispatcher"), /** * The delay before retrying a cache query if the cached value is out of date. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/common/util/RootSupervisorStrategyFactory.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/common/util/RootSupervisorStrategyFactory.java index 77032cca23..8a791871bf 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/common/util/RootSupervisorStrategyFactory.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/common/util/RootSupervisorStrategyFactory.java @@ -17,13 +17,13 @@ import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; -import akka.actor.ActorKilledException; -import akka.actor.InvalidActorNameException; -import akka.actor.OneForOneStrategy; -import akka.actor.SupervisorStrategy; -import akka.event.LoggingAdapter; -import akka.japi.pf.DeciderBuilder; -import akka.pattern.AskTimeoutException; +import org.apache.pekko.actor.ActorKilledException; +import org.apache.pekko.actor.InvalidActorNameException; +import org.apache.pekko.actor.OneForOneStrategy; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.event.LoggingAdapter; +import org.apache.pekko.japi.pf.DeciderBuilder; +import org.apache.pekko.pattern.AskTimeoutException; /** * Creates a {@link OneForOneStrategy} which can be used as Supervisor-Strategy for Root Actors, especially when they diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/query/validation/DefaultQueryCriteriaValidator.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/query/validation/DefaultQueryCriteriaValidator.java index 603aadcdd6..e44f91f3e9 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/query/validation/DefaultQueryCriteriaValidator.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/query/validation/DefaultQueryCriteriaValidator.java @@ -20,7 +20,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Default {@link QueryCriteriaValidator}, diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/query/validation/QueryCriteriaValidator.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/query/validation/QueryCriteriaValidator.java index 5c66b0a675..a5ee1b06cc 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/query/validation/QueryCriteriaValidator.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/query/validation/QueryCriteriaValidator.java @@ -23,7 +23,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Search Query Validator to be loaded by reflection. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/read/MongoThingsSearchPersistence.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/read/MongoThingsSearchPersistence.java index c15434c3fe..cf9a18381b 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/read/MongoThingsSearchPersistence.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/read/MongoThingsSearchPersistence.java @@ -71,13 +71,13 @@ import com.mongodb.reactivestreams.client.MongoCollection; import com.mongodb.reactivestreams.client.MongoDatabase; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.event.Logging; -import akka.event.LoggingAdapter; -import akka.japi.pf.PFBuilder; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.event.Logging; +import org.apache.pekko.event.LoggingAdapter; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Source; import scala.PartialFunction; /** @@ -97,7 +97,7 @@ public final class MongoThingsSearchPersistence implements ThingsSearchPersisten * Initializes the things search persistence with a passed in {@code persistence}. * * @param mongoClient the mongoDB persistence wrapper. - * @param actorSystem the Akka ActorSystem. + * @param actorSystem the Pekko ActorSystem. */ public MongoThingsSearchPersistence(final DittoMongoClient mongoClient, final ActorSystem actorSystem, final SearchPersistenceConfig persistenceConfig) { diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/read/ThingsSearchPersistence.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/read/ThingsSearchPersistence.java index 813fcc39bb..f059443f5e 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/read/ThingsSearchPersistence.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/read/ThingsSearchPersistence.java @@ -27,8 +27,8 @@ import org.eclipse.ditto.thingsearch.service.common.model.TimestampedThingId; import org.eclipse.ditto.thingsearch.service.persistence.write.model.Metadata; -import akka.NotUsed; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.stream.javadsl.Source; /** * Interface for thing operations on the persistence used within the search service. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/ThingsSearchUpdaterPersistence.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/ThingsSearchUpdaterPersistence.java index 6e424edbf5..7db46a8df4 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/ThingsSearchUpdaterPersistence.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/ThingsSearchUpdaterPersistence.java @@ -18,8 +18,8 @@ import org.eclipse.ditto.policies.model.PolicyId; import org.eclipse.ditto.thingsearch.api.PolicyReferenceTag; -import akka.NotUsed; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.stream.javadsl.Source; /** * The persistence for the search updater service. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/impl/MongoThingsSearchUpdaterPersistence.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/impl/MongoThingsSearchUpdaterPersistence.java index 4ef96f15f6..cba278de2c 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/impl/MongoThingsSearchUpdaterPersistence.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/impl/MongoThingsSearchUpdaterPersistence.java @@ -47,9 +47,9 @@ import com.mongodb.reactivestreams.client.MongoCollection; import com.mongodb.reactivestreams.client.MongoDatabase; -import akka.NotUsed; -import akka.japi.pf.PFBuilder; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.stream.javadsl.Source; /** * MongoDB specific implementation of the {@link org.eclipse.ditto.thingsearch.service.persistence.write.ThingsSearchUpdaterPersistence}. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/BsonArrayDiff.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/BsonArrayDiff.java index 9e508dd460..7d685e6d10 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/BsonArrayDiff.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/BsonArrayDiff.java @@ -32,7 +32,7 @@ import org.bson.BsonValue; import org.eclipse.ditto.json.JsonPointer; -import akka.japi.Pair; +import org.apache.pekko.japi.Pair; /** * Diff between 2 BSON arrays. Only used for the flattened key-value array because Ditto has no API for array diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/BsonDiff.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/BsonDiff.java index 930d0a2628..e049273584 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/BsonDiff.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/BsonDiff.java @@ -27,7 +27,7 @@ import org.eclipse.ditto.json.JsonKey; import org.eclipse.ditto.json.JsonPointer; -import akka.japi.Pair; +import org.apache.pekko.japi.Pair; /** * Diff between 2 BSON documents. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/BsonDiffVisitor.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/BsonDiffVisitor.java index c4b16de4e0..e020712571 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/BsonDiffVisitor.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/BsonDiffVisitor.java @@ -22,7 +22,7 @@ import org.eclipse.ditto.json.JsonKey; import org.eclipse.ditto.json.JsonPointer; -import akka.japi.Pair; +import org.apache.pekko.japi.Pair; /** * Compute the diff between 2 BSON documents. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/EvaluatedPolicy.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/EvaluatedPolicy.java index 7c9ec99c6f..1843b2a40c 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/EvaluatedPolicy.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/EvaluatedPolicy.java @@ -38,7 +38,7 @@ import org.eclipse.ditto.policies.model.PolicyEntry; import org.eclipse.ditto.policies.model.Resources; -import akka.japi.Pair; +import org.apache.pekko.japi.Pair; /** * Policy evaluated for a thing. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/Metadata.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/Metadata.java index f66ba492fa..6cd5261261 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/Metadata.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/Metadata.java @@ -38,8 +38,8 @@ import org.eclipse.ditto.things.model.signals.events.ThingEvent; import org.eclipse.ditto.thingsearch.api.UpdateReason; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; /** * Data class holding information about a "thingEntities" database record. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/ThingWriteModel.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/ThingWriteModel.java index 3b8b6f0b35..26e0597fbd 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/ThingWriteModel.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/ThingWriteModel.java @@ -35,8 +35,8 @@ import org.bson.BsonString; import org.bson.conversions.Bson; import org.eclipse.ditto.internal.models.streaming.AbstractEntityIdWithRevision; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; import org.eclipse.ditto.internal.utils.metrics.instruments.counter.Counter; import org.eclipse.ditto.thingsearch.service.persistence.PersistenceConstants; diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/BackgroundSyncStream.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/BackgroundSyncStream.java index 4842c26765..e6ca4b2f87 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/BackgroundSyncStream.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/BackgroundSyncStream.java @@ -25,8 +25,8 @@ import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.eclipse.ditto.internal.models.streaming.AbstractEntityIdWithRevision; import org.eclipse.ditto.internal.models.streaming.LowerBound; -import org.eclipse.ditto.internal.utils.akka.controlflow.MergeSortedAsPair; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.controlflow.MergeSortedAsPair; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.policies.api.PolicyTag; import org.eclipse.ditto.policies.api.commands.sudo.SudoRetrievePolicy; import org.eclipse.ditto.policies.api.commands.sudo.SudoRetrievePolicyResponse; @@ -42,11 +42,11 @@ import org.eclipse.ditto.thingsearch.service.persistence.write.model.Metadata; import org.slf4j.Logger; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.japi.Pair; -import akka.pattern.Patterns; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.javadsl.Source; /** * Merging a stream of thing snapshots with a stream of metadata from the search index to detect diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/BulkWriteResultAckFlow.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/BulkWriteResultAckFlow.java index 60d2089977..8a957446a4 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/BulkWriteResultAckFlow.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/BulkWriteResultAckFlow.java @@ -21,8 +21,8 @@ import java.util.Optional; import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; import org.eclipse.ditto.internal.utils.metrics.instruments.counter.Counter; import org.eclipse.ditto.thingsearch.service.persistence.write.model.AbstractWriteModel; @@ -35,9 +35,9 @@ import com.mongodb.bulk.BulkWriteError; import com.mongodb.bulk.BulkWriteResult; -import akka.NotUsed; -import akka.japi.Pair; -import akka.stream.javadsl.Flow; +import org.apache.pekko.NotUsed; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.javadsl.Flow; /** * Flow that sends acknowledgements to ThingUpdater according to bulk write results. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/CachingSignalEnrichmentFacadeProvider.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/CachingSignalEnrichmentFacadeProvider.java index abb9335266..067983d536 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/CachingSignalEnrichmentFacadeProvider.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/CachingSignalEnrichmentFacadeProvider.java @@ -24,7 +24,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Caching signal enrichment facade to be loaded by reflection. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/DefaultSearchUpdateMapper.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/DefaultSearchUpdateMapper.java index f3c3d3ae43..712b57a797 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/DefaultSearchUpdateMapper.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/DefaultSearchUpdateMapper.java @@ -12,16 +12,16 @@ */ package org.eclipse.ditto.thingsearch.service.persistence.write.streaming; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.thingsearch.service.persistence.write.model.AbstractWriteModel; import org.eclipse.ditto.thingsearch.service.updater.actors.MongoWriteModel; import com.typesafe.config.Config; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.stream.javadsl.Source; /** * Default {@code SearchUpdateMapper} for custom search update processing. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/DittoCachingSignalEnrichmentFacadeProvider.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/DittoCachingSignalEnrichmentFacadeProvider.java index d6ed3f8311..bc91798712 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/DittoCachingSignalEnrichmentFacadeProvider.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/DittoCachingSignalEnrichmentFacadeProvider.java @@ -21,7 +21,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Default {@link CachingSignalEnrichmentFacadeProvider} who provides a {@link org.eclipse.ditto.internal.models.signalenrichment.DittoCachingSignalEnrichmentFacade}. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/EnforcementFlow.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/EnforcementFlow.java index ecec341ed0..76ed2fe1d6 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/EnforcementFlow.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/EnforcementFlow.java @@ -59,16 +59,16 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Scheduler; -import akka.japi.Pair; -import akka.japi.pf.PFBuilder; -import akka.pattern.AskTimeoutException; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Scheduler; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.pattern.AskTimeoutException; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Source; /** * Converts Thing changes into write models by retrieving data and applying enforcement via an enforcer cache. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/MongoSearchUpdaterFlow.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/MongoSearchUpdaterFlow.java index 5b59d11ac8..c2c182148c 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/MongoSearchUpdaterFlow.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/MongoSearchUpdaterFlow.java @@ -18,8 +18,8 @@ import java.util.stream.Collectors; import org.bson.BsonDocument; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; import org.eclipse.ditto.internal.utils.metrics.instruments.timer.StartedTimer; import org.eclipse.ditto.thingsearch.service.common.config.PersistenceStreamConfig; @@ -39,10 +39,10 @@ import com.mongodb.reactivestreams.client.MongoCollection; import com.mongodb.reactivestreams.client.MongoDatabase; -import akka.NotUsed; -import akka.japi.pf.PFBuilder; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Source; /** * Flow mapping write models to write results via the search persistence. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/ResolvedPolicyCacheLoader.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/ResolvedPolicyCacheLoader.java index 0d63aca6cd..1ccca8e553 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/ResolvedPolicyCacheLoader.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/ResolvedPolicyCacheLoader.java @@ -27,7 +27,7 @@ import com.github.benmanes.caffeine.cache.AsyncCacheLoader; -import akka.japi.Pair; +import org.apache.pekko.japi.Pair; final class ResolvedPolicyCacheLoader implements AsyncCacheLoader>>> { diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/SearchUpdateMapper.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/SearchUpdateMapper.java index 12a8d04e82..e621622cbf 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/SearchUpdateMapper.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/SearchUpdateMapper.java @@ -25,9 +25,9 @@ import com.typesafe.config.Config; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.stream.javadsl.Source; /** * Search Update Mapper to be loaded by reflection. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/SearchUpdaterStream.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/SearchUpdaterStream.java index 20d4ef68ff..134dbaf893 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/SearchUpdaterStream.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/SearchUpdaterStream.java @@ -23,11 +23,11 @@ import com.mongodb.reactivestreams.client.MongoDatabase; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Source; /** * Stream from the cache of Thing changes to the persistence of the search index. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/SudoSignalEnrichmentFacade.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/SudoSignalEnrichmentFacade.java index 73840151b2..1392dbb218 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/SudoSignalEnrichmentFacade.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/SudoSignalEnrichmentFacade.java @@ -31,8 +31,8 @@ import org.eclipse.ditto.things.model.ThingId; import org.eclipse.ditto.things.model.signals.commands.exceptions.ThingNotAccessibleException; -import akka.actor.ActorRef; -import akka.pattern.Patterns; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.pattern.Patterns; /** * Sudo-retrieve things by asking an actor. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/SearchService.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/SearchService.java index 6f8d989cb5..4acdc50e55 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/SearchService.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/SearchService.java @@ -20,8 +20,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.actor.ActorRef; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; /** * Entry point for the Things Search service. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/MongoClientExtension.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/MongoClientExtension.java index b179d85854..0e6b118710 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/MongoClientExtension.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/MongoClientExtension.java @@ -25,10 +25,10 @@ import com.mongodb.event.CommandListener; import com.mongodb.event.ConnectionPoolListener; -import akka.actor.AbstractExtensionId; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; -import akka.actor.Extension; +import org.apache.pekko.actor.AbstractExtensionId; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; +import org.apache.pekko.actor.Extension; /** * Actor system extension to share a MongoDB client between actors. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchActor.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchActor.java index 9d1cf5c6b0..c44603a793 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchActor.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchActor.java @@ -31,10 +31,10 @@ import org.eclipse.ditto.base.model.signals.commands.Command; import org.eclipse.ditto.base.service.signaltransformer.SignalTransformer; import org.eclipse.ditto.base.service.signaltransformer.SignalTransformers; -import org.eclipse.ditto.internal.utils.akka.actors.AbstractActorWithShutdownBehaviorAndRequestCounting; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.actors.AbstractActorWithShutdownBehaviorAndRequestCounting; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; import org.eclipse.ditto.internal.utils.config.ScopedConfig; @@ -70,26 +70,26 @@ import com.typesafe.config.Config; -import akka.Done; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.CoordinatedShutdown; -import akka.actor.Props; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.japi.pf.PFBuilder; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; -import akka.stream.Graph; -import akka.stream.KillSwitches; -import akka.stream.SharedKillSwitch; -import akka.stream.SourceRef; -import akka.stream.SourceShape; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.StreamRefs; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.CoordinatedShutdown; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.Graph; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.SharedKillSwitch; +import org.apache.pekko.stream.SourceRef; +import org.apache.pekko.stream.SourceShape; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.StreamRefs; /** * Actor handling all supported {@link ThingSearchCommand}s. Currently, those are {@link CountThings} and {@link @@ -155,13 +155,13 @@ private SearchActor(final QueryParser queryParser, final ThingsSearchPersistence } /** - * Creates Akka configuration object Props for this SearchActor. + * Creates Pekko configuration object Props for this SearchActor. * * @param queryFactory factory of query objects. * @param searchPersistence the {@link org.eclipse.ditto.thingsearch.service.persistence.read.ThingsSearchPersistence} * to use in order to execute queries. - * @param pubSubMediator the Akka pub-sub mediator. - * @return the Akka configuration Props object. + * @param pubSubMediator the Pekko pub-sub mediator. + * @return the Pekko configuration Props object. */ static Props props(final QueryParser queryFactory, final ThingsSearchPersistence searchPersistence, final ActorRef pubSubMediator) { diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchHealthCheckingActorFactory.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchHealthCheckingActorFactory.java index 5ac2d29653..d74b1cb729 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchHealthCheckingActorFactory.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchHealthCheckingActorFactory.java @@ -23,8 +23,8 @@ import org.eclipse.ditto.internal.utils.health.config.HealthCheckConfig; import org.eclipse.ditto.internal.utils.persistence.mongo.MongoHealthChecker; -import akka.actor.ActorRef; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; /** * Provides an actor for checking and caching the health of the search service. @@ -44,11 +44,11 @@ private SearchHealthCheckingActorFactory() { } /** - * Creates Akka configuration object Props for a health checking actor. + * Creates Pekko configuration object Props for a health checking actor. * * @param searchConfig the configuration settings. * @param backgroundSyncActorProxy proxy actor for RetrieveHealth messages to the background sync actor. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final SearchConfig searchConfig, final ActorRef backgroundSyncActorProxy) { diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchRootActor.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchRootActor.java index d90ef90b92..22ccbe1086 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchRootActor.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchRootActor.java @@ -16,7 +16,7 @@ import org.eclipse.ditto.base.service.RootChildActorStarter; import org.eclipse.ditto.base.service.actors.DittoRootActor; -import org.eclipse.ditto.internal.utils.akka.streaming.TimestampPersistence; +import org.eclipse.ditto.internal.utils.pekko.streaming.TimestampPersistence; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.internal.utils.config.ScopedConfig; import org.eclipse.ditto.internal.utils.persistence.mongo.DittoMongoClient; @@ -32,12 +32,12 @@ import org.eclipse.ditto.thingsearch.service.persistence.read.query.MongoQueryBuilderFactory; import org.eclipse.ditto.thingsearch.service.updater.actors.SearchUpdaterRootActor; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.event.Logging; -import akka.event.LoggingAdapter; -import akka.stream.SystemMaterializer; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.event.Logging; +import org.apache.pekko.event.LoggingAdapter; +import org.apache.pekko.stream.SystemMaterializer; /** * Our "Parent" Actor which takes care of supervision of all other Actors in our system. @@ -119,11 +119,11 @@ private ActorRef initializeHealthCheckActor(final SearchConfig searchConfig, } /** - * Creates Akka configuration object Props for this SearchRootActor. + * Creates Pekko configuration object Props for this SearchRootActor. * * @param searchConfig the configuration settings of this service. * @param pubSubMediator the PubSub mediator Actor. - * @return the Akka configuration Props object. + * @return the Pekko configuration Props object. */ public static Props props(final SearchConfig searchConfig, final ActorRef pubSubMediator) { return Props.create(SearchRootActor.class, searchConfig, pubSubMediator); diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/ThingsSearchCursor.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/ThingsSearchCursor.java index f9f341899b..8983c1ba4d 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/ThingsSearchCursor.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/ThingsSearchCursor.java @@ -37,7 +37,7 @@ import org.eclipse.ditto.base.model.exceptions.InvalidRqlExpressionException; import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.eclipse.ditto.base.model.headers.WithDittoHeaders; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLoggingAdapter; import org.eclipse.ditto.json.JsonArray; import org.eclipse.ditto.json.JsonCollectors; import org.eclipse.ditto.json.JsonFactory; @@ -69,13 +69,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.http.javadsl.coding.Coder; -import akka.japi.pf.PFBuilder; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Source; -import akka.util.ByteString; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.coding.Coder; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.util.ByteString; import scala.PartialFunction; /** diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/BackgroundSyncActor.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/BackgroundSyncActor.java index 68c768041f..ca3eaae394 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/BackgroundSyncActor.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/BackgroundSyncActor.java @@ -21,8 +21,8 @@ import org.eclipse.ditto.base.api.common.Shutdown; import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.eclipse.ditto.internal.models.streaming.LowerBound; -import org.eclipse.ditto.internal.utils.akka.controlflow.ResumeSource; -import org.eclipse.ditto.internal.utils.akka.streaming.TimestampPersistence; +import org.eclipse.ditto.internal.utils.pekko.controlflow.ResumeSource; +import org.eclipse.ditto.internal.utils.pekko.streaming.TimestampPersistence; import org.eclipse.ditto.internal.utils.health.AbstractBackgroundStreamingActorWithConfigWithStatusReport; import org.eclipse.ditto.internal.utils.health.StatusDetailMessage; import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; @@ -42,14 +42,14 @@ import com.typesafe.config.Config; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.japi.Pair; -import akka.japi.function.Procedure; -import akka.japi.pf.ReceiveBuilder; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.japi.function.Procedure; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** * Cluster-singleton responsible for background synchronization. @@ -104,10 +104,10 @@ private BackgroundSyncActor(final BackgroundSyncConfig backgroundSyncConfig, } /** - * Create Akka Props object for the background sync actor. + * Create Pekko Props object for the background sync actor. * * @param config the config of the background sync actor. - * @param pubSubMediator Akka pub-sub mediator. + * @param pubSubMediator Pekko pub-sub mediator. * @param thingsSearchPersistence the search persistence to access the search index. * @param backgroundSyncPersistence persistence for bookmarks of background sync progress. * @param policiesShardRegion the policies shard region to query policy revisions. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/DefaultSearchUpdateObserver.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/DefaultSearchUpdateObserver.java index 73ee153d57..33db857fe6 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/DefaultSearchUpdateObserver.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/DefaultSearchUpdateObserver.java @@ -19,7 +19,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Default SearchUpdateObserver implementation. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/PolicyModificationForwarder.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/PolicyModificationForwarder.java index e8d338aa3d..3854658f05 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/PolicyModificationForwarder.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/PolicyModificationForwarder.java @@ -12,7 +12,7 @@ */ package org.eclipse.ditto.thingsearch.service.updater.actors; -import static akka.cluster.pubsub.DistributedPubSubMediator.SubscribeAck; +import static org.apache.pekko.cluster.pubsub.DistributedPubSubMediator.SubscribeAck; import java.time.Duration; import java.util.HashMap; @@ -21,7 +21,7 @@ import javax.annotation.Nullable; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; import org.eclipse.ditto.internal.utils.namespaces.BlockNamespaceBehavior; @@ -32,21 +32,21 @@ import org.eclipse.ditto.thingsearch.service.common.config.DittoSearchConfig; import org.eclipse.ditto.thingsearch.service.persistence.write.ThingsSearchUpdaterPersistence; -import akka.Done; -import akka.NotUsed; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.CoordinatedShutdown; -import akka.actor.Props; -import akka.actor.Status; -import akka.event.DiagnosticLoggingAdapter; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; -import akka.stream.KillSwitch; -import akka.stream.KillSwitches; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.CoordinatedShutdown; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.event.DiagnosticLoggingAdapter; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.KillSwitch; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** * Actor that forwards policy tags (emitted by PolicyPersistence after each policy modification) to updater @@ -91,7 +91,7 @@ private PolicyModificationForwarder(final ActorRef pubSubMediator, /** * Create Props for this actor. * - * @param pubSubMediator Akka pub-sub-mediator + * @param pubSubMediator Pekko pub-sub-mediator * @param thingsUpdater thingsUpdater * @param blockedNamespaces blocked namespaces. * @return the Props object. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/SearchUpdateObserver.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/SearchUpdateObserver.java index 870224ba2f..209c5534c6 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/SearchUpdateObserver.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/SearchUpdateObserver.java @@ -23,7 +23,7 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Search update observer to be loaded by reflection. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/SearchUpdaterRootActor.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/SearchUpdaterRootActor.java index 34b87a4a9c..06a47843e7 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/SearchUpdaterRootActor.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/SearchUpdaterRootActor.java @@ -14,7 +14,7 @@ import org.eclipse.ditto.base.api.devops.signals.commands.RetrieveStatisticsDetails; import org.eclipse.ditto.base.service.actors.StartChildActor; -import org.eclipse.ditto.internal.utils.akka.streaming.TimestampPersistence; +import org.eclipse.ditto.internal.utils.pekko.streaming.TimestampPersistence; import org.eclipse.ditto.internal.utils.cluster.ClusterUtil; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.internal.utils.config.ScopedConfig; @@ -31,16 +31,16 @@ import org.eclipse.ditto.thingsearch.service.starter.actors.MongoClientExtension; import org.eclipse.ditto.thingsearch.service.starter.actors.SearchRootActor; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.actor.ActorRefFactory; -import akka.actor.ActorSelection; -import akka.actor.Props; -import akka.actor.Status; -import akka.actor.SupervisorStrategy; -import akka.event.Logging; -import akka.event.LoggingAdapter; -import akka.japi.pf.ReceiveBuilder; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorRefFactory; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Status; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.event.Logging; +import org.apache.pekko.event.LoggingAdapter; +import org.apache.pekko.japi.pf.ReceiveBuilder; /** * Our "Parent" Actor which takes care of supervision of all other Actors in our system. @@ -137,7 +137,7 @@ private SearchUpdaterRootActor(final SearchConfig searchConfig, } /** - * Creates Akka configuration object Props for this SearchUpdaterRootActor. + * Creates Pekko configuration object Props for this SearchUpdaterRootActor. * * @param searchConfig the configuration settings of the Things-Search service. * @param pubSubMediator the PubSub mediator Actor. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ShardRegionFactory.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ShardRegionFactory.java index dc85a1e1f6..24d4fb36d1 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ShardRegionFactory.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ShardRegionFactory.java @@ -25,10 +25,10 @@ import org.eclipse.ditto.things.api.ThingsMessagingConstants; import org.eclipse.ditto.thingsearch.api.ThingsSearchConstants; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.cluster.sharding.ClusterSharding; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.sharding.ClusterSharding; /** * Factory for Shard Region {@link ActorRef}s of different services. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingUpdater.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingUpdater.java index 41f6acc488..500c768e7f 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingUpdater.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingUpdater.java @@ -33,9 +33,9 @@ import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.eclipse.ditto.base.service.actors.ShutdownBehaviour; import org.eclipse.ditto.base.service.config.supervision.ExponentialBackOff; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.internal.utils.cluster.StopShardedActor; import org.eclipse.ditto.internal.utils.metrics.DittoMetrics; import org.eclipse.ditto.internal.utils.metrics.instruments.counter.Counter; @@ -59,24 +59,24 @@ import com.mongodb.client.model.DeleteOneModel; -import akka.Done; -import akka.NotUsed; -import akka.actor.AbstractFSMWithStash; -import akka.actor.ActorRef; -import akka.actor.ActorSelection; -import akka.actor.FSM; -import akka.actor.Props; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.japi.pf.FSMStateFunctionBuilder; -import akka.japi.pf.PFBuilder; -import akka.pattern.Patterns; -import akka.stream.KillSwitches; -import akka.stream.Materializer; -import akka.stream.UniqueKillSwitch; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.AbstractFSMWithStash; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.FSM; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.japi.pf.FSMStateFunctionBuilder; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.UniqueKillSwitch; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** * This Actor initiates persistence updates related to 1 thing. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingsMetadataSource.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingsMetadataSource.java index edf5625fec..ef435911b5 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingsMetadataSource.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingsMetadataSource.java @@ -32,11 +32,11 @@ import org.eclipse.ditto.things.model.ThingId; import org.eclipse.ditto.thingsearch.service.persistence.write.model.Metadata; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.pattern.Patterns; -import akka.stream.SourceRef; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.stream.SourceRef; +import org.apache.pekko.stream.javadsl.Source; /** * Source of metadata streamed from things-service. diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingsSearchPersistenceOperationsActor.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingsSearchPersistenceOperationsActor.java index 01ac9997db..aace54a18a 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingsSearchPersistenceOperationsActor.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingsSearchPersistenceOperationsActor.java @@ -18,8 +18,8 @@ import org.eclipse.ditto.thingsearch.model.ThingSearchConstants; import org.eclipse.ditto.thingsearch.service.persistence.write.ThingsSearchUpdaterPersistence; -import akka.actor.ActorRef; -import akka.actor.Props; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; /** * Actor which performs ops on the search index. @@ -45,9 +45,9 @@ private ThingsSearchPersistenceOperationsActor(final ActorRef pubSubMediator, /** * Create props for this actor. * - * @param pubSubMediator Akka pub-sub mediator. + * @param pubSubMediator Pekko pub-sub mediator. * @param persistence the search updater persistence. - * @param persistenceOperationsConfig the Akka config. + * @param persistenceOperationsConfig the Pekko config. * @return Props of this actor. */ public static Props props(final ActorRef pubSubMediator, final ThingsSearchUpdaterPersistence persistence, diff --git a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingsUpdater.java b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingsUpdater.java index 43c50f2dd4..1e22711ebb 100644 --- a/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingsUpdater.java +++ b/thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingsUpdater.java @@ -22,9 +22,9 @@ import org.eclipse.ditto.base.model.signals.ShardedMessageEnvelope; import org.eclipse.ditto.base.model.signals.events.Event; import org.eclipse.ditto.internal.models.streaming.IdentifiableStreamingMessage; -import org.eclipse.ditto.internal.utils.akka.logging.DittoDiagnosticLoggingAdapter; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.streaming.StreamAck; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoDiagnosticLoggingAdapter; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.streaming.StreamAck; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.internal.utils.cluster.RetrieveStatisticsDetailsResponseSupplier; import org.eclipse.ditto.internal.utils.namespaces.BlockNamespaceBehavior; @@ -38,13 +38,13 @@ import org.eclipse.ditto.thingsearch.api.events.ThingsOutOfSync; import org.eclipse.ditto.thingsearch.service.common.config.UpdaterConfig; -import akka.actor.AbstractActorWithTimers; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.cluster.sharding.ShardRegion; -import akka.japi.pf.ReceiveBuilder; -import akka.pattern.Patterns; +import org.apache.pekko.actor.AbstractActorWithTimers; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.cluster.sharding.ShardRegion; +import org.apache.pekko.japi.pf.ReceiveBuilder; +import org.apache.pekko.pattern.Patterns; /** * This Actor subscribes to messages the Things service emits, when it starts a new ThingActor (a Thing becomes "hot"). @@ -81,14 +81,14 @@ private ThingsUpdater( } /** - * Creates Akka configuration object for this actor. + * Creates Pekko configuration object for this actor. * * @param thingUpdaterShardRegion shard region of thing-updaters * @param updaterConfig configuration for updaters. * @param blockedNamespaces cache of namespaces to block. * @param pubSubMediator the pubsub mediator for subscription for SudoUpdateThing commands, or null if * the subscription is not wanted. - * @return the Akka configuration Props object + * @return the Pekko configuration Props object */ static Props props(final ActorRef thingUpdaterShardRegion, final UpdaterConfig updaterConfig, diff --git a/thingsearch/service/src/main/resources/logback.xml b/thingsearch/service/src/main/resources/logback.xml index 14376de315..9874fe302b 100755 --- a/thingsearch/service/src/main/resources/logback.xml +++ b/thingsearch/service/src/main/resources/logback.xml @@ -16,14 +16,14 @@ - %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{akkaSource} - %msg%n + %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{pekkoSource} - %msg%n System.err - %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{akkaSource} - %msg%n + %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{pekkoSource} - %msg%n ERROR @@ -70,9 +70,9 @@ - - - + + + diff --git a/thingsearch/service/src/main/resources/search-dev.conf b/thingsearch/service/src/main/resources/search-dev.conf index 6652ff4a3e..b8eb5a3a26 100755 --- a/thingsearch/service/src/main/resources/search-dev.conf +++ b/thingsearch/service/src/main/resources/search-dev.conf @@ -8,7 +8,7 @@ ditto { } -akka { +pekko { management.http.port = 25570 remote { @@ -35,8 +35,8 @@ akka { } seed-nodes = [ - "akka://ditto-cluster@127.0.0.1:2552", # port of the policies service to join in cluster - "akka://ditto-cluster@"${akka.remote.artery.canonical.hostname}":"${akka.remote.artery.canonical.port} + "pekko://ditto-cluster@127.0.0.1:2552", # port of the policies service to join in cluster + "pekko://ditto-cluster@"${pekko.remote.artery.canonical.hostname}":"${pekko.remote.artery.canonical.port} ] } diff --git a/thingsearch/service/src/main/resources/search.conf b/thingsearch/service/src/main/resources/search.conf index 1dcec5529e..211f1302ce 100755 --- a/thingsearch/service/src/main/resources/search.conf +++ b/thingsearch/service/src/main/resources/search.conf @@ -287,7 +287,7 @@ ditto { } } -akka { +pekko { cluster { sharding { role = ${ditto.service-name} diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/AbstractThingSearchPersistenceITBase.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/AbstractThingSearchPersistenceITBase.java index fe217cae56..32a249048b 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/AbstractThingSearchPersistenceITBase.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/AbstractThingSearchPersistenceITBase.java @@ -50,14 +50,14 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.event.LoggingAdapter; -import akka.stream.Materializer; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.event.LoggingAdapter; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.javadsl.TestKit; /** @@ -102,7 +102,7 @@ public static void startMongoResource() { @Before public void before() { final Config config = ConfigFactory.load("test"); - actorSystem = ActorSystem.create("AkkaTestSystem", config); + actorSystem = ActorSystem.create("PekkoTestSystem", config); log = actorSystem.log(); readPersistence = provideReadPersistence(); writePersistence = provideWritePersistence(); diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/read/SudoIT.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/read/SudoIT.java index ff63394d46..f3dbc4b94b 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/read/SudoIT.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/read/SudoIT.java @@ -40,7 +40,7 @@ import org.junit.Test; import org.mockito.Mockito; -import akka.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Sink; /** * Test sudo methods. diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/BsonDiffVisitorIT.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/BsonDiffVisitorIT.java index c3f4748ac2..9995f7bc8e 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/BsonDiffVisitorIT.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/mapping/BsonDiffVisitorIT.java @@ -42,10 +42,10 @@ import com.mongodb.reactivestreams.client.MongoCollection; -import akka.actor.ActorSystem; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests incremental update. diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/AbstractWithActorSystemTest.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/AbstractWithActorSystemTest.java index 8fc79768bb..30be6f99d6 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/AbstractWithActorSystemTest.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/AbstractWithActorSystemTest.java @@ -16,8 +16,8 @@ import org.junit.After; -import akka.actor.ActorSystem; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.javadsl.TestKit; /** * For tests that may create an actor system. diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/MetadataTest.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/MetadataTest.java index e5b3a8d0cd..08417d1246 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/MetadataTest.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/MetadataTest.java @@ -22,9 +22,9 @@ import org.eclipse.ditto.things.model.ThingId; import org.junit.Test; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.testkit.TestProbe; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.TestProbe; import nl.jqno.equalsverifier.EqualsVerifier; /** diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/ThingDeleteModelTest.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/ThingDeleteModelTest.java index e9de050352..a0cfc3683f 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/ThingDeleteModelTest.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/ThingDeleteModelTest.java @@ -17,9 +17,9 @@ import org.junit.Test; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.testkit.TestProbe; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.TestProbe; import nl.jqno.equalsverifier.EqualsVerifier; /** diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/ThingWriteModelIT.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/ThingWriteModelIT.java index a1d5182b4f..b6a60deb31 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/ThingWriteModelIT.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/ThingWriteModelIT.java @@ -19,8 +19,8 @@ import java.util.Set; import org.bson.BsonDocument; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.things.model.ThingId; import org.eclipse.ditto.thingsearch.service.persistence.AbstractThingSearchPersistenceITBase; import org.eclipse.ditto.thingsearch.service.persistence.PersistenceConstants; @@ -32,8 +32,8 @@ import com.mongodb.bulk.BulkWriteResult; import com.mongodb.reactivestreams.client.MongoCollection; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; /** * Tests MongoDB interaction of {@link ThingWriteModel}. diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/ThingWriteModelTest.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/ThingWriteModelTest.java index c002eadb44..84df822746 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/ThingWriteModelTest.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/model/ThingWriteModelTest.java @@ -14,9 +14,9 @@ import org.junit.Test; -import akka.actor.ActorSelection; -import akka.actor.ActorSystem; -import akka.testkit.TestProbe; +import org.apache.pekko.actor.ActorSelection; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.testkit.TestProbe; import nl.jqno.equalsverifier.EqualsVerifier; /** diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/BackgroundSyncStreamTest.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/BackgroundSyncStreamTest.java index 3db56cdc41..2461a61188 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/BackgroundSyncStreamTest.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/BackgroundSyncStreamTest.java @@ -35,11 +35,11 @@ import org.junit.BeforeClass; import org.junit.Test; -import akka.NotUsed; -import akka.actor.ActorSystem; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link BackgroundSyncStream}. diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/BulkWriteResultAckFlowTest.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/BulkWriteResultAckFlowTest.java index 73afaf26df..d364d65e73 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/BulkWriteResultAckFlowTest.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/BulkWriteResultAckFlowTest.java @@ -43,12 +43,12 @@ import com.mongodb.bulk.BulkWriteResult; import com.mongodb.bulk.BulkWriteUpsert; -import akka.actor.ActorSystem; -import akka.japi.Pair; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link BulkWriteResultAckFlow}. diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/EnforcementFlowTest.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/EnforcementFlowTest.java index 6337e0d541..4d1c068c42 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/EnforcementFlowTest.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/EnforcementFlowTest.java @@ -57,17 +57,17 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.stream.KillSwitches; -import akka.stream.javadsl.Keep; -import akka.stream.testkit.TestPublisher; -import akka.stream.testkit.TestSubscriber; -import akka.stream.testkit.javadsl.TestSink; -import akka.stream.testkit.javadsl.TestSource; -import akka.testkit.TestActor; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.stream.KillSwitches; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.testkit.TestPublisher; +import org.apache.pekko.stream.testkit.TestSubscriber; +import org.apache.pekko.stream.testkit.javadsl.TestSink; +import org.apache.pekko.stream.testkit.javadsl.TestSource; +import org.apache.pekko.testkit.TestActor; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.concurrent.duration.Duration; import scala.concurrent.duration.FiniteDuration; diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/TestSearchUpdaterStream.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/TestSearchUpdaterStream.java index 407055a018..eecf79337c 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/TestSearchUpdaterStream.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/write/streaming/TestSearchUpdaterStream.java @@ -34,8 +34,8 @@ import com.mongodb.reactivestreams.client.MongoDatabase; import com.typesafe.config.ConfigFactory; -import akka.NotUsed; -import akka.stream.javadsl.Source; +import org.apache.pekko.NotUsed; +import org.apache.pekko.stream.javadsl.Source; /** * Run parts of the updater stream for unit tests. diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchActorIT.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchActorIT.java index bd94d7c1f5..d892f1fd4b 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchActorIT.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchActorIT.java @@ -75,11 +75,11 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.stream.SourceRef; -import akka.stream.javadsl.Sink; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.stream.SourceRef; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests {@link SearchActor}. diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchActorTest.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchActorTest.java index a59ec3ce32..34956b7e20 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchActorTest.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchActorTest.java @@ -22,7 +22,7 @@ import org.eclipse.ditto.base.model.auth.AuthorizationSubject; import org.eclipse.ditto.base.model.auth.DittoAuthorizationContextType; import org.eclipse.ditto.base.model.headers.DittoHeaders; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.internal.utils.cluster.DistPubSubAccess; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; import org.eclipse.ditto.internal.utils.tracing.DittoTracingInitResource; @@ -45,16 +45,16 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.Done; -import akka.actor.ActorRef; -import akka.actor.PoisonPill; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.stream.CompletionStrategy; -import akka.stream.OverflowStrategy; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Source; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.Done; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.PoisonPill; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.stream.CompletionStrategy; +import org.apache.pekko.stream.OverflowStrategy; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Tests the graceful shutdown behavior of {@code SearchActor}. @@ -162,9 +162,9 @@ public void waitForQueries() { } private ActorRef use(final Consumer stubberConsumer) { - final akka.japi.function.Function> completionStrategy = + final org.apache.pekko.japi.function.Function> completionStrategy = msg -> Optional.of(msg).filter("complete"::equals).map(m -> CompletionStrategy.draining()); - final akka.japi.function.Function> failureMatcher = msg -> Optional.empty(); + final org.apache.pekko.japi.function.Function> failureMatcher = msg -> Optional.empty(); final var mat = Source.actorRef(completionStrategy, failureMatcher, 16, OverflowStrategy.dropHead()) .preMaterialize(SystemMaterializer.get(actorSystemResource.getActorSystem()).materializer()); diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchRootActorTest.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchRootActorTest.java index b547b435a3..356b0a4c28 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchRootActorTest.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchRootActorTest.java @@ -18,8 +18,8 @@ import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; import org.eclipse.ditto.thingsearch.service.starter.SearchService; -import akka.actor.ActorSystem; -import akka.actor.Props; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; /** * Tests {@link SearchRootActor}. diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchUpdaterRootActorTest.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchUpdaterRootActorTest.java index 933f357a9b..f2a4f5c5cb 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchUpdaterRootActorTest.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchUpdaterRootActorTest.java @@ -15,7 +15,7 @@ import java.util.Optional; import org.eclipse.ditto.base.service.actors.AbstractDittoRootActorTest; -import org.eclipse.ditto.internal.utils.akka.streaming.TimestampPersistence; +import org.eclipse.ditto.internal.utils.pekko.streaming.TimestampPersistence; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; import org.eclipse.ditto.thingsearch.service.common.config.DittoSearchConfig; import org.eclipse.ditto.thingsearch.service.common.config.SearchConfig; @@ -24,8 +24,8 @@ import org.eclipse.ditto.thingsearch.service.updater.actors.SearchUpdaterRootActor; import org.mockito.Mockito; -import akka.actor.ActorSystem; -import akka.actor.Props; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; /** * Tests {@link SearchRootActor}. diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/ThingsSearchCursorTest.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/ThingsSearchCursorTest.java index f4048ac7f8..ebb3fea33a 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/ThingsSearchCursorTest.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/starter/actors/ThingsSearchCursorTest.java @@ -42,10 +42,10 @@ import com.typesafe.config.ConfigFactory; -import akka.actor.ActorSystem; -import akka.japi.pf.PFBuilder; -import akka.stream.javadsl.Sink; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.japi.pf.PFBuilder; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.testkit.javadsl.TestKit; import nl.jqno.equalsverifier.EqualsVerifier; /** diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/updater/actors/BackgroundSyncActorTest.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/updater/actors/BackgroundSyncActorTest.java index 76a2b9e337..234d92088d 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/updater/actors/BackgroundSyncActorTest.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/updater/actors/BackgroundSyncActorTest.java @@ -41,7 +41,7 @@ import org.eclipse.ditto.base.model.signals.acks.Acknowledgement; import org.eclipse.ditto.internal.models.streaming.StreamedSnapshot; import org.eclipse.ditto.internal.models.streaming.SudoStreamSnapshots; -import org.eclipse.ditto.internal.utils.akka.streaming.TimestampPersistence; +import org.eclipse.ditto.internal.utils.pekko.streaming.TimestampPersistence; import org.eclipse.ditto.internal.utils.health.ResetHealthEvents; import org.eclipse.ditto.internal.utils.health.ResetHealthEventsResponse; import org.eclipse.ditto.internal.utils.health.RetrieveHealth; @@ -72,17 +72,17 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.Done; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.japi.Pair; -import akka.stream.Materializer; -import akka.stream.SourceRef; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.StreamRefs; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.japi.Pair; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.SourceRef; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.StreamRefs; +import org.apache.pekko.testkit.javadsl.TestKit; /** * Unit test for {@link BackgroundSyncActor}. @@ -122,7 +122,7 @@ public final class BackgroundSyncActorTest { @Before public void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem", TEST_CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", TEST_CONFIG); thingsUpdater = new TestKit(actorSystem); pubSub = new TestKit(actorSystem); policiesShardRegion = new TestKit(actorSystem); diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingUpdaterTest.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingUpdaterTest.java index 5ad54c1bc1..004cfe45bd 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingUpdaterTest.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingUpdaterTest.java @@ -29,7 +29,7 @@ import org.eclipse.ditto.base.model.acks.DittoAcknowledgementLabel; import org.eclipse.ditto.base.model.entity.id.EntityId; import org.eclipse.ditto.base.model.headers.DittoHeaders; -import org.eclipse.ditto.internal.utils.akka.ActorSystemResource; +import org.eclipse.ditto.internal.utils.pekko.ActorSystemResource; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; import org.eclipse.ditto.internal.utils.tracing.DittoTracingInitResource; import org.eclipse.ditto.json.JsonPointer; @@ -58,24 +58,24 @@ import com.mongodb.client.model.UpdateOneModel; import com.typesafe.config.ConfigFactory; -import akka.Done; -import akka.NotUsed; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.cluster.pubsub.DistributedPubSubMediator; -import akka.stream.javadsl.Flow; -import akka.stream.javadsl.Keep; -import akka.stream.javadsl.MergeHub; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.stream.scaladsl.BroadcastHub; -import akka.stream.testkit.TestPublisher; -import akka.stream.testkit.TestSubscriber; -import akka.stream.testkit.javadsl.TestSink; -import akka.stream.testkit.javadsl.TestSource; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.Done; +import org.apache.pekko.NotUsed; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.pubsub.DistributedPubSubMediator; +import org.apache.pekko.stream.javadsl.Flow; +import org.apache.pekko.stream.javadsl.Keep; +import org.apache.pekko.stream.javadsl.MergeHub; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.scaladsl.BroadcastHub; +import org.apache.pekko.stream.testkit.TestPublisher; +import org.apache.pekko.stream.testkit.TestSubscriber; +import org.apache.pekko.stream.testkit.javadsl.TestSink; +import org.apache.pekko.stream.testkit.javadsl.TestSource; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.concurrent.duration.FiniteDuration; /** diff --git a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingsUpdaterTest.java b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingsUpdaterTest.java index 8369622767..bd332bb5df 100644 --- a/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingsUpdaterTest.java +++ b/thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingsUpdaterTest.java @@ -31,7 +31,7 @@ import org.eclipse.ditto.base.model.json.JsonSchemaVersion; import org.eclipse.ditto.base.model.json.Jsonifiable; import org.eclipse.ditto.base.model.signals.ShardedMessageEnvelope; -import org.eclipse.ditto.internal.utils.akka.streaming.StreamAck; +import org.eclipse.ditto.internal.utils.pekko.streaming.StreamAck; import org.eclipse.ditto.internal.utils.ddata.DistributedData; import org.eclipse.ditto.internal.utils.namespaces.BlockedNamespaces; import org.eclipse.ditto.policies.api.PolicyTag; @@ -53,12 +53,12 @@ import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.cluster.sharding.ShardRegion; -import akka.testkit.TestProbe; -import akka.testkit.javadsl.TestKit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Props; +import org.apache.pekko.cluster.sharding.ShardRegion; +import org.apache.pekko.testkit.TestProbe; +import org.apache.pekko.testkit.javadsl.TestKit; import scala.concurrent.duration.FiniteDuration; /** @@ -81,7 +81,7 @@ public final class ThingsUpdaterTest { @Before public void setUp() { - actorSystem = ActorSystem.create("AkkaTestSystem", TEST_CONFIG); + actorSystem = ActorSystem.create("PekkoTestSystem", TEST_CONFIG); shardMessageReceiver = TestProbe.apply(actorSystem); shardRegionFactory = getMockedShardRegionFactory(shardMessageReceiver.ref()); // create blocked namespaces cache without role and with the default replicator name diff --git a/thingsearch/service/src/test/resources/actors-test.conf b/thingsearch/service/src/test/resources/actors-test.conf index f6861907d2..8db57fef1d 100755 --- a/thingsearch/service/src/test/resources/actors-test.conf +++ b/thingsearch/service/src/test/resources/actors-test.conf @@ -177,7 +177,7 @@ ditto { } -akka { +pekko { # disable coordinated shutdown for tests coordinated-shutdown.terminate-actor-system = off coordinated-shutdown.run-by-actor-system-terminate = off diff --git a/thingsearch/service/src/test/resources/logback-test.xml b/thingsearch/service/src/test/resources/logback-test.xml index 820e030839..9ab0e39ae3 100644 --- a/thingsearch/service/src/test/resources/logback-test.xml +++ b/thingsearch/service/src/test/resources/logback-test.xml @@ -17,14 +17,14 @@ - %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{akkaSource} - %msg%n + %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{pekkoSource} - %msg%n System.err - %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{akkaSource} - %msg%n + %date{ISO8601} %-5level [%X{x-correlation-id}] %logger{20} %X{pekkoSource} - %msg%n ERROR @@ -34,7 +34,7 @@ - + diff --git a/thingsearch/service/src/test/resources/test.conf b/thingsearch/service/src/test/resources/test.conf index 148d54b9e6..878fcf58f0 100755 --- a/thingsearch/service/src/test/resources/test.conf +++ b/thingsearch/service/src/test/resources/test.conf @@ -26,10 +26,10 @@ ditto { search {} } -akka { - loggers = ["akka.event.slf4j.Slf4jLogger"] +pekko { + loggers = ["org.apache.pekko.event.slf4j.Slf4jLogger"] loglevel = "WARNING" - logging-filter = "akka.event.slf4j.Slf4jLoggingFilter" + logging-filter = "org.apache.pekko.event.slf4j.Slf4jLoggingFilter" # for log messages during the actor system is starting up and shutting down: stdout-loglevel = "WARNING" @@ -37,7 +37,7 @@ akka { log-config-on-start = off actor { - provider = "akka.cluster.ClusterActorRefProvider" + provider = "org.apache.pekko.cluster.ClusterActorRefProvider" enable-additional-serialization-bindings = on # this is only intended for testing. @@ -48,7 +48,7 @@ akka { lifecycle = on } - guardian-supervisor-strategy = "akka.actor.StoppingSupervisorStrategy" + guardian-supervisor-strategy = "org.apache.pekko.actor.StoppingSupervisorStrategy" deployment { } @@ -66,7 +66,7 @@ akka { json = "org.eclipse.ditto.internal.utils.cluster.JsonJsonifiableSerializer" cbor = "org.eclipse.ditto.internal.utils.cluster.CborJsonifiableSerializer" cbor-json-value = "org.eclipse.ditto.internal.utils.cluster.CborJsonValueSerializer" - jackson-cbor = "akka.serialization.jackson.JacksonCborSerializer" + jackson-cbor = "org.apache.pekko.serialization.jackson.JacksonCborSerializer" } serialization-bindings { @@ -75,7 +75,7 @@ akka { "org.eclipse.ditto.base.model.exceptions.DittoRuntimeException" = cbor "org.eclipse.ditto.base.api.devops.signals.commands.DevOpsCommandResponse" = json # to ensure readability "org.eclipse.ditto.json.JsonValue" = cbor-json-value - "org.eclipse.ditto.internal.utils.cluster.AkkaJacksonCborSerializable" = jackson-cbor + "org.eclipse.ditto.internal.utils.cluster.PekkoJacksonCborSerializable" = jackson-cbor } } @@ -99,7 +99,7 @@ akka { cluster { metrics.enabled = off - seed-nodes = ["akka://AkkaTestSystem@"${akka.remote.artery.canonical.hostname}":"${akka.remote.artery.canonical.port}] + seed-nodes = ["pekko://PekkoTestSystem@"${pekko.remote.artery.canonical.hostname}":"${pekko.remote.artery.canonical.port}] roles = [ "search", @@ -124,7 +124,7 @@ akka { default-timeout = 5s calling-thread-dispatcher { - type = akka.testkit.CallingThreadDispatcherConfigurator + type = org.apache.pekko.testkit.CallingThreadDispatcherConfigurator } } } diff --git a/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/generator/DefaultWotThingDescriptionGenerator.java b/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/generator/DefaultWotThingDescriptionGenerator.java index 9bc61a95fb..a687ba9096 100644 --- a/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/generator/DefaultWotThingDescriptionGenerator.java +++ b/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/generator/DefaultWotThingDescriptionGenerator.java @@ -39,8 +39,8 @@ import org.eclipse.ditto.base.model.headers.DittoHeaderDefinition; import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.eclipse.ditto.base.model.headers.contenttype.ContentType; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLogger; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; import org.eclipse.ditto.json.JsonArray; import org.eclipse.ditto.json.JsonCollectors; import org.eclipse.ditto.json.JsonField; @@ -98,7 +98,7 @@ import org.eclipse.ditto.wot.model.WotThingModelInvalidException; import org.eclipse.ditto.wot.model.WotThingModelPlaceholderUnresolvedException; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Default Ditto specific implementation of {@link WotThingDescriptionGenerator}. diff --git a/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/generator/DefaultWotThingSkeletonGenerator.java b/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/generator/DefaultWotThingSkeletonGenerator.java index 33b1db0156..4c784aa271 100644 --- a/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/generator/DefaultWotThingSkeletonGenerator.java +++ b/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/generator/DefaultWotThingSkeletonGenerator.java @@ -33,8 +33,8 @@ import javax.annotation.concurrent.Immutable; import org.eclipse.ditto.base.model.headers.DittoHeaders; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.json.JsonArray; import org.eclipse.ditto.json.JsonArrayBuilder; import org.eclipse.ditto.json.JsonObject; @@ -71,8 +71,8 @@ import org.eclipse.ditto.wot.model.TmOptional; import org.eclipse.ditto.wot.model.WotThingModelInvalidException; -import akka.actor.ActorSystem; -import akka.japi.Pair; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.japi.Pair; /** * Default Ditto specific implementation of {@link WotThingSkeletonGenerator}. diff --git a/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/generator/WotThingDescriptionGenerator.java b/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/generator/WotThingDescriptionGenerator.java index c40d8f1b57..b3eb6ad9eb 100644 --- a/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/generator/WotThingDescriptionGenerator.java +++ b/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/generator/WotThingDescriptionGenerator.java @@ -26,7 +26,7 @@ import org.eclipse.ditto.wot.model.ThingDescription; import org.eclipse.ditto.wot.model.ThingModel; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Generator for WoT (Web of Things) {@link ThingDescription} based on a given WoT {@link ThingModel} and context of the diff --git a/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/generator/WotThingSkeletonGenerator.java b/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/generator/WotThingSkeletonGenerator.java index b458ddb63b..f2247ebe90 100644 --- a/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/generator/WotThingSkeletonGenerator.java +++ b/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/generator/WotThingSkeletonGenerator.java @@ -23,7 +23,7 @@ import org.eclipse.ditto.wot.integration.provider.WotThingModelFetcher; import org.eclipse.ditto.wot.model.ThingModel; -import akka.actor.ActorSystem; +import org.apache.pekko.actor.ActorSystem; /** * Generator for WoT (Web of Things) based Ditto {@link Thing}s and {@link Feature} skeletons based on diff --git a/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/provider/DefaultWotThingDescriptionProvider.java b/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/provider/DefaultWotThingDescriptionProvider.java index 46e1158128..fa4e47976a 100644 --- a/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/provider/DefaultWotThingDescriptionProvider.java +++ b/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/provider/DefaultWotThingDescriptionProvider.java @@ -26,8 +26,8 @@ import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; import org.eclipse.ditto.base.model.headers.DittoHeaders; import org.eclipse.ditto.base.model.signals.FeatureToggle; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.config.DefaultScopedConfig; import org.eclipse.ditto.json.JsonValue; import org.eclipse.ditto.things.model.DefinitionIdentifier; @@ -44,9 +44,9 @@ import org.eclipse.ditto.wot.model.ThingDescription; import org.eclipse.ditto.wot.model.WotInternalErrorException; -import akka.actor.AbstractExtensionId; -import akka.actor.ActorSystem; -import akka.actor.ExtendedActorSystem; +import org.apache.pekko.actor.AbstractExtensionId; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.ExtendedActorSystem; /** * Default Ditto specific implementation of {@link WotThingDescriptionProvider}. diff --git a/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/provider/DefaultWotThingModelFetcher.java b/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/provider/DefaultWotThingModelFetcher.java index f9c8406b38..765897006a 100644 --- a/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/provider/DefaultWotThingModelFetcher.java +++ b/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/provider/DefaultWotThingModelFetcher.java @@ -26,8 +26,8 @@ import org.eclipse.ditto.base.model.exceptions.DittoRuntimeException; import org.eclipse.ditto.base.model.headers.DittoHeaders; -import org.eclipse.ditto.internal.utils.akka.logging.DittoLoggerFactory; -import org.eclipse.ditto.internal.utils.akka.logging.ThreadSafeDittoLogger; +import org.eclipse.ditto.internal.utils.pekko.logging.DittoLoggerFactory; +import org.eclipse.ditto.internal.utils.pekko.logging.ThreadSafeDittoLogger; import org.eclipse.ditto.internal.utils.cache.Cache; import org.eclipse.ditto.internal.utils.cache.CacheFactory; import org.eclipse.ditto.internal.utils.http.DefaultHttpClientFacade; @@ -44,18 +44,18 @@ import com.github.benmanes.caffeine.cache.AsyncCacheLoader; -import akka.actor.ActorSystem; -import akka.http.javadsl.model.HttpHeader; -import akka.http.javadsl.model.HttpRequest; -import akka.http.javadsl.model.HttpResponse; -import akka.http.javadsl.model.MediaRanges; -import akka.http.javadsl.model.MediaTypes; -import akka.http.javadsl.model.headers.Accept; -import akka.http.javadsl.model.headers.Location; -import akka.stream.Materializer; -import akka.stream.SystemMaterializer; -import akka.stream.javadsl.Sink; -import akka.util.ByteString; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.http.javadsl.model.HttpHeader; +import org.apache.pekko.http.javadsl.model.HttpRequest; +import org.apache.pekko.http.javadsl.model.HttpResponse; +import org.apache.pekko.http.javadsl.model.MediaRanges; +import org.apache.pekko.http.javadsl.model.MediaTypes; +import org.apache.pekko.http.javadsl.model.headers.Accept; +import org.apache.pekko.http.javadsl.model.headers.Location; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.SystemMaterializer; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.util.ByteString; /** * Default implementation of {@link WotThingModelFetcher} which should be not Ditto specific. diff --git a/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/provider/WotThingDescriptionProvider.java b/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/provider/WotThingDescriptionProvider.java index 72ca8c754b..3b7a7c83be 100644 --- a/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/provider/WotThingDescriptionProvider.java +++ b/wot/integration/src/main/java/org/eclipse/ditto/wot/integration/provider/WotThingDescriptionProvider.java @@ -26,8 +26,8 @@ import org.eclipse.ditto.things.model.ThingId; import org.eclipse.ditto.wot.model.ThingDescription; -import akka.actor.ActorSystem; -import akka.actor.Extension; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Extension; /** * Extension for providing WoT (Web of Things) {@link ThingDescription}s for given {@code thingId}s from either a