PubSubPublishOptions

Configuration options for publishing a message via PubSub.

Set options such as message persistence and targeted delivery before publishing.

Code Example:


try {
    PubSubPublishOptions options = new PubSubPublishOptions();
    options.setPersist(true);
    options.setSendOnly(new String[]{ participantId1, participantId2 });
    meeting.pubSub.publish("CHAT", "Hello!", new JSONObject(), options);
} catch (Exception e) {
    Log.d("VideoSDK", "publish failed: " + e.getMessage());
}

See also

Meeting.PubSub.publish()

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Returns whether the published message will be stored on the server for late-joining subscribers.
Link copied to clipboard
fun setPersist(persist: Boolean)
Enables server-side message persistence so late-joining subscribers receive this message in history.
Link copied to clipboard
fun setSendOnly(sendOnly: Array<String>)
Restricts delivery of the message to specified participant IDs.