BackpressureOptions

class BackpressureOptions @InternalWowApi constructor(val maxAttempts: Int = 20, val initialBackoff: Duration = 100.milliseconds, val maxBackoff: Duration = 10.seconds, val jitter: Double = 0.5, val minConcurrency: Int = 1)

How a subscription answers backpressure: a failure classified me.ahoo.wow.spi.subscription.FailureClass.BACKPRESSURE, a downstream that is up but asked to be called later. The entry is retried at most maxAttempts times, then its aggregate parks as after any spent budget; it never pauses the partition. The wait before the next attempt starts at initialBackoff, doubles to at most maxBackoff, is shortened by up to jitter (a share, 0 to 1) at random so the lanes do not retry in step, and is at least the downstream's Retry-After. Meanwhile the partition is throttled: each backpressure halves the handlings it runs at once, down to minConcurrency, and each success raises it by half again, back to the in-flight bound (at once when no handling waits under the limit).

Fields may be added: Wow builds it from the host's configuration, so the constructor is internal to Wow.

Constructors

Link copied to clipboard
constructor(maxAttempts: Int = 20, initialBackoff: Duration = 100.milliseconds, maxBackoff: Duration = 10.seconds, jitter: Double = 0.5, minConcurrency: Int = 1)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String