All Downloads are FREE. Search and download functionalities are using the official Maven repository.

akka.projection.r2dbc.scaladsl.R2dbcReplication.scala Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (C) 2022 - 2023 Lightbend Inc. 
 */

package akka.projection.r2dbc.scaladsl

import akka.actor.typed.ActorSystem
import akka.projection.grpc.replication.scaladsl.ReplicationProjectionProvider
import akka.projection.r2dbc.R2dbcProjectionSettings

object R2dbcReplication {

  /**
   * Creates a projection provider for using R2dbc as backend for the Akka Projection gRPC transport for Replicated
   * Event Sourcing.
   */
  def apply()(implicit system: ActorSystem[_]): ReplicationProjectionProvider =
    R2dbcProjection.atLeastOnceFlow(
      _,
      Some(R2dbcProjectionSettings(system).withWarnAboutFilteredEventsInFlow(false)),
      _,
      _)(_)

  /**
   * Creates a projection provider for using R2dbc as backend for the Akka Projection gRPC transport for Replicated
   * Event Sourcing.
   */
  def apply(settings: R2dbcProjectionSettings): ReplicationProjectionProvider =
    R2dbcProjection.atLeastOnceFlow(_, Some(settings.withWarnAboutFilteredEventsInFlow(false)), _, _)(_)

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy