Skip to content

More flow operators #248

Description

@adamw

Inspired by https://github.com/apache/pekko/blob/main/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:

  • sample(n: Int) -> emit every nth element from the parent flow
  • zipWithIndex
  • debounce (remove subsequent, repeating elements)
  • debounceBy(T => U)
  • recover(Throwable => T) (emit one element when the stream fails)
  • recoverWith(Throwable => Flow) (start alternative flow on failure)
  • recoverWithRetry(RetryConfig)(Throwable => Flow)
  • mapWithResource(=> R, R => Option[U])((R, T) => U)
  • mapWithCloseableResource(=> R)((R, T) => U)
  • scan(V)((V, T) => T)
  • conflate
  • batch
  • expand
  • extrapolate
  • onErrorComplete
  • onErrorRecover

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions