Pub Sub Subscribe Options
class PubSubSubscribeOptions
Configuration bounding a PubSub subscription's history volume and live delivery rate.
Passed to subscribe, these limit how much history is replayed on subscribe (setOldMessageLimit), cap how fast live messages are delivered (setNewMessageLimit), and choose what happens to live messages arriving faster than they drain (RealtimeOverflow).
They do not change how messages are delivered. History streams in server-paced batches via onOldMessagesReceived with or without options, and live batching is a server-side setting rather than a subscribe option.
Code Example:
try {
PubSubSubscribeOptions options = new PubSubSubscribeOptions();
options.setOldMessageLimit(100);
options.setRealtimeOverflow(PubSubSubscribeOptions.RealtimeOverflow.QUEUE);
options.setMaxQueue(70);
meeting.pubSub.subscribe("CHAT", listener, options);
} catch (Exception e) {
Log.d("VideoSDK", "subscribe failed: " + e.getMessage());
}
Content copied to clipboard
See also
Meeting.PubSub.subscribe()
Types
Link copied to clipboard
enum RealtimeOverflow
Policy for live messages that arrive faster than they can be delivered.