in jdbc/src/main/scala/org/apache/pekko/projection/jdbc/internal/JdbcProjectionImpl.scala [165:193]
private def copy(
settingsOpt: Option[ProjectionSettings] = this.settingsOpt,
restartBackoffOpt: Option[RestartSettings] = this.restartBackoffOpt,
offsetStrategy: OffsetStrategy = this.offsetStrategy,
handlerStrategy: HandlerStrategy = this.handlerStrategy,
statusObserver: StatusObserver[Envelope] = this.statusObserver): JdbcProjectionImpl[Offset, Envelope, S] =
new JdbcProjectionImpl(
projectionId,
sourceProvider,
sessionFactory,
settingsOpt,
restartBackoffOpt,
offsetStrategy,
handlerStrategy,
statusObserver,
offsetStore)
type ReadOffset = () => Future[Option[Offset]]
/*
* Build the final ProjectionSettings to use, if currently set to None fallback to values in config file
*/
private def settingsOrDefaults(implicit system: ActorSystem[_]): ProjectionSettings = {
val settings = settingsOpt.getOrElse(ProjectionSettings(system))
restartBackoffOpt match {
case None => settings
case Some(r) => settings.copy(restartBackoff = r)
}
}