j5ik2o / akka-persistence-s3   1.2.177

Apache License 2.0 GitHub

akka-persistence journal/snapshot plugin for AWS S3(support aws sdk for java v2)

Scala versions: 3.x 2.13 2.12

akka-persistence-s3(support aws sdk for java v2)

CI Scala Steward badge Maven Central License FOSSA Status

akka-persistence-s3 writes snapshot entries to AWS S3. It's non-blocking I/ O used by aws-sdk-java-v2.

Supported versions:

  • Java: 1.8+
  • Scala: 2.12.x or 2.13.x or 3.0.0
  • Akka: 2.6.x
  • AWS-SDK: 2.4.x

Installation

Add the following to your sbt build (2.12.x, 2.13.x, 3.0.0):

val version = "..."

libraryDependencies += Seq(
  "com.github.j5ik2o" %% "akka-persistence-s3-journal" % version,
  "com.github.j5ik2o" %% "akka-persistence-s3-snapshot" % version
)

Configuration

The minimum necessary settings are as follows.

j5ik2o {
  s3-snapshot-store {
    # if need to resolve a static value
    # bucket-name = "..."
    # if need to resolve a dynamic value
    bucket-name-resolver-class-name = "com.github.j5ik2o.akka.persistence.s3.resolver.BucketNameResolver$PersistenceId"
    key-converter-class-name = "com.github.j5ik2o.akka.persistence.s3.resolver.KeyConverter$PersistenceId"
    # if need to resolve a static value
    # path-prefix = "..."
    # if need to resolve a dynamic value
    path-prefix-resolver-class-name = "com.github.j5ik2o.akka.persistence.s3.resolver.PathPrefixResolver$PersistenceId"
    extension-name = "snapshot"
    max-load-attempts = 3
    s3-client {
      # Set the following as needed
      access-key-id = "..."
      secret-access-key = "..."
      endpoint = "..."
      region = "..."
      max-concurrency = 128
      max-pending-connection-acquires = ?
      read-timeout = 3 s
      write-timeout = 3 s
      connection-timeout = 3 s
      connection-acquisition-timeout = 3 s
      connection-time-to-live = 3 s
      max-idle-connection-timeout = 3 s
      use-connection-reaper = true
      threads-of-event-loop-group = 32
      user-http2 = true
      max-http2-streams = 32
      batch-get-item-limit = 100
      batch-write-item-limit = 25
      s3-options {
        dualstack-enabled = false
        accelerate-mode-enabled = false
        path-style-access-enabled = true
        checksum-validation-enabled = false
        chunked-encoding-enabled = false
        use-arn-region-enabled = false
      }
    }
  }
}

License

FOSSA Status