PubSubMessage

Represents a message received or published via the PubSub system.

A PubSubMessage contains the message text, sender information, topic, timestamp, and an optional payload.

Code Example:


meeting.pubSub.subscribe("CHAT", object : PubSubMessageListener() {
    override fun onMessageReceived(message: PubSubMessage) {
        val text = message.message
        val sender = message.senderName
        val timestamp = message.timestamp
        Log.d("PubSub", "$sender: $text")
    }
})

See also

PubSubMessageListener.onMessageReceived()

Meeting.PubSub.publish()

Properties

Link copied to clipboard
var id: String
The unique identifier of this message.
Link copied to clipboard
The message text content.
Link copied to clipboard
An optional JSON payload associated with this message.
Link copied to clipboard
The ID of the participant who sent this message.
Link copied to clipboard
The display name of the participant who sent this message.
Link copied to clipboard
The timestamp of when this message was published, in milliseconds since epoch (UTC).
Link copied to clipboard
The topic this message was published to.