Skip to content

More flow operators #248

@adamw

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

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