PubSubSubscribeOptions

constructor(oldMessageLimit: Int? = null, realtimeOverflow: RealtimeOverflow = RealtimeOverflow.QUEUE, maxQueue: Int? = null, newMessageLimit: Int? = null)

Parameters

oldMessageLimit

how many persisted messages to replay on subscribe: null for all of them (the default), 0 for none (live messages only), or N > 0 for the last N. Negative is rejected.

realtimeOverflow

the policy for live messages arriving faster than they drain.

maxQueue

how far a subscriber may fall behind under RealtimeOverflow.QUEUE before the server gives up on it and reports the range through PubSubMessageListener.onMessageDrop. It counts delivery batches, not messages. null (the default) leaves it to the server; N >= 1 asks for N, clamped to the server's maximum, and whichever subscriber subscribes to the topic first fixes it for everyone. Below 1, or combined with RealtimeOverflow.DROP, is rejected.

newMessageLimit

caps how many live messages this subscriber accepts per 500 ms server window, so roughly 2 × N a second. null (the default) or 0 means unlimited; negative is rejected. Messages past the cap are skipped for this subscriber only and reported through onMessageDrop once delivery continues, so capping a topic you also watch for drops produces drop callbacks by design.