Skip to content

Implement callbacks to Akka's FileIO whenever writing successfully adds a chunk to a file #197

@mdedetrich

Description

@mdedetrich

What is currently missing?

At some point we would like to add file based backups to Guardian.

How could this be improved?

Currently this is not possible because Akka's FileIO doesn't allow you to add a "callback" whenever a chunk of bytes have been successfully written to disk. The callback is required to commit the current Kafka cursor and hence the set of changes required are similar in concept to what was done with Alpakka's S3 client (see akka/alpakka#2770). Here is the location where the current FileIO actually writes the data to disk https://github.com/akka/akka/blob/7abc41cf4e7e8827393b181cd06c5f8ea684e696/akka-stream/src/main/scala/akka/stream/impl/io/FileOutputStage.scala#L63

Is this a feature you would work on yourself?

  • I plan to open a pull request for this feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    fileSpecifically related to flat file based backendupstreamIssues that require changes/co-operation with upstream libraries/projects

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions