Class BackpressureInterceptor

java.lang.Object
org.atmosphere.cpr.AtmosphereInterceptorAdapter
org.atmosphere.interceptor.BackpressureInterceptor
All Implemented Interfaces:
AtmosphereInterceptor, AtmosphereConfigAware, InvokationOrder

public class BackpressureInterceptor extends AtmosphereInterceptorAdapter
Backpressure interceptor that tracks per-client pending message counts and applies configurable policies when a client falls behind.

Configuration (init-params or ApplicationConfig)

  • org.atmosphere.backpressure.highWaterMark — max pending messages per client (default: 1000)
  • org.atmosphere.backpressure.policy — what to do when exceeded: drop-oldest, drop-newest, disconnect (default: drop-oldest)

Usage


 framework.interceptor(new BackpressureInterceptor());
 
Since:
4.0