DropOldAndSignal
final case class DropOldAndSignal[A](bufferSize: Int, onOverflow: Long => Coeval[Option[A]]) extends Evicted[A]
A OverflowStrategy specifying that on reaching the maximum size, the currently buffered events should start being dropped in a FIFO order, so the oldest events from the buffer will be dropped first.
The given onOverflow
function get be used for logging the event
and for sending a message to the downstream consumers to inform
them of dropped messages. The function can return None
in which
case no message is sent and thus you can use it just to log a warning.
- Value parameters:
- bufferSize
specifies how many events our buffer can hold before overflowing
- onOverflow
is a function that can get called on overflow with a number of messages that were dropped, a function that builds a new message that will be sent to downstream. If it returns
None
, then no message gets sent to downstream.
trait Product
trait Equals
class Evicted[A]
class Synchronous[A]
class OverflowStrategy[A]
trait Serializable
class Object
trait Matchable
class Any